/* ─── Recommendations ─── */
.recs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
}
.rec-card {
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: var(--r3);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  margin: 0;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.rec-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.rec-card__quote {
  flex: 1;
  position: relative;
  padding-left: var(--s5);
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.rec-card__quote p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-2);
  margin: 0;
}
.rec-card__author {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}
.rec-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--gray-5);
}
.rec-card__author div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rec-card__author strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black);
}
.rec-card__author span {
  font-size: 0.78rem;
  color: var(--gray-3);
  line-height: 1.4;
}
.rec-card__relation {
  color: var(--accent) !important;
  font-weight: 500;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  transition: opacity .3s;
  box-shadow: 0 0 8px rgba(0,113,227,.5);
}


:root {
  /* Monochrome palette — no gradients */
  --black:   #000000;
  --gray-1:  #1d1d1f;
  --gray-2:  #424245;
  --gray-3:  #6e6e73;
  --gray-4:  #86868b;
  --gray-5:  #d2d2d7;
  --gray-6:  #f5f5f7;
  --white:   #ffffff;

  --accent:  #0071e3;
  --accent-h:#0077ed;

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

  /* Spacing scale (4-px grid) */
  --s1: 0.25rem;   /* 4 */
  --s2: 0.5rem;    /* 8 */
  --s3: 0.75rem;   /* 12 */
  --s4: 1rem;      /* 16 */
  --s5: 1.5rem;    /* 24 */
  --s6: 2rem;      /* 32 */
  --s7: 3rem;      /* 48 */
  --s8: 4rem;      /* 64 */
  --s9: 6rem;      /* 96 */
  --s10: 8rem;     /* 128 */

  /* Shadows — subtle, no color */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  /* Radii */
  --r1: 6px;
  --r2: 12px;
  --r3: 16px;
  --r4: 9999px;

  /* Timing — Apple-style easing */
  --ease: cubic-bezier(.25,.1,.25,1);
  --ease-out: cubic-bezier(0,0,.15,1);
  --ease-spring: cubic-bezier(.175,.885,.32,1.275);

  /* Layout */
  --nav-h: 56px;
  --max-w: 1080px;
}

/* ═══════════════════════════════════════════
   DARK MODE TOKENS
   ═══════════════════════════════════════════ */
[data-theme="dark"] {
  --black:   #f5f5f7;
  --gray-1:  #e8e8ed;
  --gray-2:  #aeaeb2;
  --gray-3:  #8e8e93;
  --gray-4:  #636366;
  --gray-5:  #3a3a3c;
  --gray-6:  #1c1c1e;
  --white:   #000000;

  --accent:   #3a9eff;
  --accent-h: #5aafff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
  --shadow:    0 2px 10px rgba(0,0,0,.6);
  --shadow-md: 0 4px 20px rgba(0,0,0,.7);
  --shadow-lg: 0 8px 36px rgba(0,0,0,.8);
}

/* Smooth colour-scheme transitions + dark glass card overrides */
[data-theme="dark"] .skill-group {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .project-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .project-card:hover {
  box-shadow: 0 12px 40px rgba(58,158,255,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
[data-theme="dark"] .role-card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .role-card:hover {
  box-shadow: 0 8px 28px rgba(58,158,255,.18), inset 0 1px 0 rgba(255,255,255,.08);
  border-color: rgba(58,158,255,.3);
}
[data-theme="dark"] .timeline__card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 4px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
}
[data-theme="dark"] .timeline__card:hover {
  box-shadow: 0 10px 36px rgba(58,158,255,.2), inset 0 1px 0 rgba(255,255,255,.1);
  border-color: rgba(58,158,255,.3);
}
[data-theme="dark"] .nav {
  background: rgba(0,0,0,.82);
  border-bottom-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .tags span {
  background: rgba(255,255,255,.07);
  color: var(--gray-2);
}
[data-theme="dark"] ::selection {
  background: var(--accent);
  color: #000;
}
[data-theme="dark"] .hero__blob--1 { background: rgba(58,158,255,.22); }
[data-theme="dark"] .hero__blob--2 { background: rgba(140,80,255,.18); }
[data-theme="dark"] .hero__blob--3 { background: rgba(0,220,200,.15); }

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

html {
  scroll-behavior: auto;
  scroll-padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-1);
  background: var(--white);
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; }

::selection {
  background: var(--gray-1);
  color: var(--white);
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s5);
}

.section {
  padding: var(--s9) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle ambient blob on plain sections */
.section:not(.section--alt)::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
  background: rgba(0, 113, 227, 0.12);
  filter: blur(80px);
  top: -120px;
  left: -100px;
  pointer-events: none;
  animation: ambientBlob 10s ease-in-out infinite;
}
.section:not(.section--alt) > * { position: relative; z-index: 1; }

@keyframes ambientBlob {
  0%   { transform: translate(0, 0)       scale(1);    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%; }
  25%  { transform: translate(80px, 40px)  scale(1.15); border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; }
  50%  { transform: translate(50px, 100px) scale(0.9);  border-radius: 40% 60% 50% 50% / 55% 45% 40% 60%; }
  75%  { transform: translate(-40px, 60px) scale(1.08); border-radius: 60% 40% 45% 55% / 50% 50% 60% 40%; }
  100% { transform: translate(0, 0)       scale(1);    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%; }
}

.section--alt {
  background: var(--gray-6);
  position: relative;
  overflow: hidden;
}
.section--alt::before {
  content: '';
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%;
  background: rgba(0, 113, 227, 0.16);
  filter: blur(80px);
  top: -200px;
  right: -120px;
  pointer-events: none;
  animation: sectionBlob1 8s ease-in-out infinite;
}
.section--alt::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 45% 55% 60% 40% / 55% 40% 60% 45%;
  background: rgba(120, 60, 220, 0.14);
  filter: blur(70px);
  bottom: -120px;
  left: -80px;
  pointer-events: none;
  animation: sectionBlob2 10s ease-in-out infinite;
  animation-delay: -3s;
}
.section--alt > * { position: relative; z-index: 1; }

