/* ============================================================
   Amir Daliri — Portfolio (dark-first redesign)
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* dark-first palette */
  --bg:            #07070A;
  --bg-2:          #0C0C12;
  --surface:       rgba(255,255,255,0.03);
  --surface-2:     rgba(255,255,255,0.05);
  --ink:           #F5F5F7;
  --ink-2:         #D8D8DD;
  --muted:         rgba(245,245,247,0.6);
  --subtle:        rgba(245,245,247,0.4);
  --border:        rgba(255,255,255,0.08);
  --border-soft:   rgba(255,255,255,0.04);

  /* accent */
  --accent:        #FF6F4A;
  --accent-2:      #FFB199;
  --accent-soft:   rgba(255,111,74,0.16);
  --accent-glow:   rgba(255,111,74,0.30);

  /* per-app brand glows for iPhone frames */
  --app-authkit:    180, 200, 255;
  --app-asrockid:   140, 100, 240;
  --app-asremote:   90,  150, 255;
  --app-cleaner:    255, 150, 90;
  --app-croncraft:  255, 200, 50;
  --app-asvpn:      120, 100, 255;
  --app-receipt:    255, 100, 130;
  --app-sleep:      100, 200, 255;

  /* typography */
  --font-sans:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif:    "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* layout */
  --container:     1200px;
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     22px;
  --radius-xl:     32px;

  --ease:          cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --bg:            #FAF8F4;
  --bg-2:          #F0EDE5;
  --surface:       rgba(0,0,0,0.02);
  --surface-2:     rgba(0,0,0,0.04);
  --ink:           #0E0E10;
  --ink-2:         #1F1F23;
  --muted:         rgba(14,14,16,0.6);
  --subtle:        rgba(14,14,16,0.4);
  --border:        rgba(14,14,16,0.10);
  --border-soft:   rgba(14,14,16,0.05);
  --accent:        #D04A2A;
  --accent-2:      #8C2E15;
  --accent-soft:   rgba(208,74,42,0.10);
  --accent-glow:   rgba(208,74,42,0.18);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}
[data-theme="light"] html { color-scheme: light; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
}
@media (max-width: 900px), (hover: none) {
  body { cursor: auto; }
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
@media (max-width: 900px), (hover: none) { button, a { cursor: pointer !important; } }
a { color: inherit; text-decoration: none; cursor: none; }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg);
  padding: 8px 14px; border-radius: 8px; z-index: 1000;
}
.skip-link:focus { left: 8px; }

/* ── Atmosphere ────────────────────────────────────────────── */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  animation: drift 28s ease-in-out infinite;
  will-change: transform;
}
.aurora--1 {
  width: 720px; height: 720px;
  top: -280px; right: -200px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}
