/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-card: #141414;
  --bg-card-border: rgba(255, 255, 255, 0.06);
  --bg-pill: rgba(255, 255, 255, 0.06);
  --bg-pill-indicator: rgba(255, 255, 255, 0.08);

  --text-primary: #f2f2f2;
  --text-secondary: rgba(242, 242, 242, 0.7);
  --text-tertiary: rgba(242, 242, 242, 0.4);
  --text-quaternary: rgba(242, 242, 242, 0.25);

  --dot-red: #ff5f57;
  --dot-yellow: #febc2e;
  --dot-green: #28c840;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --nav-height: 64px;
  --page-padding: 24px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}


/* Locomotive Scroll overrides */
html.has-scroll-smooth {
  overflow: hidden;
}

html.has-scroll-smooth body {
  overflow: hidden;
}

.c-scrollbar {
  display: none; /* We use our own custom scrollbar */
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Hide native scrollbar entirely */
html, body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
}

/* Custom scrollbar track */
.custom-scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 20px; /* Wider hit area for hovering/grabbing */
  height: 100vh;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.custom-scrollbar:hover,
.custom-scrollbar.visible {
  opacity: 1;
}

.custom-scrollbar-thumb {
  position: absolute;
  right: 1px;
  width: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  min-height: 40px;
  transition: background 0.2s ease, width 0.2s ease;
  cursor: grab;
}

.custom-scrollbar-thumb:hover,
.custom-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.35);
  width: 8px;
}

.custom-scrollbar-thumb:active {
  cursor: grabbing;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 32px 20px;
  pointer-events: none;
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.70) 0%,
    rgba(0, 0, 0, 0.60) 19%,
    rgba(0, 0, 0, 0.46) 34%,
    rgba(0, 0, 0, 0.32) 47%,
    rgba(0, 0, 0, 0.23) 59%,
    rgba(0, 0, 0, 0.11) 73%,
    rgba(0, 0, 0, 0.03) 86%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.navbar > * {
  pointer-events: auto;
}

/* Nav Left — Logo */
.nav-left {
  flex: 1;
}

.logo-block {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity 0.3s ease;
}

.logo-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.logo-title {
  font-size: 15px;
  font-weight: 300;
  color: rgba(242, 242, 242, 0.45);
  letter-spacing: 0.01em;
}

/* Nav Center — Pill */
.nav-center {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-page-indicator {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  margin-bottom: 1px; /* Moved slightly above */
  z-index: 1;
  box-shadow:
    0 0 6px 1px rgba(255, 255, 255, 0.6),
    0 0 12px 2px rgba(255, 255, 255, 0.3);
  transition: transform 0.5s var(--ease-out-expo);
  position: relative;
}

.nav-pill {
  position: relative;
  z-index: 2; /* Ensures it sits above the indicator */
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 4px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-toggle {
  position: relative;
  z-index: 2;
  padding: 9px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: 100px;
  transition: color 0.4s var(--ease-out-expo);
  cursor: pointer;
  user-select: none;
}

.nav-toggle.active {
  color: var(--text-primary);
}

.nav-toggle:hover:not(.active) {
  color: var(--text-secondary);
}

.nav-indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--bg-pill-indicator);
  border-radius: 100px;
  transition: transform 0.5s var(--ease-out-expo);
}

.nav-indicator.info {
  transform: translateX(100%);
}

/* Nav Right — Social */
.nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 100;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 24px;
  background: #fff;
  border-radius: 2px;
  left: 8px;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) { top: 12px; }
.mobile-menu-btn span:nth-child(2) { top: 19px; }
.mobile-menu-btn span:nth-child(3) { top: 26px; }

.navbar.menu-open .mobile-menu-btn span:nth-child(1) {
  top: 19px;
  transform: rotate(135deg);
}

.navbar.menu-open .mobile-menu-btn span:nth-child(2) {
  opacity: 0;
  left: -20px;
}

.navbar.menu-open .mobile-menu-btn span:nth-child(3) {
  top: 19px;
  transform: rotate(-135deg);
}

.chip-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.chip-social:hover {
  color: var(--text-primary);
  border-color: var(--bg-card-border);
  background: var(--bg-pill);
}

