/* ============================================================
   LAYOUT.CSS — Page Structure & Grid
   ============================================================ */

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* Scroll lock — applied by gate.js and mobile-nav.js */
body.scroll-locked {
  overflow: hidden;
  /* prevent iOS momentum scroll bleed-through */
  position: fixed;
  width: 100%;
}

/* Custom cursor override */
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Section base */
section {
  position: relative;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 1.25rem 0;
  transition: background var(--transition-med), backdrop-filter var(--transition-med), padding var(--transition-med), border-bottom var(--transition-med);
  border-bottom: 1px solid transparent;
  /* Sit above mnav overlay so hamburger remains clickable */
  isolation: isolate;
}

.nav.scrolled {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  pointer-events: auto;
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateX(-16px);
  animation: navLogoSlideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  animation-play-state: paused;
}

.nav__logo span {
  color: var(--color-accent);
}


.nav__link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-med);
}

.nav__link:hover {
  color: var(--color-text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid rgba(88, 166, 255, 0.4);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.nav__cta:hover {
  background: var(--color-accent);
  color: var(--color-text-dark);
  border-color: var(--color-accent);
}

/* ── WinnSS logo button ── */
.nav__cta--winnss {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: #58A6FF;
  text-decoration: none;
  overflow: visible;
  z-index: 1;
  animation: navCtaFallIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
  transition: color 0.25s ease, transform 0.2s ease;
}

.nav__cta--winnss:hover {
  background: none;
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-1px);
  color: #92d2ff;
}

/* triggered once nav scrolls in / page ready */
.page-content.ready .nav__logo {
  animation-play-state: running;
}

.page-content.ready .nav__cta--winnss {
  animation-play-state: running;
}

.page-content.ready .nav__hamburger {
  animation-play-state: running;
}


@keyframes navCtaFallIn {
  0%   { opacity: 0; transform: translateY(-18px) rotate(-4deg) scale(0.85); }
  65%  { opacity: 1; transform: translateY(3px)  rotate(0.5deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0)    rotate(0deg)   scale(1); }
}

@keyframes navLogoSlideIn {
  0%   { opacity: 0; transform: translateX(-16px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes navHamburgerFadeIn {
  0%   { opacity: 0; transform: scale(0.7) rotate(-10deg); }
  100% { opacity: 1; transform: scale(1)   rotate(0deg); }
}

/* Animated glow sweep bg */
.nav__cta-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(88, 166, 255, 0.18) 45%,
    rgba(88, 166, 255, 0.25) 55%,
    transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  pointer-events: none;
  /* self-clip so it never bleeds outside the button bounds */
  clip-path: inset(0 round 999px);
}

.nav__cta--winnss:hover .nav__cta-bg { transform: translateX(0); }

.nav__cta--winnss:hover {
  background: rgba(88, 166, 255, 0.14);
  border-color: rgba(88, 166, 255, 0.65);
  box-shadow: 0 0 18px rgba(88, 166, 255, 0.25), inset 0 0 12px rgba(88, 166, 255, 0.08);
  transform: translateY(-1px);
}

/* Logo — inline SVG, color controlled via currentColor */
.nav__cta-logo {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  overflow: visible;
  padding: 0 2px;
}

.nav__cta-logo .winnss-svg {
  width: auto;
  height: 1.35rem;
  max-height: 1.35rem;
  display: block;
  color: #58A6FF;
  transition: color 0.25s ease;
  overflow: visible;
}

.winnss-svg {
  overflow: visible !important;
}

.nav__cta--winnss:hover .nav__cta-logo .winnss-svg {
  color: #92d2ff;
}

.nav__cta-arrow {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__cta--winnss:hover .nav__cta-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}



.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  position: relative;
  z-index: 9100; /* above .mnav (9000) so it's always tappable */
  opacity: 0;
  animation: navHamburgerFadeIn 0.4s ease 0.35s both;
  animation-play-state: paused;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-med), opacity var(--transition-fast);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg-deep);
}

/* Hero WebGL canvas */
#aurora-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* hero-bg-mesh removed — aurora canvas is the background now */

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 17, 23, 0.15) 0%,
    rgba(13, 17, 23, 0.0) 40%,
    rgba(13, 17, 23, 0.65) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding: 8rem 0 5rem;
}

