/* ==========================================================================
   Zain Muhammad — Portfolio
   ========================================================================== */

:root {
  --bg: #07090a;
  --bg-2: #0b0f10;
  --surface: #0f1415;
  --surface-2: #151c1d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1ef;
  --text-2: #c4cbc9;
  --muted: #8e9896;
  --brand-1: #f2fd7d;
  --brand-2: #0f9e99;
  --brand-3: #37d3c4;
  --grad: linear-gradient(100deg, var(--brand-1) 0%, #9fe39a 45%, var(--brand-2) 100%);
  --ring: 0 0 0 3px rgba(242, 253, 125, 0.45);

  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
strong { font-weight: 600; color: var(--text); }
::selection { background: var(--brand-1); color: #0b0f10; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--brand-1); color: #0b0f10; font-weight: 600;
  transform: translateY(-160%); transition: transform .25s var(--ease-out);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.grad-text, .section-title .serif, .hero-title .serif, .contact-title .serif {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Ambient background ---------- */
@property --c1 { syntax: "<color>"; inherits: true; initial-value: #0f9e99; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #b6c94a; }
@property --c3 { syntax: "<color>"; inherits: true; initial-value: #0d6b67; }
/* Colors are driven by JS per section (--c1..--c3), the pointer (--mx/--my, px/py for parallax) */
.bg-aurora {
  --c1: #0f9e99; --c2: #b6c94a; --c3: #0d6b67;
  --mx: 50vw; --my: -20vh; --px: 0; --py: 0;
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  transition: --c1 1.6s var(--ease-in-out), --c2 1.6s var(--ease-in-out), --c3 1.6s var(--ease-in-out);
}
.bg-aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%),
    radial-gradient(260px circle at var(--mx) var(--my), rgba(0,0,0,.9), transparent 70%);
          mask-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%),
    radial-gradient(260px circle at var(--mx) var(--my), rgba(0,0,0,.9), transparent 70%);
}
.bg-aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32;
  will-change: transform; animation: drift 22s var(--ease-in-out) infinite alternate;
  transition: background-color 1.6s var(--ease-in-out), translate 1.2s var(--ease-out);
}
.bg-aurora span:nth-child(1) { width: 520px; height: 520px; top: -180px; left: -120px; background-color: var(--c1); translate: calc(var(--px) * 60px) calc(var(--py) * 40px); }
.bg-aurora span:nth-child(2) { width: 420px; height: 420px; top: -120px; right: -100px; background-color: var(--c2); opacity: .2; animation-duration: 26s; translate: calc(var(--px) * -80px) calc(var(--py) * 50px); }
.bg-aurora span:nth-child(3) { width: 380px; height: 380px; top: 55vh; left: 40%; background-color: var(--c3); opacity: .2; animation-duration: 30s; translate: calc(var(--px) * 100px) calc(var(--py) * -70px); }
/* Soft colour glow that trails the cursor */
.aurora-cursor {
  position: absolute; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c1) 55%, transparent) 0%, color-mix(in srgb, var(--c2) 22%, transparent) 38%, transparent 68%);
  opacity: 0; transform: translate3d(var(--mx), var(--my), 0);
  transition: opacity .6s, background 1.6s var(--ease-in-out);
  will-change: transform;
}
.bg-aurora.is-active .aurora-cursor { opacity: .55; }
/* Click ripple */
.aurora-ripple {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1px solid var(--c2); background: radial-gradient(circle, color-mix(in srgb, var(--c1) 35%, transparent), transparent 70%);
  animation: ripple 1.1s var(--ease-out) forwards;
}
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(9); opacity: 0; } }
@media (hover: none) { .aurora-cursor { display: none; } }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 14px; --pad-x: 22px;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1; white-space: nowrap;
  transition: transform .35s var(--ease-out), background-color .25s, border-color .25s, color .25s, box-shadow .35s;
}
.btn-sm { --pad-y: 10px; --pad-x: 18px; font-size: .88rem; }
.btn-primary { background: var(--text); color: #0b0f10; }
.btn-primary:hover { background: var(--brand-1); box-shadow: 0 10px 40px -10px rgba(242,253,125,.55); }
.btn-ghost { background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: rgba(242,253,125,.5); background: rgba(242,253,125,.06); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-icon {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 26px; height: 26px; border-radius: 50%;
  background: #0b0f10; color: var(--text);
}
.btn-outline .btn-icon { background: var(--text); color: #0b0f10; }
.btn-icon .icon { width: 13px; height: 13px; transition: transform .45s var(--ease-out); }
.btn-icon .icon-copy { position: absolute; transform: translate(-150%, 150%); }
.btn:hover .btn-icon .icon:not(.icon-copy) { transform: translate(150%, -150%); }
.btn:hover .btn-icon .icon-copy { transform: none; }

.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; }
.pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid #3ddc84; animation: ping 1.8s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 9, 10, .72);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; margin-right: auto; }
.brand-mark {
  position: relative; display: block; width: 38px; height: 38px; border-radius: 50%; padding: 2px; flex-shrink: 0;
  background: var(--grad);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.brand-mark img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 0 4px rgba(242,253,125,.12); }
.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav a {
  position: relative; display: block; padding: 8px 12px; border-radius: 999px;
  font-size: .9rem; color: var(--text-2); transition: color .2s, background-color .2s;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav a.is-active { color: var(--text); background: rgba(255,255,255,.08); }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong); place-items: center; }
.nav-toggle .icon { width: 20px; height: 20px; }

@media (max-width: 1024px) {
  .header-cta { display: none; }
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; z-index: 99;
    padding: 12px var(--gutter) 24px;
    background: rgba(7, 9, 10, .96);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .35s var(--ease-out), opacity .25s, visibility .35s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; }
  body.nav-open .site-header { background: rgba(7, 9, 10, .96); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + clamp(40px, 8vw, 88px)) 0 clamp(48px, 7vw, 80px); text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; max-width: 960px; }