.chip-social svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(600px, 100vh, 1080px); /* Prevents massive vertical stretching on ultra-wides */
  padding-top: clamp(110px, 12.5vw, 180px);
  position: relative;
}

/* Canvas background */
.hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  animation: bgReveal 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes bgReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Grain overlay */
.hero-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: grainReveal 1.5s ease-out forwards;
}

@keyframes grainReveal {
  from { opacity: 0; }
  to { opacity: 0.12; }
}

/* Window Card — Outer border */
.window-card-outer {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: calc(100% - clamp(32px, 4vw, 40px));
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-bottom: none; /* Remove bottom border */
  background: transparent;
  border-radius: 32px 32px 0 0; /* Wider curve, flat at the bottom */
  padding: 10px 10px 0 10px; /* Adjusted gap */
  opacity: 0;
  animation: heroTextReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}

/* Glowing top edge highlight for hero outer window */
.window-card-outer::after {
  content: "";
  position: absolute;
  top: -2px; /* perfectly overlay the 2px outer border */
  left: 40px; 
  right: 40px;
  height: 2.5px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 5%,    
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.4) 95%,   
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 10;
  pointer-events: none;
}

/* Window Card — Inner */
.window-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: none; /* Remove bottom border */
  border-radius: 24px 24px 0 0; /* Wider inner curve, flat at the bottom */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  height: 100%; /* Ensure it spans the full height of the outer card */
}

/* Glowing top edge highlight for hero inner window */
.window-card::after {
  content: "";
  position: absolute;
  top: 0; 
  left: 30px; 
  right: 30px;
  height: 1.5px; 
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 20%,   
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.3) 80%,   
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 10;
  pointer-events: none;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, #2a2a2b 0%, #4a4a4d 20%, #8b8b8d 50%, #4a4a4d 80%, #2a2a2b 100%);
  position: relative;
  overflow: hidden;
}

.window-titlebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.15;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.window-dots {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-dot.dot-red { background: var(--dot-red); box-shadow: 0 0 8px var(--dot-red); }
.window-dot.dot-yellow { background: var(--dot-yellow); box-shadow: 0 0 8px var(--dot-yellow); }
.window-dot.dot-green { background: var(--dot-green); box-shadow: 0 0 8px var(--dot-green); }

.window-plus {
  font-size: 26px;
  font-weight: 300;
  color: #eae0c8; /* Pearl color */
  line-height: 1;
  position: relative;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

/* Hero text (inside window) */
.hero-text-wrapper {
  position: relative;
  z-index: 2;
  padding: clamp(50px, 9.7vw, 140px) clamp(24px, 5vw, 72px) clamp(60px, 22.2vw, 320px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-sub-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-start;
}

@keyframes heroTextReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-heading {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 8.5vw, 7rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(230, 230, 230, 1) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 64px;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.25)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.15));
}

.hero-serif {
  font-family: 'Gloock', serif;
  font-size: 1.1em; 
  font-style: italic;
  font-weight: 400;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 40%,
    rgba(130, 130, 130, 1) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  padding-right: 0.1em;
}

.hero-about {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: flex-end;
  align-items: flex-start;
  text-align: left;
}

.hero-about-primary {
  font-size: clamp(14px, 2.2vw, 28px);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hero-about-secondary {
  font-size: clamp(14px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: -0.01em;
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(40px, 7.6vw, 110px) clamp(0px, 2.8vw, 40px) clamp(60px, 9.7vw, 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-container {
  width: calc(100% - clamp(32px, 4vw, 40px));
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5.5vw, 80px);
}

/* Standard Project Card — Outer */
.project-window-outer {
  position: relative;
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(150, 150, 150, 0.08);
  border-radius: 32px; /* Wider curve */
  padding: 10px; /* Adjusted gap */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Glowing top edge highlight for outer placeholders */
.project-window-outer::after {
  content: "";
  position: absolute;
  top: -2px; /* perfectly overlay the 2px outer border */
  left: 40px; /* Don't spill into rounded corners */
  right: 40px;
  height: 2.5px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 5%,    /* Wider spread */
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.4) 95%,   /* Wider spread */
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 10;
  pointer-events: none;
}

/* Standard Project Card — Inner */
.project-window {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px; /* Wider inner curve */
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.4s ease;
  min-height: clamp(200px, 50vw, 900px);
}

.project-window:hover,
.project-window.is-hovered {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Animated gradient hover effect */
.project-window.project-1::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.65) 0%, rgba(14, 116, 144, 0.2) 40%, rgba(20, 20, 20, 0) 100%);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out-expo);
  z-index: 1; /* Below content but above background */
  pointer-events: none;
}

