/* =============================================================================
   Esther Sanusi — Portfolio
   Design system: dark default, single violet accent, Space Grotesk display.
   Spacing on a 4/8px grid. Animations only on transform/opacity.
============================================================================= */

/* ---------------------------------- TOKENS --------------------------------- */
:root {
  /* Accent — refined royal purple, committed throughout */
  --accent: #a06bff;
  --accent-2: #c98bff;
  --accent-soft: rgba(160, 107, 255, 0.16);
  --accent-glow: rgba(160, 107, 255, 0.42);

  /* Dark theme (default) — subtle purple undertone */
  --bg: #0a0812;
  --bg-2: #0f0c1a;
  --surface: #15111f;
  --surface-2: #1c1729;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(168, 130, 255, 0.18);
  --text: #f5f3fb;
  --text-dim: #c8c4d6;
  --text-mute: #8c869c;

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing scale (4/8px grid) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem; --s-8: 2rem; --s-12: 3rem; --s-16: 4rem; --s-24: 6rem;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f7f5fc;
  --bg-2: #efebf8;
  --surface: #ffffff;
  --surface-2: #f3f0fa;
  --border: rgba(20, 12, 40, 0.10);
  --border-strong: rgba(120, 80, 220, 0.22);
  --text: #16111f;
  --text-dim: #3c3548;
  --text-mute: #6a6378;
  --accent: #7c4dff;
  --accent-soft: rgba(124, 77, 255, 0.12);
}

/* ---------------------------------- RESET ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; }
svg { stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-6); }
.section { padding-block: var(--s-24); position: relative; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: var(--s-2) var(--s-4); border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------- TYPOGRAPHY -------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-4);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: var(--s-6);
}
.section-lead { color: var(--text-dim); max-width: 56ch; font-size: 1.05rem; }

/* --------------------------------- BUTTONS --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, border-color 0.25s;
  will-change: transform;
}
.btn--sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px -8px var(--accent-glow); }
.btn--primary:hover { box-shadow: 0 12px 40px -8px var(--accent-glow); }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ----------------------------------- NAV ----------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-weight: 600; }
.nav__logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: 0.9rem;
  border: 1px solid var(--border);
}
.nav__links { display: flex; align-items: center; gap: var(--s-6); }
.nav__links a { color: var(--text-dim); font-size: 0.92rem; transition: color 0.2s; position: relative; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px;
}
.nav__cta { padding: 0.5rem 1.1rem; border: 1px solid var(--border-strong); border-radius: 999px; }
.nav__cta:hover { background: var(--accent-soft); border-color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: var(--s-3); }

.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text-dim); transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav__burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------- INTRO ----------------------------------- */
.intro {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__name { font-family: var(--font-display); font-size: clamp(2rem, 7vw, 4.5rem); font-weight: 700; display: flex; gap: 0.4em; overflow: hidden; }
.intro__name span { display: inline-block; transform: translateY(110%); animation: introUp 0.8s var(--ease) forwards; }
.intro__name span:nth-child(2) { animation-delay: 0.12s; }
@keyframes introUp { to { transform: translateY(0); } }

/* ---------------------------------- HERO ----------------------------------- */
.hero { padding-top: calc(72px + var(--s-24)); overflow: hidden; }
.hero__glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 80vw; max-width: 900px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  filter: blur(30px); opacity: 0.6; pointer-events: none; z-index: 0;
  transition: transform 0.2s ease-out;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-16); align-items: center; }
.hero__name { font-family: var(--font-display); font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.03em; margin-bottom: var(--s-4); }
.hero__role { font-family: var(--font-mono); font-size: clamp(0.85rem, 2vw, 1.05rem); color: var(--accent); margin-bottom: var(--s-6); }
.hero__tagline { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 500; margin-bottom: var(--s-4); }
.hero__value { color: var(--text-dim); max-width: 52ch; margin-bottom: var(--s-8); }
.hero__socials { display: flex; gap: var(--s-3); margin-bottom: var(--s-8); }
.social-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text-dim);
  transition: transform 0.25s var(--ease), color 0.2s, border-color 0.2s, background 0.2s;
}
.social-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.hero__ctas { display: flex; gap: var(--s-4); flex-wrap: wrap; }