.hero-avatar { position: relative; margin-bottom: 22px; }
.avatar-ring {
  position: relative; width: 112px; height: 112px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from var(--angle, 0deg), var(--brand-1), var(--brand-2), transparent 60%, var(--brand-1));
  animation: spin 6s linear infinite;
}
.avatar-ring img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 25%;
  background: var(--surface-2); border: 3px solid var(--bg);
  animation: spin 6s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-dot {
  position: absolute; right: 6px; bottom: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: #3ddc84; border: 3px solid var(--bg);
}
.eyebrow-pill {
  display: inline-flex; gap: 8px; align-items: center; padding: 7px 16px; margin-bottom: 26px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(255,255,255,.03);
  font-size: .85rem; color: var(--text-2); letter-spacing: .01em;
}
.eyebrow-pill span { color: var(--brand-1); }
.hero-title {
  font-size: clamp(2.1rem, 5.6vw, 4.4rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-title .serif { font-size: 1.08em; padding-right: .06em; }
.hero-sub { margin-top: 22px; max-width: 620px; color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.15rem); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; margin-top: 28px; }
.social-list a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-2);
  transition: transform .35s var(--ease-out), border-color .25s, color .25s, background-color .25s;
}
.social-list a:hover { transform: translateY(-3px); color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,.07); }
.social-list .icon { width: 17px; height: 17px; }
.social-list img { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; }
.social-list--sm a { width: 38px; height: 38px; }