/* ── Hero layout ── */
@media (min-width: 900px) {
  .hero__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4rem;
  }
}
@media (max-width: 899px) {
  .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ── Portrait wrapper — all screen sizes ── */
.hero__portrait {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* animation held until gate dismissed — see .page-content.ready below */
  animation: none;
}

/* Gate dismissed — trigger meteor */
.page-content.ready .hero__portrait {
  animation: meteorCrash 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* Fire/explosion also held until ready */
.hero__portrait-fire {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  background:
    radial-gradient(ellipse 110% 90% at 50% 60%,
      rgba(88, 166, 255, 0.5)  0%,
      rgba(56, 130, 255, 0.28) 30%,
      rgba(88, 166, 255, 0.1)  55%,
      transparent 75%);
  filter: blur(10px);
  animation: none;
}
.page-content.ready .hero__portrait-fire {
  animation: fireAppear 0.8s ease-out 0.75s both, firePulse 3.5s ease-in-out 1.55s infinite;
}

.hero__portrait-explosion {
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(88, 166, 255, 0.55) 0%,
    rgba(56, 130, 255, 0.3)  25%,
    rgba(88, 166, 255, 0.12) 50%,
    transparent 70%);
  filter: blur(16px);
  animation: none;
}
.page-content.ready .hero__portrait-explosion {
  animation: explosionBloom 1.2s ease-out 0.7s both;
}

/* Shockwave ring */
.hero__portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(88, 166, 255, 0.7);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  animation: none;
}
.page-content.ready .hero__portrait::after {
  animation: shockRing 0.9s ease-out 0.72s both;
}

/* Sparks canvas */
.hero__portrait-sparks {
  position: absolute;
  inset: -80px;
  width: calc(100% + 160px);
  height: calc(100% + 160px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  animation: none;
}
.page-content.ready .hero__portrait-sparks {
  animation: sparksReveal 0.1s linear 0.7s both;
}

.hero__portrait-frame {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(88, 166, 255, 0.3);
  box-shadow:
    0 0 0 6px rgba(88, 166, 255, 0.05),
    0 0 50px rgba(88, 166, 255, 0.2),
    0 0 100px rgba(88, 166, 255, 0.1);
  position: relative;
  z-index: 3;
  /* soft edge fade — masks the hard circle crop */
  -webkit-mask-image: radial-gradient(circle, black 62%, transparent 100%);
  mask-image: radial-gradient(circle, black 62%, transparent 100%);
}

.hero__portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

/* ── Keyframes ── */
@keyframes meteorCrash {
  0% {
    transform: translate(160px, -180px) rotate(12deg) scale(0.5);
    opacity: 0;
  }
  65% {
    transform: translate(-10px, 14px) rotate(-2deg) scale(1.06);
    opacity: 1;
  }
  80% {
    transform: translate(4px, -8px) rotate(1deg) scale(0.97);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes explosionBloom {
  0%   { opacity: 0;    transform: scale(0.4); }
  20%  { opacity: 0.9;  transform: scale(1.3); }
  60%  { opacity: 0.35; transform: scale(1.6); }
  100% { opacity: 0;    transform: scale(2.2); }
}

@keyframes fireAppear {
  0%   { opacity: 0; transform: scale(0.5); }
  50%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.65; transform: scale(1); }
}

@keyframes firePulse {
  0%, 100% { opacity: 0.5;  transform: scale(1);    filter: blur(10px); }
  50%       { opacity: 0.8;  transform: scale(1.07); filter: blur(12px); }
}

@keyframes shockRing {
  0%   { opacity: 0.9; transform: scale(0.85); }
  100% { opacity: 0;   transform: scale(2.4); }
}

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

/* Mobile adjustments */
@media (max-width: 899px) {
  .hero__portrait {
    order: -1; /* portrait above text on mobile */
    margin-bottom: 2rem;
  }
  .hero__portrait-frame {
    width: 170px;
    height: 170px;
  }
  .hero__portrait-sparks {
    inset: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
  }
}



.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--color-accent);
}

.hero__headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
}