@keyframes sectionBlob1 {
  0%   { transform: translate(0, 0)       scale(1)    rotate(0deg);  border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%; }
  30%  { transform: translate(-100px, 80px)  scale(1.18) rotate(15deg); border-radius: 40% 60% 55% 45% / 55% 45% 40% 60%; }
  60%  { transform: translate(-60px, 150px)  scale(0.88) rotate(-12deg); border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%; }
  100% { transform: translate(0, 0)       scale(1)    rotate(0deg);  border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%; }
}
@keyframes sectionBlob2 {
  0%   { transform: translate(0, 0)      scale(1)    rotate(0deg);   border-radius: 45% 55% 60% 40% / 55% 40% 60% 45%; }
  33%  { transform: translate(90px, -70px) scale(1.2)  rotate(-18deg); border-radius: 60% 40% 45% 55% / 45% 55% 40% 60%; }
  66%  { transform: translate(50px,-120px) scale(0.88) rotate(10deg);  border-radius: 50% 50% 55% 45% / 40% 60% 50% 50%; }
  100% { transform: translate(0, 0)      scale(1)    rotate(0deg);   border-radius: 45% 55% 60% 40% / 55% 40% 60% 45%; }
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--s7);
  color: var(--black);
}

.section__cta {
  text-align: center;
  margin-top: var(--s7);
}

/* ═══════════════════════════════════════════
   BUTTONS — Glassmorphic
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--r4);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    background .25s var(--ease),
    color .25s var(--ease),
    box-shadow .25s var(--ease),
    transform .18s var(--ease-spring),
    border-color .25s var(--ease);
}

/* Ripple element injected by JS */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.35);
  animation: rippleOut .55s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

.btn:active { transform: scale(0.96) translateY(1px); }

.btn--dark {
  background: var(--accent);
  color: var(--white);
  border: 1.5px solid transparent;
  box-shadow: 0 2px 12px rgba(0,113,227,.25), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn--dark:hover {
  background: var(--accent-h);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(0,113,227,.4), inset 0 1px 0 rgba(255,255,255,.25);
}

.btn--outline {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gray-1);
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 10px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,0.8);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,255,255,0.75);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,113,227,.15), inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-theme="dark"] .btn--outline {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: var(--gray-1);
  box-shadow: 0 2px 10px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
}
[data-theme="dark"] .btn--outline:hover {
  background: rgba(255,255,255,.10);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 6px 20px rgba(58,158,255,.2), inset 0 1px 0 rgba(255,255,255,.1);
}
[data-theme="dark"] .btn--dark .ripple { background: rgba(255,255,255,.2); }

.btn--lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.0625rem;
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-6);
  transition: box-shadow .3s var(--ease);
}

.nav--scrolled {
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-3);
  transition: color .2s var(--ease);
}
.nav__link:hover,
.nav__link.active {
  color: var(--black);
}
.nav__link.active {
  color: var(--accent);
}