.project-window.project-1:hover::before,
.project-window.project-1.is-hovered::before {
  opacity: 1;
  transform: translateY(0);
}

/* Glowing top edge highlight for inner placeholders */
.project-window::after {
  content: "";
  position: absolute;
  top: 0; /* Sit exactly inside the border, preventing overflow clipping */
  left: 30px; /* Don't spill into rounded corners */
  right: 30px;
  height: 1.5px; /* Slightly thicker than 1px for a stronger glow */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 20%,   /* Narrower spread */
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.3) 80%,   /* Narrower spread */
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 10;
  pointer-events: none;
}

.project-content {
  padding: clamp(60px, 12vw, 180px) clamp(24px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 500;
  flex: 1;
}

.project-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3.5vw, 48px);
  position: relative;
  z-index: 2;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  font-size: clamp(27px, 2.5vw, 32px);
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.project-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

.project-arrow {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: transform 0.3s ease; /* Smoothly slide back immediately */
  cursor: pointer;
}

.project-window:hover .project-arrow,
.project-window.is-hovered .project-arrow {
  transform: translateX(8px); /* subtle slide right animation */
  transition: transform 0.3s ease 0.2s; /* Smooth delay only applies on hover */
}

.project-image-container {
  padding: 0 6% 0 6%; /* Bottom padding removed to align with the bottom */
  display: flex;
  justify-content: center;
  align-items: flex-end; /* push it to the bottom */
  flex: 1;
  position: relative;
  z-index: 2;
}

.project-img-inner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0; /* rounded at top, flat at bottom edge */
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s var(--ease-out-expo);
  transform: translateY(16px);
}

.project-window:hover .project-img-inner,
.project-window.is-hovered .project-img-inner {
  transform: translateY(0);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: clamp(15px, 8vw, 120px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.3); /* Start grey */
  filter: none; /* No glow initially */
  opacity: 1;
  animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    color: rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  50% {
    transform: translateX(-50%) translateY(10px);
    color: #ffffff; /* Turn white */
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6))
           drop-shadow(0 0 14px rgba(255, 255, 255, 0.3)); /* Glow effect */
  }
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 32px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: flex-start;
  padding: 48px 0 40px;
}

.footer-columns {
  display: flex;
  gap: clamp(40px, 5.5vw, 80px);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-overline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(242, 242, 242, 0.45);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 19px;
  font-weight: 400;
  color: #ffffff;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--text-secondary);
}

.footer-link svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* Footer bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.page-me .footer-bottom {
  padding-bottom: 40px;
}

.footer-copyright {
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
}

