* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #000000;
  --accent-color: #ffffff;
  --text-color: #ffffff;
  --text-light: #cccccc;
  --bg-color: #000000;
  --card-bg: #1a1a1a;
  --nav-bg: rgba(26, 26, 26, 0.95);
  --border-color: #333333;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden; /* Hide horizontal scrollbar */
}

/* Hide default scrollbar */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Firefox */
html {
  scrollbar-width: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-color);
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text-light);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Mini Scrollbar */
.scroll-indicator {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 4px;
  height: 200px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  z-index: 1000;
  transition: var(--transition);
}

.scroll-indicator:hover {
  width: 6px;
  background: rgba(255, 255, 255, 0.4);
}

.scroll-progress {
  width: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  transition: height 0.1s ease-out;
  height: 0%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  background: rgba(26, 26, 26, 0.50);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-50%) translateY(-100px);
  padding: 0.75rem 2rem;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

nav.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.25rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav a {
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  background: var(--accent-color);
  color: var(--primary-color);
  font-weight: 600;
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #070707;
  position: relative;
  padding: 2rem;
  padding-left: 4rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  gap: 2rem;
}

.text-blocks {
  display: flex;
  flex-direction: column;
  /* gap: 0.25rem; */
  align-items: flex-start;
  position: relative;
}

.floating-title {
  position: absolute;
  top: 50%;
  left: -40px;
  transform: translateY(-60%);
  z-index: 15;
  width: 100%;
  /* opacity: 0;
  animation: fadeInText 0.8s ease-out 1.5s forwards; */
}

.text-block {
  background: #FAF9F6;
  /* border-radius: 50px; */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2.2rem;
  position: relative;
  height: 100px;
  margin-left: -200px;
  padding-left: 250px;
  z-index: 10;
  transform: translateX(-100vw);
  animation: slideInFromLeft 1.2s ease-out 0.5s forwards;
}

.long-block {
  width: calc(100vw - 100px);
  max-width: 1400px;
  animation-delay: 0.7s;
}

.short-block {
  width: calc(100vw - 100px);
  max-width: 1400px;
}

.hero-text {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: clamp(7rem, 6vw, 8rem);
  color: #070707;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keyframe animations */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100vw);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes fadeInText {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.hero-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  color: var(--text-light);
  text-align: left;
  margin: 0;
  letter-spacing: 0.02em;
  margin-top: -1rem;
  opacity: 0;
  animation: fadeInText 0.8s ease-out 2s forwards;
}

/* Scroll Down Arrow */
.scroll-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-color);
  cursor: pointer;
  opacity: 0;
  animation: fadeInBounce 1s ease-out 1s forwards, bounce 2s infinite 4s;
  transition: var(--transition);
  z-index: 100;
}

.scroll-arrow:hover {
  color: var(--text-color);
  transform: translateX(-50%) scale(1.1);
}

.scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes fadeInBounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

#about {
  padding: 6rem 2rem;
  background: var(--card-bg);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-title-section {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 2rem;
}

.about-title {
  font-size: 5rem;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.1;
  text-align: right;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin: 0;
}

#projects {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-color);
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 4rem;
  color: var(--text-color);
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  width: 24rem;
  max-width: 100%;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.05) 2px, transparent 0);
  background-size: 50px 50px;
  opacity: 0.3;
  pointer-events: none;
}

.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--text-color);
}

.project-card p {
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.tech-stack {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-color);
}

.project-card a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-color);
  transition: var(--transition);
}

.project-card a:hover {
  color: var(--text-light);
}

#contact {
  text-align: center;
  padding: 6rem 1rem;
  background: var(--card-bg);
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-color);
  padding: 3rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.contact-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

#contact h2 {
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  color: var(--text-color);
}

#contact p {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.8;
}

.contact-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  background: var(--accent-color);
  color: var(--primary-color);
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  min-width: 150px;
}