.hero__headline .line-accent {
  color: var(--color-accent);
  display: block;
  white-space: nowrap;
}

.hero__headline .hero__line1 {
  display: block;
  white-space: nowrap; /* allow override at mobile breakpoints below */
}

.hero__sub {
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  color: var(--color-text-muted);
}

.hero__scroll-indicator span {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__scroll-arrow {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--color-accent) 0%, transparent 100%);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── Stats Section ── */
.stats {
  background: transparent;
  border-top: 1px solid rgba(88, 166, 255, 0.1);
  border-bottom: 1px solid rgba(88, 166, 255, 0.1);
  padding: var(--space-3xl) 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(88,166,255,0.07);
  border: 1px solid rgba(88,166,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  background: rgba(10, 13, 22, 0.95);
  padding: var(--space-2xl) var(--space-xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.4s ease;
}

/* Ambient glow orb top-center */
.stat-item__glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88,166,255,0.18) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0.6;
}

.stat-item:hover .stat-item__glow {
  opacity: 1;
}

.stat-item:hover {
  background: rgba(88,166,255,0.04);
}

/* Icon */
.stat-item__icon {
  font-size: 1.5rem;
  color: var(--color-accent);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 0.25rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
}

.stat-item:hover .stat-item__icon {
  opacity: 0.9;
  transform: translateY(-2px);
}

.stat-item__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: -0.03em;
  position: relative;
  text-shadow: 0 0 50px rgba(88,166,255,0.5), 0 0 100px rgba(88,166,255,0.2);
}

.stat-item__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  margin-top: 0.1rem;
}

/* Progress bar at bottom */
.stat-item__bar {
  width: 60%;
  height: 2px;
  background: rgba(88,166,255,0.12);
  border-radius: 999px;
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
}

.stat-item__bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88,166,255,0.4), #58A6FF);
  box-shadow: 0 0 8px rgba(88,166,255,0.6);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Triggered when in view */
.stat-item.in-view .stat-item__bar-fill {
  width: var(--fill);
}

/* ── About Section ── */
.about {
  background: var(--color-bg-primary);
  padding: var(--space-5xl) 0;
}

.about__grid {
  display: block;
  max-width: 780px;
  margin: 0 auto;
}

.about__text-col {
  min-width: 0; /* prevent grid blowout */
  overflow: hidden;
}

.section-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.section-h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.75rem, 5.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 1.75rem;
}

.about__body p {
  font-size: clamp(0.9375rem, 2vw, 1rem);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.about__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 2rem 0;
}

.pill {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4375rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: var(--color-accent-light);
  background: rgba(88, 166, 255, 0.06);
}

.about__image-col {
  position: relative;
  width: 100%;
  max-width: 340px;
}

.about__image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  width: 100%;
  background: var(--color-bg-mid);
}

.about__image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 17, 23, 0.5) 100%);
  pointer-events: none;
}

.about__image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s var(--ease-out-expo);
}

.about__image-frame:hover img {
  transform: scale(1.04);
}

.about__image-border {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(88, 166, 255, 0.2);
  pointer-events: none;
}

/* ── Experience Section ── */
.experience {
  background: radial-gradient(ellipse 60% 40% at 100% 0%, rgba(88, 166, 255, 0.04) 0%, transparent 70%);
  padding: var(--space-5xl) 0;
  border-top: 1px solid var(--color-border);
}

.experience__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--color-accent) 0%, transparent 100%);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: var(--space-3xl);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: var(--color-bg-deep);
  box-shadow: 0 0 0 0 rgba(88,166,255,0.4);
  transform: translateX(-50%);
  margin-left: 8px;
  transition: box-shadow 0.3s ease;
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(88,166,255,0.3); }
  50% { box-shadow: 0 0 20px rgba(88,166,255,0.7), 0 0 0 6px rgba(88,166,255,0.08); }
}

.timeline-item__card {
  background: linear-gradient(135deg, rgba(22,28,36,0.7) 0%, rgba(13,17,23,0.5) 100%);
  border: 1px solid rgba(88,166,255,0.08);
  border-left: 2px solid rgba(88,166,255,0.3);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  /* backdrop-filter removed — kills scroll compositing */
}