.footer-tagline {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.footer-status {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-quaternary);
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 768px) {
  .navbar {
    padding: 32px 24px 16px;
    position: fixed; /* Need to ensure it can host absolute dropdown */
  }

  .nav-left { flex: 1; }

  .nav-center {
    position: absolute;
    right: 64px; /* Hamburger right (16) + width (40) + gap (8) */
  }

  .page-me .nav-left {
    display: none;
  }

  .page-me .nav-center {
    position: static;
  }

  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 16px;
  }

  .nav-right {
    display: flex;
    position: absolute;
    top: 85px;
    right: 16px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px;
    border-radius: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

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

  .section-divider {
    margin: 40px 0 30px 0;
  }

  .logo-block {
    gap: 1px;
  }

  .logo-name {
    font-size: 19px;
  }

  .logo-title {
    font-size: 14px;
  }

  .nav-toggle {
    padding: 9px 17px;
    font-size: 15px;
  }

  .chip-social span {
    font-size: 14px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 40px;
  }

  .hero-text-wrapper {
    padding: 50px 24px 60px;
  }

  .hero-sub-wrapper {
    align-items: flex-start;
  }

  .hero-about {
    align-self: flex-start;
  }


  .window-card-outer::after,
  .project-window-outer::after {
    left: 24px; right: 24px;
  }

  .projects-section {
    padding: 40px 0 60px; /* Slightly increased gap */
  }

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

  @keyframes mobileSlideUpFadeIn {
    0% { opacity: 0; transform: translateY(60px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  .window-card-outer {
    animation: mobileFadeIn 1s ease-out forwards;
  }

  .project-window-outer {
    opacity: 0;
    animation: mobileSlideUpFadeIn 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    padding: 4px;
    margin: 0 -8px;
    width: calc(100% + 16px);
  }

  .project-window-outer:nth-child(1) { animation-delay: 0.4s; }
  .project-window-outer:nth-child(2) { animation-delay: 0.6s; }

  .scroll-indicator {
    bottom: 15px;
    opacity: 0;
    animation: mobileFadeIn 1s ease-out forwards !important;
    filter: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
  }

  .window-card {
    min-height: auto;
  }

  .hero-heading {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 20px;
  }

  .hero-about-primary,
  .hero-about-secondary {
    font-size: 14px;
  }

  .footer-columns {
    gap: 48px;
  }
}

/* Small Desktop / Tablet Landscape */
@media (max-width: 1024px) {
  .experience-item {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --page-padding: 16px;
  }

  .navbar {
    padding: 32px 24px 16px;
  }

  .navbar::before {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.75) 19%,
      rgba(0, 0, 0, 0.58) 34%,
      rgba(0, 0, 0, 0.42) 47%,
      rgba(0, 0, 0, 0.33) 59%,
      rgba(0, 0, 0, 0.17) 73%,
      rgba(0, 0, 0, 0.05) 86%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .nav-left {
    flex: 0 0 auto;
  }

  .hero-text-wrapper {
    padding: 50px 16px 60px;
  }

  .hero-heading {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }

  .hero-about-primary,
  .hero-about-secondary {
    font-size: 13px;
  }

  .scroll-indicator {
    bottom: 15px;
  }

  .footer {
    padding: 0 16px;
  }

  .footer-top {
    justify-content: flex-start;
    padding: 32px 0;
  }

  .footer-columns {
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0 16px;
  }

  .page-me .footer-bottom {
    padding-bottom: 24px;
  }

  .modal-content {
    padding: 32px 24px;
    width: 92%;
  }

  .modal-content p {
    font-size: 16px;
  }
}

/* ===== INFO PAGE ===== */
.info-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: calc(100% - clamp(32px, 4vw, 40px));
  padding: 0 0 60px 0; /* Remove top padding so it aligns exactly with the hero window top */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5.5vw, 80px);
  opacity: 0;
  animation: heroTextReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  text-align: left;
}

.info-content-wrapper .hero-heading {
  font-size: clamp(2.3rem, 5.65vw, 4.6rem); /* Increased by another 10% */
}

.info-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  margin-bottom: clamp(30px, 4vw, 60px);
}

.info-dot {
  width: 10px; /* Increased from 6px */
  height: 10px;
  background-color: #ffffff; /* Brighter for glow */
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(255, 255, 255, 0.4); /* Glow effect */
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5.5vw, 80px);
  align-items: flex-start;
}

.info-col {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.portrait-card {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.info-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Remove bottom gap */
}

.image-card-placeholder {
  color: var(--text-quaternary);
  font-size: 14px;
}

.info-text-card {
  font-size: 21px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
  padding: 40px 0;
  width: 85%;
  margin: 0 auto;
}

.info-text-card h2 {
  font-size: clamp(20px, 1.7vw, 24px);
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 500;
}

.info-text-card p {
  font-size: clamp(15px, 1.25vw, 18px);
  color: rgba(242, 242, 242, 0.55);
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

.info-text-intro {
  padding-top: clamp(40px, 5.5vw, 80px);
  padding-bottom: 0;
  color: rgba(242, 242, 242, 0.9);
}

/* --- Info Page Specific --- */
.section-divider {
  border: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  margin: clamp(40px, 7vw, 100px) 0 30px 0;
  width: 100%;
}

.experience-section {
  padding-bottom: 0px;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5.5vw, 80px);
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5.5vw, 80px);
}

.experience-company {
  font-size: clamp(24px, 2.9vw, 42px);
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.02em;
}