.hero__aside { display: flex; flex-direction: column; align-items: center; gap: var(--s-8); }

/* Portrait — soft rounded frame with a slowly rotating gradient ring + glow */
.portrait { position: relative; width: 280px; max-width: 70vw; aspect-ratio: 4 / 5; margin: 0; }
.portrait__ring {
  position: absolute; inset: -10px; border-radius: 28px; z-index: 0;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), transparent 55%, var(--accent));
  filter: blur(2px); opacity: 0.55; animation: spin 14s linear infinite;
}
.portrait__img, .portrait__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 22px; object-fit: cover; object-position: center top;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.8), 0 0 60px -25px var(--accent-glow);
}
/* Initials = base layer (always present). Photo fades in on top once loaded. */
.portrait__fallback {
  z-index: 1; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--surface), var(--surface-2));
  font-family: var(--font-display); font-size: 4rem; font-weight: 700; color: var(--accent);
}
.portrait__img { z-index: 2; opacity: 0; transition: opacity 0.45s var(--ease); }
.portrait__img.is-ready { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6); width: 100%; }
.stat { text-align: center; }
.stat__num { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.stat__label { font-size: 0.82rem; color: var(--text-mute); }

/* --------------------------------- MARQUEE --------------------------------- */
/* Subtle, faded-edge ticker — premium, not loud. */
.marquee {
  overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-2);
  padding-block: var(--s-3);
  -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; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-mute);
  white-space: nowrap; padding-right: 1ch;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------ PHONE SHOWCASE ----------------------------- */
.apps__inner { display: grid; grid-template-columns: 1fr 360px; gap: var(--s-16); align-items: center; }
.apps__hint { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-2); color: var(--text-mute); font-size: 0.9rem; }
kbd { font-family: var(--font-mono); font-size: 0.78rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; color: var(--text-dim); }