.timeline-item__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.timeline-item__card:hover { 
  border-color: rgba(88,166,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(88,166,255,0.05); 
}

.timeline-item__card:hover::before { opacity: 1; }

.timeline-item__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.timeline-item__company {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.timeline-item__dates {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  white-space: nowrap;
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.timeline-item__role {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(175,190,210,0.65);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-item__highlights {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.timeline-item__highlights li {
  font-size: clamp(0.8125rem, 1.8vw, 0.9rem);
  line-height: 1.65;
  color: rgba(175,190,210,0.7);
  padding-left: 1.25rem;
  position: relative;
}

.timeline-item__highlights li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 1px;
  background: var(--color-accent);
  opacity: 0.6;
}

/* ── Skills Section ── */
.skills {
  background: var(--color-bg-primary);
  background-image: linear-gradient(rgba(88, 166, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(88, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  padding: var(--space-5xl) 0;
  border-top: 1px solid var(--color-border);
}

.skills__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid var(--cat, var(--color-accent));
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat, var(--color-accent)) 15%, transparent) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--cat, var(--color-accent)) 8%, transparent) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--cat, var(--color-accent)) 60%, transparent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px color-mix(in srgb, var(--cat, var(--color-accent)) 25%, transparent);
}

.skill-card:hover::after { opacity: 1; }

.skill-card__icon {
  font-size: 1.75rem;
  color: var(--cat, var(--color-accent));
  margin-bottom: 0;
  display: block;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--cat, var(--color-accent)) 50%, transparent));
}

/* Header row: icon + title side by side */
.skill-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat, var(--color-text-primary));
  margin-bottom: 0;
  opacity: 0.9;
}

/* Legacy list (unused now but keep for safety) */
.skill-card__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skill-card__list li {
  font-size: 0.875rem;
  color: rgba(230,237,243,0.7);
  line-height: 1.5;
  padding: 0.375rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-card__list li:last-child { border-bottom: none; }

/* ── Pill tags ── */
.skill-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pill::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pill--expert {
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.3);
  color: #a8d4ff;
}
.pill--expert::before { background: #58A6FF; box-shadow: 0 0 5px #58A6FF; }

.pill--proficient {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #86efce;
}
.pill--proficient::before { background: #34D399; box-shadow: 0 0 5px #34D399; }

.pill--intermediate {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: rgba(230,237,243,0.6);
}
.pill--intermediate::before { background: rgba(255,255,255,0.3); }

.pill:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.3); }

/* ── Legend ── */
.skills__legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}

.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-dot--expert      { background: #58A6FF; box-shadow: 0 0 6px #58A6FF; }
.legend-dot--proficient  { background: #34D399; box-shadow: 0 0 6px #34D399; }
.legend-dot--intermediate{ background: rgba(255,255,255,0.3); }



/* ── Projects Section ── */
.projects {
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-deep) 100%);
  padding: var(--space-5xl) 0;
  border-top: 1px solid var(--color-border);
}

.projects__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: linear-gradient(145deg, rgba(22,28,36,0.9) 0%, rgba(13,17,23,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(88,166,255,0.5) 50%, transparent 100%);
  z-index: 1;
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(88,166,255,0.2), 0 0 40px rgba(88,166,255,0.06);
  border-color: rgba(88,166,255,0.15);
}

.project-card:hover::before { transform: scaleX(1); }

.project-card__num {
  position: absolute;
  top: 0.75rem;
  left: 0.875rem;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(88,166,255,0.6);
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.15);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.project-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-light);
}

.project-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,17,23,0.8) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-card__image::after { opacity: 1; }

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22,1,0.36,1);
}

.project-card:hover .project-card__image img { transform: scale(1.08); }

.project-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-accent);
  opacity: 0.3;
}

.project-card__top-border {
  display: none; /* replaced by ::before pseudo */
}

.project-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.project-card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}

.project-card__desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: rgba(175,190,210,0.75);
  flex: 1;
  margin: 0;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(88,166,255,0.06);
  border: 1px solid rgba(88,166,255,0.14);
  color: rgba(88,166,255,0.8);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.project-card:hover .tag {
  background: rgba(88,166,255,0.1);
  border-color: rgba(88,166,255,0.25);
  color: rgba(88,166,255,0.95);
}