.nav__resume {
  color: var(--accent);
  font-weight: 600;
}

/* Controls group (theme + hamburger) */
.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.nav__theme {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r4);
  font-size: 0.9375rem;
  color: var(--gray-3);
  background: transparent;
  transition: color .2s var(--ease), background .2s var(--ease), transform .3s var(--ease-spring);
}
.nav__theme:hover {
  color: var(--accent);
  background: var(--gray-6);
}
.nav__theme i {
  transition: transform .4s var(--ease-spring), opacity .25s var(--ease);
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--gray-1);
  border-radius: 1px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s10) var(--s5) var(--s9);
  position: relative;
  overflow: hidden;
}

/* Gradient blobs */
.hero__blob {
  position: absolute;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  will-change: transform, border-radius;
}

/* ── Blob 1 — blue, top-right ── */
.hero__blob--1 {
  width: 620px;
  height: 580px;
  background: rgba(0, 113, 227, 0.38);
  top: -160px;
  right: -100px;
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  animation: blob1Move 6s ease-in-out infinite;
}

/* ── Blob 2 — purple, bottom-left ── */
.hero__blob--2 {
  width: 500px;
  height: 520px;
  background: rgba(120, 60, 220, 0.32);
  bottom: -100px;
  left: -120px;
  border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%;
  animation: blob2Move 7s ease-in-out infinite;
  animation-delay: -2s;
}

/* ── Blob 3 — teal, mid-left ── */
.hero__blob--3 {
  width: 380px;
  height: 400px;
  background: rgba(0, 200, 180, 0.28);
  top: 35%;
  left: 5%;
  border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%;
  animation: blob3Move 8s ease-in-out infinite;
  animation-delay: -4s;
}

/* Each blob gets its own path — no two move the same way */
@keyframes blob1Move {
  0%   { transform: translate(0,     0)     scale(1)    rotate(0deg);   border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
  20%  { transform: translate(-80px,  60px)  scale(1.15) rotate(14deg);  border-radius: 40% 60% 45% 55% / 55% 45% 60% 40%; }
  40%  { transform: translate(-40px,  120px) scale(0.9)  rotate(-10deg); border-radius: 55% 45% 60% 40% / 40% 60% 50% 50%; }
  60%  { transform: translate(70px,   70px)  scale(1.2)  rotate(18deg);  border-radius: 50% 50% 40% 60% / 60% 40% 55% 45%; }
  80%  { transform: translate(110px, -50px)  scale(1.08) rotate(-8deg);  border-radius: 45% 55% 50% 50% / 50% 50% 45% 55%; }
  100% { transform: translate(0,     0)     scale(1)    rotate(0deg);   border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; }
}

@keyframes blob2Move {
  0%   { transform: translate(0,    0)      scale(1)    rotate(0deg);   border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
  25%  { transform: translate(100px, -80px)  scale(1.18) rotate(-18deg); border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
  50%  { transform: translate(60px, -140px)  scale(0.88) rotate(12deg);  border-radius: 50% 50% 60% 40% / 55% 45% 50% 50%; }
  75%  { transform: translate(-60px, -80px)  scale(1.12) rotate(-8deg);  border-radius: 55% 45% 45% 55% / 40% 60% 55% 45%; }
  100% { transform: translate(0,    0)      scale(1)    rotate(0deg);   border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
}

@keyframes blob3Move {
  0%   { transform: translate(0,    0)     scale(1)    rotate(0deg);   border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; }
  16%  { transform: translate(90px, -60px)  scale(1.2)  rotate(20deg);  border-radius: 40% 60% 50% 50% / 55% 45% 60% 40%; }
  33%  { transform: translate(140px, 50px)  scale(0.85) rotate(-14deg); border-radius: 60% 40% 45% 55% / 40% 60% 45% 55%; }
  50%  { transform: translate(70px,  120px) scale(1.15) rotate(8deg);   border-radius: 50% 50% 55% 45% / 60% 40% 50% 50%; }
  66%  { transform: translate(-50px, 90px)  scale(0.92) rotate(-12deg); border-radius: 45% 55% 40% 60% / 50% 50% 55% 45%; }
  83%  { transform: translate(-100px,-30px) scale(1.1)  rotate(16deg);  border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%; }
  100% { transform: translate(0,    0)     scale(1)    rotate(0deg);   border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; }
}

.hero__inner {
  max-width: 720px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__greeting {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--s2);
  letter-spacing: 0.02em;
}

.hero__name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--black);
  margin-bottom: var(--s5);
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--gray-2);
  line-height: 1.45;
  margin-bottom: var(--s3);
  min-height: 1.5em;
}

.hero__rotate {
  color: var(--black);
  font-weight: 600;
}

.hero__rotate .rotate-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursorBlink .55s step-end infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.hero__sub {
  font-size: 0.9375rem;
  color: var(--gray-4);
  margin-bottom: var(--s6);
}

.hero__actions {
  display: flex;
  gap: var(--s4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Hero scroll indicator ───────────────── */
.hero__scroll {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gray-3);
  opacity: 0;
  text-decoration: none;
  line-height: 0;
  transition: color .25s;
  z-index: 2;
}
.hero__scroll svg {
  width: 22px;
  height: 36px;
}
.hero__scroll:hover { color: var(--accent); }
.hero.animate .hero__scroll {
  animation: heroFade .8s var(--ease-out) 1.1s forwards;
}
@keyframes heroFade {
  to { opacity: 0.65; }
}
.hero__scroll-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0);    opacity: 1; }
  55%       { transform: translateY(13px); opacity: 0; }
}