.phone-wrap { display: flex; justify-content: center; }
.phone {
  position: relative; width: 320px; height: 660px; background: #060608; border-radius: 44px;
  padding: 14px; box-shadow: 0 0 0 2px var(--border-strong), 0 40px 80px -30px rgba(0,0,0,0.8), 0 0 60px -20px var(--accent-glow);
}
.phone__notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; background: #1a1a22; box-shadow: inset 0 0 0 2px #2a2a35; z-index: 5; }
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: linear-gradient(160deg, #161622, #0e0e16 60%); }
.phone__status { position: absolute; top: 0; left: 0; right: 0; height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 0.72rem; font-family: var(--font-mono); color: #fff; z-index: 4; pointer-events: none; }
.phone__status-icons { display: flex; gap: 5px; align-items: center; }
.phone__status-icons svg { stroke: #fff; }

.screen { position: absolute; inset: 0; padding: 48px 18px 18px; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.screen--home { opacity: 0; transform: scale(0.96); pointer-events: none; padding: 44px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.screen--home.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }

/* soft wallpaper glow */
.home__glow { position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: 120%; height: 45%; background: radial-gradient(ellipse at top, var(--accent-glow), transparent 70%); opacity: 0.5; pointer-events: none; }

/* Pixel-style clock */
.home__clockw { position: relative; z-index: 1; padding: 2px 6px 0; }
.home__clockw b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1; color: #fff; letter-spacing: -0.02em; }
.home__clockw small { font-family: var(--font-mono); font-size: 0.62rem; color: rgba(255,255,255,0.66); }

/* Profile widget */
.home__widget {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 18px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.home__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,0.4); display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); }
.home__avatar { position: relative; }
/* initials base layer; photo fades in on top once loaded */
.home__avatar span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.home__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0; transition: opacity 0.45s var(--ease); }
.home__avatar img.is-ready { opacity: 1; }
.home__greeting { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.home__hi { font-family: var(--font-display); font-weight: 600; font-size: 0.84rem; color: #fff; }
.home__role { font-size: 0.6rem; color: rgba(255,255,255,0.68); }
.home__avail { display: inline-flex; align-items: center; gap: 5px; font-size: 0.58rem; color: #9ff0bd; margin-top: 3px; }
.home__avail i { width: 6px; height: 6px; border-radius: 50%; background: #4fd687; box-shadow: 0 0 8px #4fd687; }

/* app pages fill the remaining space; rows spread to fill vertically */
.screen__pages { position: relative; z-index: 1; display: flex; flex: 1; min-height: 0; overflow: hidden; }
.app-page {
  flex: 0 0 100%; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: min-content;
  gap: 6px; align-content: space-evenly; transition: transform 0.4s var(--ease);
}

/* Glance page (first home page): notifications + widgets */
.app-page.glance { display: flex; flex-direction: column; gap: 9px; align-content: initial; padding: 2px; overflow-y: auto; }
.app-page.glance::-webkit-scrollbar { width: 0; }
.notif { display: flex; flex-direction: column; gap: 7px; }
.notif__chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 14px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.notif__ico { font-size: 1rem; line-height: 1; }
.notif__chip b { display: block; font-family: var(--font-display); font-size: 0.72rem; color: #fff; }
.notif__chip i { font-style: normal; font-size: 0.62rem; color: rgba(255,255,255,0.7); }

.gwidget { padding: 11px 12px; border-radius: 16px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gwidget__head { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.65); margin-bottom: 8px; }
.gwidget__head svg { width: 13px; height: 13px; stroke: var(--accent-2); }
.gwidget--learn b { font-family: var(--font-display); font-size: 0.95rem; color: #fff; }
.gwidget__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.gwidget__chips span { font-size: 0.58rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(255,255,255,0.1); }
.gwidget__stats { display: flex; justify-content: space-between; gap: 6px; }
.gwidget__stats span { display: flex; flex-direction: column; align-items: center; font-size: 0.55rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; }
.gwidget__stats b { font-family: var(--font-display); font-size: 1.1rem; color: #fff; }
.gwidget__grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; margin-top: 10px; }
.gwidget__grid i { aspect-ratio: 1; border-radius: 2px; background: rgba(255,255,255,0.08); }
.gwidget__grid i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }

/* Dock */
.home__dock {
  position: relative; z-index: 1; display: flex; justify-content: space-around; align-items: center;
  padding: 9px 6px; border-radius: 22px; margin-top: 2px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dock-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,255,255,0.1); color: #fff; transition: transform 0.2s var(--ease), background 0.2s; }
.dock-icon:hover, .dock-icon:focus-visible { transform: translateY(-3px); background: var(--accent); }
.dock-icon svg { width: 21px; height: 21px; stroke: #fff; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.app-icon button {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.6);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.app-icon button:hover, .app-icon button:focus-visible { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 22px -6px rgba(0,0,0,0.7); }
.app-icon button { position: relative; overflow: hidden; }
.app-icon button svg { width: 28px; height: 28px; stroke: #fff; }
.app-icon .app-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
/* round launchers: circular tile, no square background */
.app-icon button.is-round { border-radius: 50%; box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5); }
.app-icon button.is-round .app-logo { border-radius: 50%; }
.app-icon__badge {
  position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.55rem; display: grid; place-items: center;
  border: 1.5px solid #0e0e16; line-height: 1;
}
.app-icon span { font-size: 0.62rem; color: #d6d6e0; text-align: center; max-width: 62px; line-height: 1.2; }

.screen__dots { display: flex; gap: 7px; justify-content: center; align-items: center; height: 30px; }
.screen__dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: background 0.2s, width 0.2s; }
.screen__dots button.is-active { background: #fff; width: 18px; border-radius: 4px; }

/* Detail screen */
.screen--detail { opacity: 0; transform: scale(1.06); pointer-events: none; overflow-y: auto; background: linear-gradient(165deg, #14141f, #0c0c14); }
.screen--detail.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }
.screen--detail::-webkit-scrollbar { width: 0; }
.detail__bar { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-4); }
.detail__back { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06); color: #fff; transition: background 0.2s; }
.detail__back:hover { background: var(--accent); }
.detail__tag { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--border); }
.detail__app { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-4); }
.detail__app .app-glyph { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.detail__app .app-glyph svg { width: 26px; height: 26px; stroke: #fff; }
.detail__app .app-glyph .app-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail__app .app-glyph.is-round { border-radius: 50%; }
.detail__platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__platforms span { display: inline-flex; align-items: center; gap: 4px; font-size: 0.66rem; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.05); color: #d0d0db; border: 1px solid var(--border); }
.detail__platforms svg { stroke: var(--accent-2); }
.detail__app h3 { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.detail__app p { font-size: 0.7rem; font-family: var(--font-mono); color: var(--accent); }
.detail__section-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); margin: var(--s-4) 0 var(--s-2); }
.detail__overview { font-size: 0.82rem; color: #d0d0db; line-height: 1.55; }
.detail__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__chips span { font-size: 0.66rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border); }
.detail__highlights li { font-size: 0.76rem; color: #d0d0db; padding-left: 16px; position: relative; margin-bottom: 5px; }
.detail__highlights li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.detail__links { margin-top: var(--s-6); display: flex; flex-direction: column; gap: 8px; }
.detail__wip { margin-top: var(--s-6); padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.76rem; color: var(--accent-2); background: var(--accent-soft); border: 1px dashed var(--border-strong); text-align: center; }
.detail__open {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 0.7rem; border-radius: 12px; font-weight: 600; font-size: 0.82rem;
  transition: transform 0.2s var(--ease), background 0.2s;
}
/* primary = first store button; the rest are quieter outlines */
.detail__open:first-child { background: var(--accent); color: #fff; }
.detail__open:not(:first-child) { background: rgba(255,255,255,0.05); color: #e6e6ef; border: 1px solid var(--border-strong); }
.detail__open svg { stroke: currentColor; }
.detail__open:hover { transform: scale(1.02); }
.detail__open:not(:first-child):hover { background: var(--accent-soft); }

/* ------------------------------- EXPERIENCE -------------------------------- */
.timeline { position: relative; margin-left: 8px; padding-left: var(--s-8); border-left: 2px solid var(--border); }
.timeline__item { position: relative; padding-bottom: var(--s-12); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: calc(-1 * var(--s-8) - 7px); top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--bg), 0 0 18px var(--accent-glow); }
.timeline__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); transition: border-color 0.3s, transform 0.3s var(--ease); }
.timeline__card:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.timeline__head h3 { font-family: var(--font-display); font-size: 1.4rem; }
.timeline__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-mute); }
.timeline__role { color: var(--accent); font-size: 0.92rem; margin-bottom: var(--s-3); }
.timeline__body { color: var(--text-dim); margin-bottom: var(--s-3); }
.timeline__points li { color: var(--text-dim); font-size: 0.92rem; padding-left: 18px; position: relative; margin-bottom: var(--s-2); }
.timeline__points li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

.skills { margin-top: var(--s-16); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-8); }
.skills__group h4 { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--s-4); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips span { font-size: 0.85rem; padding: 0.4rem 0.85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
.chips span:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* --------------------------------- CARDS ----------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-8);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.service-card:hover { border-color: var(--accent); box-shadow: 0 20px 50px -25px var(--accent-glow); }
.service-card__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s-6); }
.service-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: var(--s-3); }
.service-card p { color: var(--text-dim); font-size: 0.95rem; }

/* ----------------------------------- NOW ----------------------------------- */
.now { overflow: hidden; }
.now__glow { position: absolute; top: 10%; right: -10%; width: 50vw; max-width: 600px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--accent-glow), transparent 60%); filter: blur(40px); opacity: 0.4; pointer-events: none; }
.now__head { position: relative; z-index: 1; margin-bottom: var(--s-12); }
.focus { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.focus-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.focus-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 24px 56px -28px var(--accent-glow); }
.focus-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.focus-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.focus-card__status {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--accent-2);
  white-space: nowrap;
}
.focus-card h3 { font-family: var(--font-display); font-size: 1.35rem; margin-top: var(--s-2); }
.focus-card p { color: var(--text-dim); font-size: 0.94rem; flex: 1; }
.focus-card .chips { margin-top: var(--s-2); }
.focus-card .chips span { font-size: 0.78rem; padding: 0.3rem 0.7rem; }