.contact-btn:hover {
  background: var(--primary-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.contact-btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.contact-btn-secondary:hover {
  background: var(--accent-color);
  color: var(--primary-color);
}

.contact-btn svg {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.contact-btn:hover svg {
  transform: translateX(3px);
}

/* Footer Styles */
.footer {
  background: var(--primary-color);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.location-contact {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.location, .phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.phone a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.phone a:hover {
  color: white;
}

.location svg, .phone svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: var(--transition);
}

/* Mobile First Approach - Enhanced Responsive Design */

/* Extra Small Devices (320px and up) */
@media (max-width: 480px) {
  /* Navigation */
  nav {
    top: 0.5rem;
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(-100px);
    padding: 0.5rem;
    border-radius: 12px;
    width: auto;
  }

  nav.visible {
    transform: translateX(0) translateY(0);
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    display: block;
    text-align: center;
    width: 100%;
    border-radius: 8px;
  }

  /* Hero Section */
  .hero {
    padding: 1rem;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  .text-blocks {
    align-items: center;
    gap: 0.3rem;
    width: 100%;
  }

  .floating-title {
    position: static;
    transform: none;
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .text-block {
    margin-left: 0;
    padding: 0.8rem 1rem;
    width: 95vw;
    max-width: 350px;
    height: auto;
    min-height: 60px;
    justify-content: center;
    animation: none;
    transform: none;
    border-radius: 20px;
  }

  .long-block,
  .short-block {
    width: 95vw;
    max-width: 350px;
  }

  .hero-text {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    white-space: normal;
    text-align: center;
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: clamp(0.8rem, 3.5vw, 1rem);
    margin-top: 0.5rem;
    text-align: center;
    animation: none;
    opacity: 1;
    padding: 0 1rem;
  }

  .scroll-indicator {
    display: none;
  }

  /* About Section */
  #about {
    padding: 3rem 1rem;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .about-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
  }

  .about-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Projects Section */
  #projects {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 2rem;
  }

  .project-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  /* Contact Section */
  #contact {
    padding: 3rem 1rem;
  }

  .contact-container {
    padding: 2rem 1rem;
  }

  #contact h2 {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
  }

  #contact p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .contact-buttons {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
  }

  .contact-btn {
    width: 100%;
    max-width: 280px;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 1rem;
  }

  .location-contact {
    flex-direction: column;
    gap: 0.8rem;
  }

  .location, .phone {
    font-size: 0.85rem;
  }

  .social-links {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
  }

  .social-link {
    width: 100%;
    max-width: 200px;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
}

/* Small Devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  /* Navigation */
  nav {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(-100px);
    padding: 0.6rem 1rem;
    width: auto;
  }

  nav.visible {
    transform: translateX(0) translateY(0);
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 1rem;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
    display: block;
    text-align: center;
    width: 100%;
    border-radius: 8px;
  }

  /* Hero Section */
  .hero {
    padding: 2rem 1.5rem;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    align-items: center;
    gap: 1.5rem;
  }

  .text-blocks {
    align-items: center;
    gap: 0.4rem;
  }

  .floating-title {
    position: static;
    transform: none;
    text-align: center;
    width: 100%;
  }

  .text-block {
    margin-left: 0;
    padding: 1rem 1.5rem;
    width: 85vw;
    max-width: 500px;
    height: auto;
    min-height: 70px;
    justify-content: center;
    animation: none;
    transform: none;
    border-radius: 25px;
  }

  .long-block,
  .short-block {
    width: 85vw;
    max-width: 500px;
  }

  .hero-text {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    white-space: normal;
    text-align: center;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-top: 0.5rem;
    text-align: center;
    animation: none;
    opacity: 1;
  }

  .scroll-indicator {
    display: none;
  }

  /* About Section */
  #about {
    padding: 4rem 2rem;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-title {
    font-size: clamp(2.5rem, 6vw, 3rem);
    text-align: center;
  }

  .about-content p {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Projects Section */
  #projects {
    padding: 4rem 2rem;
  }

  .section-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 3rem;
  }

  .projects-grid {
    gap: 1.5rem;
  }

  .project-card {
    width: 100%;
    max-width: 400px;
  }

  /* Contact Section */
  #contact {
    padding: 4rem 2rem;
  }

  .contact-container {
    padding: 2.5rem 2rem;
  }

  #contact h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  #contact p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .contact-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .contact-btn {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
  }

  /* Footer */
  .footer {
    padding: 2rem 1.5rem;
  }

  .location-contact {
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-links {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-link {
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    justify-content: center;
  }
}

/* Medium Devices (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Navigation */
  nav {
    padding: 0.7rem 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
  }

  nav.visible {
    transform: translateX(-50%) translateY(0);
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    background: transparent;
    margin: 0;
    padding: 0;
    flex-direction: row;
    gap: 1.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    backdrop-filter: none;
  }

  nav a {
    display: inline-block;
    width: auto;
    text-align: left;
  }

  /* Hero Section */
  .hero {
    padding: 2rem 3rem;
  }

  .text-block {
    padding: 1.2rem 2rem;
  }

  .hero-text {
    font-size: clamp(4rem, 6vw, 5rem);
  }

  .hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
  }

  /* About Section */
  .about-container {
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
  }

  .about-title {
    font-size: 3.5rem;
  }

  /* Projects Section */
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .project-card {
    width: 100%;
  }

  /* Contact Section */
  .contact-buttons {
    flex-direction: row;
    gap: 1.5rem;
  }

  .contact-btn {
    flex: 1;
    max-width: 200px;
  }
}

/* Large Devices (1025px and up) - Default styles apply */
@media (min-width: 1025px) {
  /* Ensure optimal spacing for larger screens */
  .hero {
    padding-left: 4rem;
  }

  .about-container {
    grid-template-columns: 1fr 2fr;
  }

  .projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-card {
    width: 24rem;
  }
}