/* ═══════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════ */
.about {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--s8);
  align-items: start;
}

.about__text p {
  font-size: 1.0625rem;
  color: var(--gray-2);
  margin-bottom: var(--s5);
  line-height: 1.7;
}

.about__highlight {
  font-weight: 600;
  color: var(--accent);
}

.about__facts {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.role-group__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s3);
}

.about__seeking-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0;
}

.role-card {
  padding: var(--s4) var(--s5);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 2px 12px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,0.9);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease-spring), border-color .25s var(--ease);
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,113,227,.12), inset 0 1px 0 rgba(255,255,255,.9);
  border-color: rgba(0,113,227,.3);
}

.role-card__icon {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: var(--s2);
}

.role-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}

.role-card__sub {
  font-size: 0.8125rem;
  color: var(--gray-3);
  font-weight: 400;
}

/* ═══════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════ */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s5);
}

.skill-group {
  padding: var(--s6);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
}

.skill-group__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--s4);
  color: var(--black);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.skill-group__title i {
  color: var(--accent);
  font-size: 1.125rem;
}

/* Tags (shared by skills + projects) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.tags span {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-2);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--r4);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 1px 6px rgba(0,0,0,.05), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: none;
}
/* tags span hover intentionally removed for skills section */
[data-theme="dark"] .tags span {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: var(--gray-2);
}

/* ═══════════════════════════════════════════
   EXPERIENCE / EDUCATION SPLIT
   ═══════════════════════════════════════════ */
.exp-edu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7) var(--s8);
  align-items: start;
}
.exp-edu__heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--s5);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.exp-edu__heading i {
  color: var(--accent);
  font-size: 0.875rem;
}
@media (max-width: 720px) {
  .exp-edu {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: var(--s7);
  max-width: 100%;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--gray-5);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--s7);
}
.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--s7) + 2px);
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline__dot--muted {
  background: var(--gray-5);
}

.timeline__card {
  padding: var(--s5);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--r2);
  box-shadow: 0 4px 18px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,0.85);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease-spring), border-color .3s var(--ease);
}
.timeline__card:hover {
  box-shadow: 0 10px 36px rgba(0,113,227,.13), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateX(6px) translateY(-2px);
  border-color: rgba(0,113,227,.25);
}

.timeline__date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gray-4);
  margin-bottom: var(--s2);
}

.timeline__card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: var(--s1);
}
.timeline__card h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-3);
  margin-bottom: var(--s3);
}
.timeline__card p {
  font-size: 0.9375rem;
  color: var(--gray-2);
  line-height: 1.65;
  margin-bottom: var(--s3);
}
.timeline__card p:last-child {
  margin-bottom: 0;
}
.timeline__card ul {
  padding-left: var(--s5);
  list-style: disc;
  margin-bottom: var(--s3);
}
.timeline__card ul:last-child {
  margin-bottom: 0;
}
.timeline__card li {
  font-size: 0.875rem;
  color: var(--gray-2);
  line-height: 1.6;
  margin-bottom: var(--s2);
}

/* ═══════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════ */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s5);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--r2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .2s var(--ease);
}
.project-card:hover {
  box-shadow: 0 12px 40px rgba(0,113,227,0.14), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateY(-3px);
}

.project-card__cover {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-6);
  flex-shrink: 0;
  transition: transform .4s var(--ease);
  transform-origin: center;
}
.project-card:hover .project-card__cover {
  transform: scale(1.04);
}