/* --------------------------------- WRITING --------------------------------- */
.writing__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-6); margin-bottom: var(--s-12); }
.writing__follow { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.post-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s-6); transition: transform 0.3s var(--ease), border-color 0.3s;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.post-card__meta { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.badge { font-family: var(--font-mono); font-size: 0.68rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.post-card__date { font-size: 0.78rem; color: var(--text-mute); }
.post-card h3 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; margin-bottom: var(--s-3); }
.post-card p { color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.post-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-6); font-size: 0.82rem; color: var(--text-mute); }
.post-card__foot .arrow { color: var(--accent); }

/* --------------------------------- GITHUB ---------------------------------- */
.github__chart { padding: var(--s-8); margin-top: var(--s-4); overflow-x: auto; text-align: center; }
.github__chart img { margin-inline: auto; min-width: 600px; }
.github__stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); margin-top: var(--s-6); }
.github__stat { padding: var(--s-6); display: grid; place-items: center; }
.github__fallback { display: none; color: var(--text-mute); font-size: 0.9rem; }
.is-failed img { display: none; }
.is-failed .github__fallback { display: block; }

/* ------------------------------- CERTIFICATES ------------------------------ */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 260px)); gap: var(--s-6); }
.cert-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-3); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.cert-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 20px 50px -25px var(--accent-glow); }
.cert-card__thumb { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-sm); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.cert-card__thumb svg { width: 40px; height: 40px; color: var(--text-mute); }
.cert-card h3 { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; }
.cert-card__issuer { font-size: 0.85rem; color: var(--text-dim); }
.cert-card__year { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-mute); }
.cert-card__link { margin-top: auto; color: var(--accent); font-size: 0.85rem; font-weight: 600; }