.experience-role {
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 500;
  color: #fff;
  margin: 0 0 8px 0;
}

.experience-date {
  font-size: clamp(14px, 1.25vw, 1.8rem);
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 24px 0;
}

.experience-desc {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

ul.experience-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.experience-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
}

ul.experience-bullets li:last-child {
  margin-bottom: 0;
}

ul.experience-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.3);
}

/* --- Friends Grid --- */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 48px) clamp(40px, 5.5vw, 80px);
}

.friend-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: fit-content;
}

/* 3-column alignment */
@media (min-width: 768px) {
  .friend-item:nth-child(3n+1) {
    margin-right: auto;
  }
  .friend-item:nth-child(3n+2) {
    margin: 0 auto;
  }
  .friend-item:nth-child(3n+3) {
    margin-left: auto;
  }
}

/* 2-column alignment */
@media (max-width: 767px) and (min-width: 481px) {
  .friends-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .friend-item:nth-child(2n+1) {
    margin-right: auto;
  }
  .friend-item:nth-child(2n+2) {
    margin-left: auto;
  }
}

/* 1-column alignment */
@media (max-width: 480px) {
  .friends-grid {
    grid-template-columns: 1fr;
    row-gap: 56px;
  }
  .friend-item {
    margin: 0;
  }
}

.friend-name {
  font-size: clamp(22px, 1.9vw, 26px);
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
}

.friend-designation {
  font-size: clamp(17px, 1.3vw, 19px);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  line-height: 1.5;
}

.friend-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(17px, 1.3vw, 19px);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  transition: color 0.3s ease;
  margin-top: 4px;
  width: fit-content;
}

.friend-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.friend-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .experience-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .experience-company {
    font-size: 24px;
  }
  
  .experience-role {
    font-size: 20px;
  }

  .experience-date {
    font-size: 14px;
    margin-bottom: 16px;
  }
  

  .project-info {
    padding: 36px 6% 12px;
  }

  .project-title {
    font-size: 27px;
  }

  .project-subtitle {
    font-size: 14px;
    font-weight: 300;
  }

  .project-window::before {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .project-img-inner {
    transform: translateY(0) !important;
  }

  .project-arrow {
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .info-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .info-col {
    display: contents;
  }
  .info-text-card {
    width: 100%;
    padding: 10px 0 !important;
    margin: 0 !important;
    font-size: 18px;
  }
  .info-text-card h2 {
    font-size: 20px;
  }
  .info-text-card p {
    font-size: 15px;
    font-weight: 300;
  }

  /* Left Column Items */
  .info-col:nth-child(1) > :nth-child(1) { order: 1; }
  .info-col:nth-child(1) > :nth-child(2) { order: 4; }
  .info-col:nth-child(1) > :nth-child(3) { order: 5; }
  .info-col:nth-child(1) > :nth-child(4) { order: 8; }
  .info-col:nth-child(1) > :nth-child(5) { order: 9; }
  .info-col:nth-child(1) > :nth-child(6) { order: 12; }
  .info-col:nth-child(1) > :nth-child(7) { order: 13; }
  
  /* Right Column Items */
  .info-col:nth-child(2) > :nth-child(1) { order: 2; margin-bottom: -10px; }
  .info-col:nth-child(2) > :nth-child(2) { order: 3; }
  .info-col:nth-child(2) > :nth-child(3) { order: 6; }
  .info-col:nth-child(2) > :nth-child(4) { order: 7; }
  .info-col:nth-child(2) > :nth-child(5) { order: 10; }
  .info-col:nth-child(2) > :nth-child(6) { order: 11; }
  .info-content-wrapper {
    width: 100%;
    padding: 32px 24px 40px;
    gap: 0;
  }
  .info-header {
    margin-bottom: 35px;
  }

  .section-divider {
    margin: 40px 0 30px 0;
  }

}
/* ===== MODAL ===== */
.coming-soon-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.4s ease;
}

.coming-soon-modal.active {
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.coming-soon-modal.active .modal-backdrop {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 48px;
  border-radius: 20px;
  text-align: center;
  max-width: 90%;
  width: 400px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.coming-soon-modal.active .modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-content p {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.3s ease;
}

.modal-close:hover {
  color: #fff;
  transform: scale(1.1);
}