/* Brands marquee */
.brands { margin-top: clamp(48px, 8vw, 80px); }
.brands-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin-bottom: 18px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; list-style: none; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
/* Uniform cards; each logo's width/height attributes are pre-balanced for equal visual weight */
.logo-chip {
  display: grid; place-items: center; width: 184px; height: 72px; padding: 0 18px; flex-shrink: 0;
  border-radius: 16px; background: linear-gradient(180deg, #ffffff, #eef2f0);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.06), 0 8px 24px -16px rgba(0,0,0,.6);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.logo-chip:hover { transform: translateY(-3px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.06), 0 14px 30px -14px rgba(15,158,153,.55); }
.logo-chip--dark { background: linear-gradient(180deg, #1a2224, #111718); }
.logo-chip img { max-width: 100%; max-height: 50px; object-fit: contain; transition: transform .4s var(--ease-out); }
.logo-chip:hover img { transform: scale(1.06); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(72px, 10vw, 128px); }
.section + .section { border-top: 1px solid var(--border); }
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--sub { margin-top: clamp(64px, 8vw, 96px); margin-bottom: 32px; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .2em; color: var(--brand-1);
}
.kicker::before, .kicker::after { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .5; }
.section-title { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.section-title .serif { font-size: 1.1em; }
.section-title--sm { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.center-cta { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Cards (with cursor spotlight) ---------- */
.card {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .45s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242,253,125,.09), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.card:hover { border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-role { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; letter-spacing: -0.015em; }
.role-rotator { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 22px; }
.role-bar { width: 3px; height: 28px; margin-top: 2px; border-radius: 3px; background: var(--grad); flex-shrink: 0; }
.roles { position: relative; list-style: none; flex: 1; min-height: 1.6em; }
.roles li {
  font-size: clamp(1rem, 1.8vw, 1.2rem); font-weight: 600; line-height: 1.5;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.js .roles li { position: absolute; inset: 0 0 auto; opacity: 0; transform: translateY(14px); filter: blur(4px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), filter .6s var(--ease-out); }
.js .roles li.is-active { position: relative; opacity: 1; transform: none; filter: none; }
.js .roles li.is-leaving { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
.roles li:not(:first-child) { display: none; }
.js .roles li:not(:first-child) { display: block; }
.lead { font-size: 1.08rem; color: var(--text-2); }
.lead + .lead { margin-top: 14px; }
.hl { color: var(--text); background: linear-gradient(transparent 62%, rgba(15,158,153,.35) 62%); padding-inline: 2px; }

.stats { display: grid; gap: 14px; list-style: none; }
.stat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 22px 26px; }
.stat-num {
  font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--muted); font-size: .95rem; text-align: right; }

/* Featured */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { display: flex; flex-direction: column; gap: 18px; padding: 16px 16px 22px; }
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(15,158,153,.45); }
.feature-logo {
  display: grid; place-items: center; height: 170px; border-radius: 12px;
  background: radial-gradient(120% 120% at 0% 0%, #ffffff 0%, #eef6f3 55%, #dff1ea 100%);
  overflow: hidden;
}
.feature-logo img { width: auto; max-width: 62%; max-height: 64px; transition: transform .6s var(--ease-out); }
.feature-card:hover .feature-logo img { transform: scale(1.07); }
.feature-title { padding-inline: 6px; font-size: 1.05rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.feature-card .pills { padding-inline: 6px; }
.corner-arrow {
  position: absolute; top: 28px; right: 28px; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; background: #0b0f10; color: #fff;
  transition: transform .45s var(--ease-out), background-color .3s;
}
.corner-arrow .icon { width: 15px; height: 15px; }
.feature-card:hover .corner-arrow { transform: rotate(45deg); background: var(--brand-2); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.pills li {
  padding: 5px 11px; border-radius: 999px; font-size: .76rem; line-height: 1.3;
  color: var(--text-2); background: rgba(255,255,255,.05); border: 1px solid var(--border);
}
.pills--sm li { font-size: .75rem; padding: 4px 9px; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; list-style: none; display: grid; gap: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(var(--brand-1), var(--brand-2) 60%, transparent);
  opacity: .45;
}
.timeline-item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start; }
.timeline-logo {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: #f4f6f5;
  border: 1px solid var(--border-strong); box-shadow: 0 0 0 6px var(--bg);
}
.timeline-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.timeline-card { padding: 22px 24px; }
.timeline-card header { display: grid; gap: 2px; }
.timeline-card header + p { margin-top: 12px; color: var(--text-2); }
.t-date { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-1); }
.t-role { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.t-company { color: var(--muted); font-size: .95rem; }

/* ---------- Tabs & skills ---------- */
.tab-list {
  position: relative; display: flex; width: max-content; max-width: 100%; margin: 0 auto 32px;
  padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.tab {
  position: relative; z-index: 1; padding: 11px 22px; border-radius: 999px;
  font-size: .92rem; font-weight: 600; color: var(--muted); transition: color .3s;
}
.tab[aria-selected="true"] { color: #0b0f10; }
.tab-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; border-radius: 999px; background: var(--text);
  transition: transform .5s var(--ease-out), width .5s var(--ease-out);
}
.tab-panel { animation: panelIn .6s var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; }
.skill { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; font-weight: 500; line-height: 1.45; }
.skill:hover { transform: translateY(-3px); }
.skill-no { font-family: var(--font-serif); font-style: italic; font-size: 1.35rem; line-height: 1; color: var(--brand-1); }
.skill-grid--detail .skill strong { font-size: 1.02rem; }
.skill-grid--detail .skill span:last-child { color: var(--muted); font-size: .92rem; font-weight: 400; }

.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; list-style: none; }
.stack {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  font-size: .82rem; color: var(--text-2); text-align: center;
  transition: transform .4s var(--ease-out), border-color .3s, background-color .3s;
}
.stack:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.stack img { width: 38px; height: 38px; object-fit: contain; }
.stack--wide img { width: 76px; }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; }
.service { padding: 30px 28px 32px; overflow: hidden; }
.service:hover { transform: translateY(-6px); }
.service-no { position: absolute; top: 22px; right: 26px; font-family: var(--font-serif); font-style: italic; font-size: 2.6rem; line-height: 1; color: rgba(255,255,255,.08); transition: color .4s; }
.service:hover .service-no { color: rgba(242,253,125,.35); }
.service-icon {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 22px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(242,253,125,.16), rgba(15,158,153,.2)); color: var(--brand-1);
  border: 1px solid rgba(242,253,125,.18);
}
.service-icon .icon { width: 22px; height: 22px; }
.service h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
.service p { color: var(--text-2); font-size: .96rem; }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 36px; }
.filter {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  font-size: .9rem; font-weight: 500; color: var(--text-2);
  transition: background-color .25s, color .25s, border-color .25s;
}
.filter:hover { color: var(--text); border-color: var(--text-2); }
.filter.is-active { background: var(--text); color: #0b0f10; border-color: var(--text); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; }
.project[hidden] { display: none; }
.project.is-entering { animation: projectIn .6s var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes projectIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.project article { height: 100%; display: flex; flex-direction: column; }
.project-media {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border);
  aspect-ratio: 4 / 3; background: var(--surface-2);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), filter .5s; }
.project:hover .project-media img { transform: scale(1.06); filter: brightness(.55); }
.project-actions {
  position: absolute; inset: auto 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .45s var(--ease-out);
}
.project:hover .project-actions, .project:focus-within .project-actions { opacity: 1; transform: none; }
.icon-btn, .chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; border-radius: 999px; background: rgba(255,255,255,.95); color: #0b0f10; font-weight: 600; font-size: .85rem;
  transition: background-color .25s, transform .35s var(--ease-out);
}
.icon-btn { width: 40px; }
.chip-btn { padding-inline: 16px; }
.icon-btn:hover, .chip-btn:hover { background: var(--brand-1); transform: translateY(-2px); }
.icon-btn .icon, .chip-btn .icon { width: 15px; height: 15px; }
.project-body { padding: 16px 4px 0; }
.project-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.project-title { margin-top: 2px; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.project-body .pills { margin-top: 10px; }

@media (hover: none) {
  .project-actions { opacity: 1; transform: none; }
  .project .project-media img { filter: brightness(.85); }
}

/* ---------- Testimonials ---------- */
.quotes { position: relative; columns: 3 320px; column-gap: 18px; }
.quote { break-inside: avoid; margin-bottom: 18px; padding: 26px 24px 22px; }
.quote::after {
  content: "\201C"; position: absolute; top: 6px; right: 20px;
  font-family: var(--font-serif); font-size: 4.5rem; line-height: 1; color: rgba(242,253,125,.14);
}
.quote blockquote p { color: var(--text-2); font-size: .97rem; line-height: 1.7; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.quote figcaption img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.quote figcaption span { display: grid; line-height: 1.3; }
.quote cite { font-style: normal; font-weight: 600; font-size: .95rem; }
.quote small { color: var(--muted); font-size: .82rem; }
.quote small a { text-decoration: underline; text-underline-offset: 2px; }
.js .quotes.is-collapsed .quote.is-extra { display: none; }
.js .quotes.is-collapsed::after {
  content: ""; position: absolute; inset: auto 0 0; height: 120px; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}
.no-js [data-quotes-toggle] { display: none; }

/* ---------- Resume ---------- */
.resume-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.resume-heading {
  display: flex; align-items: center; gap: 10px; margin: 36px 0 16px;
  font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em;
}
.resume-col > .resume-heading:first-child { margin-top: 0; }
.resume-heading .icon { width: 20px; height: 20px; color: var(--brand-1); }
.resume-card { padding: 24px 26px; }
.resume-card + .resume-card { margin-top: 16px; }
.resume-card h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.resume-card p { color: var(--text-2); margin-top: 10px; }
.resume-card .r-meta {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; color: var(--brand-1); background: rgba(242,253,125,.08); border: 1px solid rgba(242,253,125,.18);
}
.resume-card .r-sub { margin-top: 16px; font-size: 1rem; color: var(--text-2); }
.resume-card .r-org { color: var(--muted); font-style: italic; }
.resume-card .r-org a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.r-label { margin: 22px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--brand-1); }
.contact-list { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.contact-list li { display: flex; align-items: center; gap: 10px; min-height: 28px; color: var(--text-2); }
.contact-list a, .footer-links a { display: inline-block; padding-block: 4px; }
.contact-list .icon { color: var(--brand-1); }
.contact-list a:hover { color: var(--text); }

.achievements, .bullets { list-style: none; display: grid; gap: 12px; margin-top: 12px; color: var(--text-2); font-size: .96rem; }
.achievements > li, .bullets > li { position: relative; padding-left: 20px; }
.achievements > li::before, .bullets > li::before {
  content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad);
}
.achievements ul, .bullets ol { display: grid; gap: 6px; margin-top: 8px; padding-left: 18px; }
.achievements ul { list-style: circle; }
.a-title { display: block; color: var(--text); }

.cert-list { list-style: none; display: grid; grid-template-columns: 1fr; gap: 10px; }
.cert { padding: 16px 20px; }
.cert h4 { font-size: .98rem; font-weight: 600; line-height: 1.35; }
.cert .r-meta { font-size: .78rem; color: var(--brand-1); margin-top: 4px; }
.cert .r-org { font-size: .86rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(15,158,153,.28), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(242,253,125,.10), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
}
.contact-title { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.contact-title .serif { font-size: 1.08em; }
.contact-sub { margin-top: 20px; color: var(--text-2); }
.contact-mail {
  display: inline-block; margin-top: 8px; font-size: clamp(1.3rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.02em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .5s var(--ease-out); word-break: break-word;
}
.contact-mail:hover { background-size: 100% 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 32px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px 32px; }
.footer-logo {
  display: block; width: 52px; height: 52px; border-radius: 50%; padding: 2px; background: var(--grad);
  transition: transform .45s var(--ease-out);
}
.footer-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.footer-logo:hover { transform: translateY(-3px) rotate(-6deg); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; color: var(--text-2); font-size: .92rem; }
.footer-links a:hover { color: var(--text); }
.site-footer .social-list { margin-top: 0; }
.copyright { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--text); color: #0b0f10;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .4s var(--ease-out), visibility .3s, background-color .25s;
}
.to-top .icon { transform: rotate(-45deg); width: 18px; height: 18px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-1); }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--delay, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .featured-grid, .service-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat-label { text-align: left; }
  .resume-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  :root { --header-h: 64px; }
  .featured-grid, .service-grid, .project-grid, .skill-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { flex-direction: row; align-items: baseline; }
  .stat-label { text-align: right; }
  .brand-name { font-size: .95rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; margin-inline: auto; }
  .hero-ctas .btn { justify-content: center; }
  .logo-chip { width: 148px; height: 60px; padding: 0 14px; }
  .logo-chip img { transform: scale(.82); }
  .tab { padding: 10px 14px; font-size: .85rem; }
  .timeline::before { left: 21px; }
  .timeline-item { grid-template-columns: 44px 1fr; gap: 14px; }
  .timeline-logo { width: 44px; height: 44px; border-radius: 12px; }
  .timeline-card, .resume-card { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .site-footer .social-list { justify-content: flex-start; }
  .quotes { columns: 1; }
  .stack-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .stack { padding: 16px 8px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .aurora-cursor, .aurora-ripple { display: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .bg-aurora, .scroll-progress, .to-top, .filters, .project-actions, .marquee, .hero-ctas, [data-quotes-toggle] { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; background: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .quotes.is-collapsed .quote.is-extra { display: block; }
  .tab-panel[hidden] { display: block !important; }
}

/* Without JavaScript, show every skills panel */
.no-js .tab-panel[hidden] { display: block; }
.no-js .tab-list { display: none; }