.aurora--2 {
  width: 600px; height: 600px;
  top: 30%; left: -260px;
  background: radial-gradient(circle, #6E5BFF 0%, transparent 70%);
  animation-delay: -7s;
  animation-duration: 36s;
}
.aurora--3 {
  width: 500px; height: 500px;
  bottom: -200px; right: 10%;
  background: radial-gradient(circle, #FF4A78 0%, transparent 70%);
  animation-delay: -14s;
  animation-duration: 32s;
  opacity: 0.4;
}
[data-theme="light"] .aurora { opacity: 0.35; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 50px) scale(0.95); }
}
.grain {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Custom cursor ─────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(0,0,0);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  transition: width .25s var(--ease-out), height .25s var(--ease-out), opacity .2s var(--ease);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: transform .15s var(--ease-out), width .25s var(--ease-out), height .25s var(--ease-out), border-color .25s var(--ease), background .25s var(--ease);
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cursor-dot.is-hover { opacity: 0; }
@media (max-width: 900px), (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  font-weight: 600;
}
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.005em; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.link-inline {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color .25s var(--ease);
}
.link-inline:hover { color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .35s var(--ease-spring), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
  will-change: transform;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.btn--primary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 36px var(--accent-glow);
}
.btn--ghost {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(255,255,255,0.06);
}
.btn--sm { padding: 8px 18px; font-size: 14px; }
.btn--large { padding: 16px 30px; font-size: 16px; }
.btn[data-magnet] { will-change: transform; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.brand__name { font-size: 14px; letter-spacing: -0.005em; color: var(--ink); }

.primary-nav { display: flex; gap: 4px; }
.primary-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a.is-active {
  color: var(--ink);
  background: var(--surface-2);
}

.site-header__actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: rgba(255,255,255,0.02);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.theme-toggle:hover { background: rgba(255,255,255,0.06); border-color: var(--ink); }
.theme-toggle .icon { width: 16px; height: 16px; }
.theme-toggle .icon--moon { display: block; }
.theme-toggle .icon--sun { display: none; }
[data-theme="light"] .theme-toggle .icon--moon { display: none; }
[data-theme="light"] .theme-toggle .icon--sun { display: block; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
  position: relative;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  width: 100%;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 36px;
  backdrop-filter: blur(8px);
}
.status-pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 4px rgba(74,222,128,0.18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(74,222,128,0.04); }
}

.hero__title {
  font-size: clamp(2.8rem, 7.5vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 0.96;
  font-weight: 600;
  margin-bottom: 32px;
  max-width: 12ch;
}
.hero__title em {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent) 0%, #FFB199 60%, #FF8E72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  animation: word-in 1.1s var(--ease-out) forwards;
}
@keyframes word-in {
  to { opacity: 1; transform: none; }
}
.hero__lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 44px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.7s forwards;
}
.hero__lead strong { color: var(--ink); font-weight: 500; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.hero__cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 64px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 0.9s forwards;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 56px);
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.1s forwards;
}
.hero__meta li { display: flex; flex-direction: column; }
.hero__meta strong {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.hero__meta span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* hero showcase (iPhone with cycling screens) */
.hero__showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1400px;
  opacity: 0;
  animation: fade-in 1.4s var(--ease-out) 0.4s forwards;
}
@keyframes fade-in { to { opacity: 1; } }
.hero__showcase-glow {
  position: absolute; inset: -10%;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
  filter: blur(30px);
  z-index: 0;
  animation: glow-pulse 6s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.05); }
}