/* ── Contact Section ── */
.contact {
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(88, 166, 255, 0.07) 0%, transparent 60%), var(--color-bg-deep);
  padding: var(--space-5xl) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.contact__eyebrow {
  margin-bottom: 1.5rem;
  justify-content: center;
}

.contact__headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
}

.contact__sub {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto 3rem;
}

.contact__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.contact__phone i {
  color: var(--color-accent);
}

/* ── Footer ── */
.footer {
  background: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border-faint);
  margin-bottom: var(--space-xl);
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 0.375rem;
}

.footer__brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

.footer__nav {
  display: flex;
  gap: var(--space-xl);
}

.footer__nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__nav a:hover {
  color: var(--color-text-primary);
}

.footer__socials {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 1rem;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.footer__social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(88, 166, 255, 0.08);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Comprehensive Mobile Overhaul
   Breakpoints: 1024px (tablet), 768px (mobile), 480px (small)
   ═══════════════════════════════════════════════════════════ */

/* ── Global: always apply to buttons ── */
.btn {
  /* Ensure touch targets are always accessible */
  min-height: 44px;
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .skills__grid       { grid-template-columns: repeat(2, 1fr); }
  .projects__grid     { grid-template-columns: repeat(2, 1fr); }
  .about__grid        { gap: var(--space-3xl); }
  .hero__headline     { font-size: clamp(3rem, 8vw, 6rem); }
  .contact__headline  { font-size: clamp(2.5rem, 6vw, 5rem); }
  .footer__top        { grid-template-columns: 1fr auto 1fr; }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  .nav__cta--winnss { display: none; }

  /* ─ General section spacing ─ */
  .about,
  .experience,
  .skills,
  .projects,
  .contact {
    padding: var(--space-4xl) 0;
  }

  /* ─ Nav ─ */
  .nav__links {
    display: none; /* hidden on mobile — mnav overlay handles it */
  }
  .nav__hamburger {
    display: flex;
    z-index: 9100;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
  }
  .nav__hamburger span {
    width: 22px;
    height: 2px;
  }
  .nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ─ Hero ─ */
  .hero__inner {
    padding: 6.5rem 0 4rem;
    text-align: center;
  }
  .hero__eyebrow {
    justify-content: center;
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    text-align: center;
  }
  .hero__eyebrow::before { display: none; }
  .hero__headline {
    font-size: clamp(2.25rem, 10.5vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
  .hero__headline .hero__line1,
  .hero__headline .line-accent {
    white-space: normal;
  }
  .hero__sub {
    font-size: 0.9375rem;
    max-width: 100%;
    margin-inline: auto;
    line-height: 1.7;
  }
  .hero__ctas {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
  .hero__ctas .btn {
    width: auto;
    max-width: none;
    padding: 0.75rem 1.5rem;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.7rem;
  }

  /* ─ Stats ─ */
  .stats { padding: var(--space-2xl) 0; }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    /* Preserve border-trick by keeping gap:1px */
    gap: 1px;
  }
  .stat-item {
    padding: var(--space-xl) var(--space-md);
    background: var(--color-bg-mid);
  }
  .stat-item__value  { font-size: clamp(1.875rem, 7vw, 2.75rem); }
  .stat-item__label  { font-size: 0.6875rem; letter-spacing: 0.1em; }

  /* ─ About ─ */
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .about__image-col {
    order: -1;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .about__image-frame { aspect-ratio: 3 / 4; }
  .about__body p      { font-size: 0.9375rem; }
  .about__pills       { gap: 0.5rem; }
  .pill {
    font-size: 0.625rem;
    padding: 0.375rem 0.75rem;
    /* Allow wrapping on narrow screens */
    white-space: normal;
    word-break: break-word;
  }
  .section-h2         { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .section-eyebrow    { font-size: 0.625rem; }

  /* ─ Experience / Timeline ─ */
  .experience__header { margin-bottom: var(--space-2xl); }
  .timeline::before   { left: 10px; }
  .timeline-dot {
    left: 2px;
    width: 16px;
    height: 16px;
    margin-left: 8px;
  }
  .timeline-item       { padding-left: 2.5rem; padding-bottom: var(--space-2xl); }
  .timeline-item__meta { flex-direction: column; gap: 0.375rem; }
  .timeline-item__dates {
    align-self: flex-start;
    font-size: 0.6875rem;
    padding: 0.2rem 0.625rem;
  }
  .timeline-item__company { font-size: 1rem; }
  .timeline-item__role    { font-size: 0.8125rem; }
  .timeline-item__highlights li { font-size: 0.875rem; }

  /* ─ Skills ─ */
  .skills__header     { margin-bottom: var(--space-2xl); }
  .skills__grid       { grid-template-columns: 1fr; gap: 1rem; }
  .skill-card         { padding: var(--space-lg); }
  .skill-card__list li { font-size: 0.875rem; }

  /* ─ Projects ─ */
  .projects__header   { margin-bottom: var(--space-2xl); }
  .projects__grid     { grid-template-columns: 1fr; gap: 1.25rem; }
  .project-card__body { padding: var(--space-md) var(--space-lg); }
  .project-card__title { font-size: 1rem; }
  .project-card__desc  { font-size: 0.875rem; }
  .tag                 { font-size: 0.625rem; }

  /* ─ Contact ─ */
  .contact__headline {
    font-size: clamp(2rem, 11vw, 3.5rem);
    line-height: 1;
  }
  .contact__sub       { font-size: 0.9375rem; max-width: 100%; }
  .contact__ctas {
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
  }
  .contact__ctas .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    white-space: normal;
  }

  /* ─ Footer ─ */
  .footer__top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .footer__nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem 1.25rem;
  }
  .footer__socials    { justify-content: center; }
  .footer__brand-tagline { font-size: 0.6875rem; }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {

  /* Container */
  .container { padding-inline: 1rem; }

  /* Nav logo smaller */
  .nav__logo { font-size: 0.9375rem; }

  /* Hero tighter */
  .hero__inner { padding-top: 5.5rem; padding-bottom: 3rem; }
  .hero__headline {
    font-size: clamp(1.75rem, 10vw, 2.75rem);
    letter-spacing: -0.015em;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
  .hero__headline .hero__line1,
  .hero__headline .line-accent {
    white-space: normal;
  }
  .hero__sub { font-size: 0.875rem; }
  .hero__ctas .btn { padding: 0.65rem 1.1rem; font-size: 0.68rem; }
  .hero__scroll-indicator { display: none; }

  /* Stats */
  .stat-item__value   { font-size: clamp(1.625rem, 9vw, 2rem); }
  .stat-item__label   { font-size: 0.5625rem; letter-spacing: 0.08em; }
  .stat-item          { padding: var(--space-lg) var(--space-sm); }

  /* About */
  .about__image-col   { max-width: 240px; }

  /* Skill card */
  .skill-card__icon   { font-size: 1.5rem; margin-bottom: 0.75rem; }
  .skill-card__title  { font-size: 0.875rem; }

  /* Contact */
  .contact__headline  { font-size: clamp(1.875rem, 13vw, 2.75rem); }
  .contact__ctas .btn { font-size: 0.7rem; padding: 0.875rem 1.25rem; }

  /* Footer */
  .footer__nav a      { font-size: 0.6875rem; }

  /* Gate on small phones */
  .gate__title        { font-size: clamp(1.875rem, 12vw, 3rem); }
  .gate__sub          { font-size: 0.6875rem; letter-spacing: 0.14em; }

  /* Section headers — prevent wrapping on small screens */
  .section-h2         { font-size: clamp(1.5rem, 9vw, 2.25rem); word-break: normal; overflow-wrap: break-word; }
  .contact__headline  { word-break: normal; overflow-wrap: break-word; }
}

/* ── Tiny Mobile (≤375px) ── */
@media (max-width: 375px) {
  .section-h2         { font-size: clamp(1.25rem, 8.5vw, 1.75rem); }
  .hero__headline     { font-size: clamp(1.875rem, 12.5vw, 2.75rem); }
  .contact__headline  { font-size: clamp(1.625rem, 11vw, 2.25rem); }
  .stat-item__value   { font-size: clamp(1.5rem, 8vw, 1.875rem); }
  .container          { padding-inline: 0.875rem; }
}