.project-card__body {
  padding: var(--s5) var(--s5) var(--s4);
  flex: 1;
}

.project-card__body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: var(--s3);
}
.project-card__body p {
  font-size: 0.875rem;
  color: var(--gray-2);
  line-height: 1.6;
  margin-bottom: var(--s4);
}

.project-card__links {
  display: flex;
  gap: var(--s3);
  padding: var(--s3) var(--s5) var(--s5);
  border-top: 1px solid var(--gray-6);
}
.project-card__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-3);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.project-card__links a:hover {
  color: var(--accent);
}

.contact-container {
  max-width: 1320px;
}

/* ═══════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════ */
.contact {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--r3);
  box-shadow: 0 12px 48px rgba(0,0,0,.09), inset 0 1px 0 rgba(255,255,255,0.95);
  padding: var(--s8);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: var(--s8);
  row-gap: var(--s7);
  align-items: start;
}
/* subtle accent glow in corner */
.contact::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0,113,227,.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ─ QR code panel ─────────────────────── */
.contact__qr {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  align-self: center;
}
.contact__qr-wrap {
  display: block;
  padding: var(--s3);
  border-radius: var(--r2);
  border: 1px solid var(--gray-5);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.contact__qr-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,113,227,.15);
  border-color: rgba(0,113,227,.3);
}
.contact__qr-img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 6px;
}
.contact__qr-label {
  font-size: 0.75rem;
  color: var(--gray-4);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--s1);
}
[data-theme="dark"] .contact__qr-wrap {
  background: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.15);
}

/* ─ Status badge ─────────────────────── */
.contact__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #16a34a;
  background: rgba(22,163,74,.1);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: var(--r4);
  padding: 0.3rem 0.85rem;
  margin-bottom: var(--s5);
}
[data-theme="dark"] .contact__status {
  color: #4ade80;
  background: rgba(74,222,128,.1);
  border-color: rgba(74,222,128,.2);
}
.contact__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22,163,74,.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
[data-theme="dark"] .contact__status-dot { background: #4ade80; box-shadow: 0 0 0 2px rgba(74,222,128,.25); }
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: .7; }
}

/* ─ Head ───────────────────────────── */
.contact__head {
  max-width: 600px;
}
.contact__headline {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--s4);
}
.contact__intro {
  font-size: 1rem;
  color: var(--gray-2);
  line-height: 1.7;
  max-width: 520px;
}

/* ─ Bottom row ─────────────────────── */
.contact__bottom {
  display: flex;
  align-items: center;
  gap: var(--s7);
  flex-wrap: wrap;
}

/* Email block */
.contact__email-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  group: email;
}
.contact__email-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact__email-addr {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: var(--s2);
  transition: gap .2s var(--ease), color .2s var(--ease);
}
.contact__email-addr i {
  font-size: 0.875rem;
  transition: transform .2s var(--ease-spring);
}
.contact__email-link:hover .contact__email-addr {
  color: var(--accent);
  gap: var(--s3);
}
.contact__email-link:hover .contact__email-addr i {
  transform: translateX(4px);
}

/* Divider */
.contact__divider {
  width: 1px;
  height: 48px;
  background: var(--gray-5);
  flex-shrink: 0;
}

/* Social pills grid */
.contact__socials-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.contact__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.5rem 1rem;
  border-radius: var(--r4);
  border: 1px solid var(--gray-5);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-2);
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease-spring), box-shadow .2s var(--ease);
}
.contact__pill i {
  font-size: 1rem;
  color: var(--gray-3);
  transition: color .2s var(--ease);
}
.contact__pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,113,227,.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,113,227,.12);
}
.contact__pill:hover i {
  color: var(--accent);
}
[data-theme="dark"] .contact {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 48px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .contact::before {
  background: radial-gradient(circle, rgba(58,158,255,.12) 0%, transparent 70%);
}
[data-theme="dark"] .contact__pill {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: var(--gray-2);
}
[data-theme="dark"] .contact__pill:hover {
  background: rgba(58,158,255,.1);
  border-color: rgba(58,158,255,.35);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  border-top: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--s5) 0;
}
[data-theme="dark"] .footer {
  background: rgba(0,0,0,.5);
  border-top-color: rgba(255,255,255,.06);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--gray-4);
}