/* --------------------------------- CONTACT --------------------------------- */
.contact { overflow: hidden; }
.contact__glow { position: absolute; bottom: -20%; left: 50%; transform: translateX(-50%); width: 70vw; max-width: 800px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--accent-glow), transparent 60%); filter: blur(40px); opacity: 0.5; pointer-events: none; }
.contact__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); align-items: start; }
.contact__title { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-bottom: var(--s-6); }
.contact__links { margin-top: var(--s-8); display: grid; gap: var(--s-3); }
.contact__links a { color: var(--text-dim); transition: color 0.2s; width: fit-content; }
.contact__links a:hover { color: var(--accent); }
.contact__form { padding: var(--s-8); display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-2); }
.field label { font-size: 0.85rem; color: var(--text-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font: inherit;
  transition: border-color 0.2s; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.contact__status { font-size: 0.9rem; color: var(--text-dim); min-height: 1.2em; }
.contact__status.is-ok { color: #4fb477; }
.contact__status.is-err { color: #e0584e; }

/* --------------------------------- FOOTER ---------------------------------- */
.footer { border-top: 1px solid var(--border); padding-block: var(--s-16) var(--s-8); background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-12); padding-bottom: var(--s-12); }
.footer__brand p { color: var(--text-mute); font-size: 0.92rem; max-width: 42ch; margin-top: var(--s-4); line-height: 1.6; }
.footer__col { display: flex; flex-direction: column; gap: var(--s-3); }
.footer__col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--s-2); }
.footer__col a { color: var(--text-dim); font-size: 0.92rem; width: fit-content; transition: color 0.2s; }
.footer__col a:hover { color: var(--accent); }
.footer__bar { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; padding-top: var(--s-8); border-top: 1px solid var(--border); }
.footer__bar p { color: var(--text-mute); font-size: 0.88rem; }
.footer__top {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--text-dim); font-size: 0.88rem; padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.footer__top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* --------------------------- SCROLL PROGRESS ------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 150;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow); transition: width 0.1s linear;
}

/* ----------------------------- CUSTOM CURSOR ------------------------------- */
/* Enabled only on fine-pointer devices via .has-cursor on <html> (set by JS) */
.cursor {
  position: fixed; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--accent); pointer-events: none; z-index: 250;
  transform: translate(-100px, -100px) translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0; display: none;
}
html.has-cursor .cursor { display: block; }
html.has-cursor .cursor.is-active { opacity: 1; }
html.has-cursor .cursor.is-hover { width: 56px; height: 56px; background: var(--accent-soft); border-color: var(--accent-2); }
html.has-cursor.has-cursor * { cursor: none; }
/* keep sensible native cursors where it matters for usability */
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* ---------------------------- CMD-K NAV BUTTON ----------------------------- */
.cmdk-hint {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.4rem 0.7rem; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.82rem; transition: border-color 0.2s, color 0.2s;
}
.cmdk-hint:hover { border-color: var(--accent); color: var(--text); }
.cmdk-hint__keys { display: inline-flex; gap: 2px; }
.cmdk-hint kbd { font-size: 0.72rem; padding: 1px 5px; }