/* ── iPhone frame component ────────────────────────────────── */
.iphone {
  position: relative;
  width: clamp(220px, 22vw, 320px);
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(160deg, #2a2a30 0%, #14141a 100%);
  border-radius: 14% / 6.5%;
  padding: 4%;
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 -2px 6px rgba(0,0,0,0.4),
    0 30px 60px rgba(0,0,0,0.6),
    0 0 80px var(--app-glow, var(--accent-glow));
  transform: rotate(2.5deg) rotateY(-8deg) rotateX(2deg);
  transition: transform 1s var(--ease-out), box-shadow .8s var(--ease);
  z-index: 1;
}
.iphone__notch {
  position: absolute;
  top: 4.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 3.4%;
  background: #000;
  border-radius: 999px;
  z-index: 3;
}
.iphone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: var(--screen-bg, linear-gradient(180deg, #1a1a22 0%, #07070a 100%));
}
.iphone__statusbar {
  position: absolute;
  top: 4%; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 8%;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  z-index: 2;
}
.iphone__home {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.iphone__appicon {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  transform: translateY(-8%);
  transition: transform .8s var(--ease-out), opacity .8s var(--ease);
}
.iphone__appname {
  position: absolute;
  bottom: 18%;
  left: 0; right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* hero — cycling screens */
.iphone__cycle .iphone__screen {
  background: #07070A;
}
.iphone__slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  background: var(--screen-bg, linear-gradient(180deg, #1a1a22 0%, #07070a 100%));
}
.iphone__slide.is-on { opacity: 1; }
.iphone__slide .iphone__appicon { width: 42%; }

/* ── Marquee ───────────────────────────────────────────────── */
.marquee {
  --speed: 50s;
  position: relative;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.015);
  overflow: hidden;
  padding: 22px 0;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 100px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }
.marquee__track {
  display: flex; gap: 44px; align-items: center;
  width: max-content;
  animation: marquee var(--speed) linear infinite;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  color: var(--ink);
  font-style: italic;
  white-space: nowrap;
}
.marquee__sep {
  color: var(--accent);
  font-size: 0.55em;
  font-style: normal;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Section headers ───────────────────────────────────────── */
.section__header { max-width: 880px; margin-bottom: 80px; }
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 400;
}
.section__title strong { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.025em; }
.section__lead {
  margin-top: 24px;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ── Studio (As Apps) ──────────────────────────────────────── */
.section--studio { position: relative; }
.studio__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 60px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.studio__head .section__header { margin-bottom: 0; }
.studio__title-row {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 24px;
}
.studio-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(110,90,255,0.4), 0 0 0 1px rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.studio__cta-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.studio__cta-link:hover { color: var(--accent); border-color: var(--accent); }
.studio__cta-link svg { transition: transform .25s var(--ease); }
.studio__cta-link:hover svg { transform: translate(3px, -3px); }

.studio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}
.studio-card {
  --app-glow: rgba(255,111,74,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 36px 20px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.005) 100%);
  transition: border-color .35s var(--ease), transform .5s var(--ease-out);
  overflow: hidden;
}
.studio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, rgba(var(--app-rgb, 255, 111, 74), 0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.studio-card:hover { border-color: rgba(var(--app-rgb, 255, 111, 74), 0.5); }
.studio-card:hover::before { opacity: 1; }
.studio-card:hover .iphone-mini {
  transform: rotate(0deg) translateY(-6px);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    0 30px 60px rgba(0,0,0,0.5),
    0 0 100px rgba(var(--app-rgb, 255, 111, 74), 0.45);
}

.iphone-mini {
  position: relative;
  width: 130px;
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(160deg, #2a2a30 0%, #14141a 100%);
  border-radius: 14% / 6.5%;
  padding: 4%;
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.06),
    0 24px 50px rgba(0,0,0,0.5),
    0 0 60px rgba(var(--app-rgb, 255,111,74), 0.25);
  transform: rotate(-3deg);
  transition: transform .6s var(--ease-spring), box-shadow .6s var(--ease);
  flex-shrink: 0;
}
.iphone-mini__notch {
  position: absolute;
  top: 4.5%; left: 50%;
  transform: translateX(-50%);
  width: 30%; height: 3.6%;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.iphone-mini__screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: var(--screen-bg, linear-gradient(180deg, #1a1a22 0%, #07070a 100%));
}
.iphone-mini__icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -56%);
  width: 56%;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 14px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
}

.studio-card__body {
  position: relative;
  text-align: center;
  z-index: 1;
}
.studio-card__pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.studio-card__pill--live {
  background: rgba(74,222,128,0.14);
  color: #4ade80;
}
.studio-card__pill--soon {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}
.studio-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.studio-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.studio-card__platforms {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* per-app brand colors */
.studio-card[data-app="authkit"]    { --app-rgb: 96,140,240;  }
.studio-card[data-app="asrockid"]   { --app-rgb: 145,90,235;  }
.studio-card[data-app="asremote"]   { --app-rgb: 70,140,255;  }
.studio-card[data-app="cleaner"]    { --app-rgb: 255,140,90;  }
.studio-card[data-app="croncraft"]  { --app-rgb: 255,200,60;  }
.studio-card[data-app="asvpn"]      { --app-rgb: 130,90,255;  }
.studio-card[data-app="receipt"]    { --app-rgb: 255,100,140; }
.studio-card[data-app="sleep"]      { --app-rgb: 100,200,255; }

.studio-card[data-app="authkit"]   .iphone-mini__screen   { background: linear-gradient(160deg, #1e3a8a 0%, #0a0a14 100%); }
.studio-card[data-app="asrockid"]  .iphone-mini__screen   { background: linear-gradient(160deg, #4c1d95 0%, #0a0a14 100%); }
.studio-card[data-app="asremote"]  .iphone-mini__screen   { background: linear-gradient(160deg, #1e40af 0%, #0a0a14 100%); }
.studio-card[data-app="cleaner"]   .iphone-mini__screen   { background: linear-gradient(160deg, #c2410c 0%, #0a0a14 100%); }
.studio-card[data-app="croncraft"] .iphone-mini__screen   { background: linear-gradient(160deg, #a16207 0%, #0a0a14 100%); }
.studio-card[data-app="asvpn"]     .iphone-mini__screen   { background: linear-gradient(160deg, #5b21b6 0%, #0a0a14 100%); }
.studio-card[data-app="receipt"]   .iphone-mini__screen   { background: linear-gradient(160deg, #be185d 0%, #0a0a14 100%); }
.studio-card[data-app="sleep"]     .iphone-mini__screen   { background: linear-gradient(160deg, #0c4a6e 0%, #0a0a14 100%); }

/* ── Work (client portfolio) ───────────────────────────────── */
.section--work { background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.02) 100%); }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 48px;
}
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  background: rgba(255,255,255,0.02);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.work-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: transform .4s var(--ease-out), border-color .25s var(--ease), box-shadow .4s var(--ease);
}
.work-card a { display: block; }
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.work-card.is-hidden { display: none; }
.work-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.work-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
  filter: saturate(0.95);
}
.work-card:hover .work-card__media img { transform: scale(1.05); filter: saturate(1.1); }
.work-card__body { padding: 22px 24px 26px; }
.work-card__cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}
.work-card__body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.work-card__body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Stack ─────────────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stack-card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 22px;
  transition: background .25s var(--ease);
}
.stack-card:hover { background: var(--bg-2); }
.stack-card__head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 18px;
}
.stack-card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.stack-card__head h3 { font-size: 1.05rem; font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.tag-list li:hover { background: rgba(255,255,255,0.08); border-color: var(--border); }

/* ── Timeline ──────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 920px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: linear-gradient(to bottom, var(--border) 0%, var(--accent) 30%, var(--accent) 70%, var(--border) 100%);
}
.timeline__item {
  position: relative;
  padding-bottom: 40px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -32px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px var(--accent-glow);
}
.timeline__year {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.timeline__card:hover { border-color: var(--border); background: var(--surface-2); }
.timeline__role {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 8px;
  margin-bottom: 14px;
}
.timeline__role h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.timeline__company {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.timeline__card ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.timeline__card ul li + li { margin-top: 8px; }
.timeline__card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 8px; height: 1px;
  background: var(--subtle);
}

/* ── Education ─────────────────────────────────────────────── */
.education-card {
  display: flex; gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 760px;
  align-items: flex-start;
}
.education-card__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.education-card__body h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 6px;
}
.education-card__org {
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.education-card__body ul {
  display: flex; flex-direction: column; gap: 6px;
}
.education-card__body li {
  font-size: 14.5px; color: var(--muted);
  position: relative; padding-left: 18px;
}
.education-card__body li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--subtle);
}

/* ── Footer / contact ──────────────────────────────────────── */
.site-footer {
  position: relative;
  padding: clamp(100px, 12vw, 160px) 0 36px;
  border-top: 1px solid var(--border-soft);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -300px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}
.contact { position: relative; max-width: 920px; }
.contact__title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 32px;
  font-weight: 400;
}
.contact__title em {
  background: linear-gradient(120deg, var(--accent) 0%, #FFB199 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 56px;
}
.contact__channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--border-soft);
}
.contact__primary {
  display: flex; flex-direction: column; gap: 6px;
  transition: opacity .25s var(--ease);
}
.contact__primary:hover { opacity: 0.7; }
.contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}
.contact__value {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.socials { display: flex; gap: 12px; }
.socials a {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--ink);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease-spring);
}
.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}
.socials svg { width: 18px; height: 18px; }
.site-footer__bottom {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--subtle);
  font-family: var(--font-mono);
}

/* ── Reveals ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__showcase { order: -1; }
  .iphone { width: 240px; transform: rotate(0) rotateY(0) rotateX(0); }
  .studio__head { flex-direction: column; align-items: stretch; }
  .studio-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .primary-nav.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
    backdrop-filter: blur(16px);
  }
  .primary-nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }

  .site-header__actions .btn--ghost { display: none; }
  .iphone { width: 200px; }
  .studio-grid, .work-grid, .stack-grid { grid-template-columns: 1fr; }
  .education-card { flex-direction: column; padding: 28px; }
  .contact__channels { flex-direction: column; align-items: flex-start; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__track, .aurora { animation: none !important; }
  .reveal, .hero__title .word, .hero__lead, .hero__cta, .hero__meta, .hero__showcase {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  body, button, a { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none; }
}