.footer__top {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r4);
  font-size: 0.875rem;
  color: var(--gray-3);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 2px 8px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,0.85);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease-spring), box-shadow .2s var(--ease);
}
.footer__top:hover {
  background: var(--accent);
  color: var(--white);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,113,227,.3);
}
[data-theme="dark"] .footer__top {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.1);
}

/* ═══════════════════════════════════════════
   APPLE-STYLE ANIMATIONS
   ═══════════════════════════════════════════ */

/* ── Hero entrance cascade ───────────────── */
.hero__greeting,
.hero__name,
.hero__tagline,
.hero__sub,
.hero__actions {
  opacity: 0;
  transform: translateY(30px);
}
.hero.animate .hero__greeting { animation: heroIn .8s var(--ease-out) .1s forwards; }
.hero.animate .hero__name     { animation: heroIn .8s var(--ease-out) .25s forwards; }
.hero.animate .hero__tagline  { animation: heroIn .4s var(--ease-out) .4s forwards; }
.hero.animate .hero__sub      { animation: heroIn .8s var(--ease-out) .55s forwards; }
.hero.animate .hero__actions  { animation: heroIn .8s var(--ease-out) .7s forwards; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Scroll reveal — fade up ─────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Staggered children ──────────────────── */
.stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.stagger.revealed > * { opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(1)  { transition-delay: .05s; }
.stagger.revealed > *:nth-child(2)  { transition-delay: .12s; }
.stagger.revealed > *:nth-child(3)  { transition-delay: .19s; }
.stagger.revealed > *:nth-child(4)  { transition-delay: .26s; }
.stagger.revealed > *:nth-child(5)  { transition-delay: .33s; }
.stagger.revealed > *:nth-child(6)  { transition-delay: .40s; }

/* ── Slide in from left (timeline) ────────── */
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ── Scale in (cards) ─────────────────────── */
.reveal-scale {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ── Role cards pop in ────────────────────── */
.role-card {
  opacity: 0;
  transform: translateY(20px) scale(.95);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-spring), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.facts-animated .role-card { opacity: 1; transform: translateY(0) scale(1); }
.facts-animated .role-group:nth-child(1) .role-card:nth-child(1) { transition-delay: .06s; }
.facts-animated .role-group:nth-child(1) .role-card:nth-child(2) { transition-delay: .12s; }
.facts-animated .role-group:nth-child(2) .role-card:nth-child(1) { transition-delay: .18s; }
.facts-animated .role-group:nth-child(2) .role-card:nth-child(2) { transition-delay: .24s; }
.facts-animated .role-group:nth-child(3) .role-card:nth-child(1) { transition-delay: .30s; }
.facts-animated .role-group:nth-child(3) .role-card:nth-child(2) { transition-delay: .36s; }

/* ── Section title underline draw ─────────── */
.section__title {
  position: relative;
  display: inline-block;
}
.section__title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .6s var(--ease-out) .15s;
}
.revealed .section__title::after,
.reveal.revealed > .container > .section__title::after {
  width: 40px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__controls { display: flex; }

  /* Remove backdrop-filter on mobile — it makes nav a containing block
     for fixed children in Chrome, causing the transparency bug */
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
  }
  [data-theme="dark"] .nav {
    background: #0a0a0a;
  }

  .nav__menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s6);
    gap: var(--s4);
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    z-index: 9998;
  }
  [data-theme="dark"] .nav__menu {
    background: #0a0a0a;
  }
  .nav__menu.open {
    transform: translateX(0);
  }

  .recs {
    grid-template-columns: 1fr;
  }
  .about {
    grid-template-columns: 1fr;
    gap: var(--s6);
  }
  .about__facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: var(--s6);
    gap: var(--s6);
  }
  .contact__qr {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--s4);
  }
  .contact__qr-img { width: 100px; height: 100px; }
  .contact__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s5);
  }
  .contact__divider { display: none; }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  .projects {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__name {
    font-size: 2.5rem;
  }

  .about__facts {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--s4);
    text-align: center;
  }
}

/* System dark-mode preference (no JS) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --black:   #f5f5f7;
    --gray-1:  #e8e8ed;
    --gray-2:  #aeaeb2;
    --gray-3:  #8e8e93;
    --gray-4:  #636366;
    --gray-5:  #3a3a3c;
    --gray-6:  #1c1c1e;
    --white:   #000000;
    --accent:   #3a9eff;
    --accent-h: #5aafff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
    --shadow:    0 2px 10px rgba(0,0,0,.6);
    --shadow-md: 0 4px 20px rgba(0,0,0,.7);
    --shadow-lg: 0 8px 36px rgba(0,0,0,.8);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