/* ----------------------------- COMMAND PALETTE ----------------------------- */
.cmdk { position: fixed; inset: 0; z-index: 400; display: none; }
.cmdk.is-open { display: block; }
.cmdk__backdrop { position: absolute; inset: 0; background: rgba(5, 4, 10, 0.6); backdrop-filter: blur(6px); animation: fade 0.2s var(--ease); }
.cmdk__panel {
  position: relative; max-width: 560px; margin: 12vh auto 0; width: calc(100% - 2rem);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8), 0 0 60px -30px var(--accent-glow);
  overflow: hidden; animation: pop 0.22s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }
.cmdk__search { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--border); }
.cmdk__search svg { color: var(--text-mute); flex: 0 0 auto; }
.cmdk__search input { flex: 1; background: none; border: none; color: var(--text); font: inherit; font-size: 1rem; outline: none; }
.cmdk__list { max-height: 50vh; overflow-y: auto; padding: var(--s-2); }
.cmdk__item {
  display: flex; align-items: center; gap: var(--s-3); padding: 0.7rem var(--s-4);
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-dim);
}
.cmdk__item .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--accent); flex: 0 0 auto; }
.cmdk__item .ico svg { width: 16px; height: 16px; }
.cmdk__item .label { flex: 1; color: var(--text); font-size: 0.95rem; }
.cmdk__item .tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-mute); }
.cmdk__item.is-active, .cmdk__item:hover { background: var(--accent-soft); color: var(--text); }
.cmdk__item.is-active .ico { background: var(--accent); color: #fff; }
.cmdk__empty { padding: var(--s-6); text-align: center; color: var(--text-mute); font-size: 0.9rem; }
.cmdk__foot { display: flex; gap: var(--s-6); padding: var(--s-3) var(--s-6); border-top: 1px solid var(--border); font-size: 0.72rem; color: var(--text-mute); }
.cmdk__foot kbd { font-size: 0.68rem; margin-right: 2px; }

/* ----------------------------- TESTIMONIALS -------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-6); }
.quote-card {
  display: flex; flex-direction: column; gap: var(--s-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-8);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.quote-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.quote-card__mark { font-family: var(--font-display); font-size: 3rem; line-height: 0.6; color: var(--accent); opacity: 0.5; }
.quote-card blockquote { color: var(--text-dim); font-size: 0.98rem; line-height: 1.6; flex: 1; }
.quote-card__who { display: flex; align-items: center; gap: var(--s-3); }
.quote-card__av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; overflow: hidden; flex: 0 0 auto; }
.quote-card__av img { width: 100%; height: 100%; object-fit: cover; }
.quote-card__name { font-weight: 600; font-size: 0.92rem; }
.quote-card__role { font-size: 0.8rem; color: var(--text-mute); }

/* ------------------------------- REVEALS ----------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* staggered children when a parent gets .stagger handled in JS via delay */

/* -------------------------- RESPONSIVE BREAKPOINTS ------------------------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-12); }
  .hero__aside { order: -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .stats { width: auto; flex: 1; min-width: 280px; }
  .apps__inner { grid-template-columns: 1fr; gap: var(--s-12); }
  .apps__intro { text-align: center; }
  .apps__hint { align-items: center; }
  .section-lead { margin-inline: auto; }
  .cards-3 { grid-template-columns: 1fr; }
  .focus { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; gap: var(--s-12); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding-block: var(--s-16); }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: var(--s-4); padding: var(--s-6); background: var(--bg-2); border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform 0.4s var(--ease); height: auto;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { font-size: 1.1rem; }
  .nav__burger { display: flex; }
  .cmdk-hint__label { display: none; }
  .github__stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .footer__bar { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--s-4); }
  .posts, .certs { grid-template-columns: 1fr; }
  .phone { width: 290px; height: 600px; }
  .hero__ctas .btn { flex: 1; }
  .writing__head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .phone { width: 260px; height: 540px; }
  .app-icon button { width: 48px; height: 48px; }
}

/* --------------------------- REDUCED MOTION -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .intro { display: none; }
  .marquee__track, .avatar__ring { animation: none; }
}
