/* Portfolio: Ghazaleh Zendehdel
   Concept: the page is an open design file (canvas, frames, handles, cursors).
   One theme (dark), one accent (coral), one radius system:
   cards, frames and nodes 20px, controls and chips full pill, tags 6px. */

@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0c0c11;
  --bg-2: #111118;
  --bg-3: #181821;
  --line: rgba(237, 235, 230, .13);
  --text: #edebe6;
  --muted: #a9a7a1;
  --accent: #ff6b4a;
  --on-accent: #0c0c11;
  --r-card: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 68px;
  --dots: radial-gradient(circle, rgba(237, 235, 230, .16) 1px, transparent 1.6px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Vazirmatn", "Geist", system-ui, sans-serif;
  font-size: 1.0625rem; line-height: 1.8; overflow-x: hidden;
}
html[lang="en"] body { font-family: "Geist", "Vazirmatn", system-ui, sans-serif; line-height: 1.65; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - var(--gutter) * 2, 1320px); margin-inline: auto; }

/* Type */
.h1 { font-size: clamp(2.4rem, 6.2vw, 5.5rem); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.h3 { font-size: clamp(1.4rem, 2vw, 1.9rem); font-weight: 700; line-height: 1.4; }
.h4 { font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
html[lang="en"] .h1, html[lang="en"] .h2 { letter-spacing: -.035em; line-height: 1.08; }
html[lang="en"] .h3 { letter-spacing: -.02em; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 46ch; }
.body { color: var(--muted); max-width: 52ch; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: .95rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; white-space: nowrap; border: 1px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #ff846a; }
.btn-ghost { border-color: rgba(237, 235, 230, .34); color: var(--text); background: rgba(12, 12, 17, .55); }
.btn-ghost:hover { border-color: var(--text); }
.link { display: inline-block; font-weight: 600; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color .25s var(--ease); }
.link:hover { color: var(--accent); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-inline: var(--gutter);
  background: linear-gradient(to bottom, rgba(12, 12, 17, .88), rgba(12, 12, 17, 0));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom, #000 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.brand { font-family: "Geist", sans-serif; font-weight: 800; letter-spacing: -.04em; font-size: 1.25rem; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); font-size: .9375rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 12px; }
.lang { background: none; border: 1px solid var(--line); border-radius: 999px; min-width: 42px; height: 42px; padding: 0 12px; font-size: .8125rem; font-weight: 700; font-family: "Geist", "Vazirmatn", sans-serif; }
.lang:hover { border-color: var(--text); }

/* Hero: open design file */
.hero {
  position: relative; min-height: 100dvh; overflow: hidden;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 72px;
  background-image: var(--dots); background-size: 28px 28px; background-position: 0 0;
}
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 40%, var(--bg) 100%); }
.hero-canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ab { position: absolute; margin: 0; will-change: transform; }
.ab img { width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); box-shadow: 0 40px 90px rgba(0, 0, 0, .55); }
.ab-label { position: absolute; bottom: 100%; inset-inline-start: 2px; padding-bottom: 8px; font-family: "Geist Mono", monospace; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.ab-1 { width: min(36vw, 560px); inset-inline-end: 3vw; top: 11vh; }
.ab-1 img { transform: rotate(-2.5deg); }
.ab-2 { width: min(24vw, 380px); inset-inline-end: 25vw; bottom: 7vh; }
.ab-2 img { transform: rotate(3deg); }
.ab-3 { width: min(20vw, 310px); inset-inline-end: 2.5vw; bottom: 8vh; }
.ab-3 img { border: 0; box-shadow: none; background: transparent; transform: rotate(-4deg); }

.cursor { position: absolute; display: flex; align-items: flex-start; gap: 4px; --cc: var(--accent); will-change: transform; }
.cursor i { width: 18px; height: 22px; background: var(--cc); clip-path: polygon(0 0, 0 82%, 22% 63%, 40% 100%, 58% 92%, 40% 58%, 70% 58%); }
.cursor span { margin-top: 18px; padding: 2px 10px; border-radius: 999px; background: var(--cc); color: var(--on-accent); font-family: "Geist", sans-serif; font-size: .75rem; font-weight: 700; }
.cur-a { top: 30vh; inset-inline-end: 30vw; }
.cur-b { --cc: var(--text); top: 62vh; inset-inline-end: 12vw; }

.hero-content { position: relative; z-index: 2; width: min(100%, 1320px); margin-inline: auto; display: grid; gap: 22px; justify-items: start; }
.sel { position: relative; display: inline-block; padding: .06em .18em; border: 1px solid var(--accent); }
.hero-title { font-size: clamp(3rem, 9.6vw, 8.6rem); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
html[lang="en"] .hero-title { font-size: clamp(2.8rem, 8vw, 7.4rem); line-height: 1; letter-spacing: -.05em; }
.hd { position: absolute; width: 10px; height: 10px; background: #fff; border: 1px solid var(--accent); }
.hd-a { top: -5px; left: -5px; } .hd-b { top: -5px; right: -5px; } .hd-c { bottom: -5px; left: -5px; } .hd-d { bottom: -5px; right: -5px; }
.sel-tag { position: absolute; top: calc(100% + 10px); right: 0; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-family: "Geist Mono", monospace; font-size: .75rem; font-weight: 600; line-height: 1.6; }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: rgba(237, 235, 230, .82); max-width: 36ch; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Split masks */
.sw-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-block: .14em; margin-block: -.14em; }
.sw-mask > span { display: inline-block; will-change: transform; }

/* About */
.about { padding: clamp(96px, 16vh, 200px) 0; }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: start; }
.statement { grid-column: 1 / span 8; font-size: clamp(1.8rem, 4vw, 3.4rem); font-weight: 700; line-height: 1.5; }
html[lang="en"] .statement { line-height: 1.15; letter-spacing: -.03em; }
.statement .w { opacity: .16; }
.portrait { grid-column: 10 / span 3; grid-row: 1 / span 2; margin-top: 12px; }
.portrait img { border-radius: var(--r-card); aspect-ratio: 3 / 4; object-fit: cover; }
.about-text { grid-column: 1 / span 5; color: var(--muted); }

/* Craft: wireframe to UI */
.craft { position: relative; height: 420vh; border-block: 1px solid var(--line); background-color: var(--bg-2); background-image: var(--dots); background-size: 28px 28px; }
.craft-stick { position: sticky; top: 0; height: 100dvh; display: grid; grid-template-columns: 1fr minmax(320px, 460px); gap: clamp(24px, 6vw, 100px); align-items: center; padding-inline: var(--gutter); }
.craft-copy { display: grid; gap: 36px; max-width: 560px; }
.stages { display: grid; gap: 4px; }
.stages li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); opacity: .38; transition: opacity .5s var(--ease); }
.stages li.is-on { opacity: 1; }
.stages b { font-size: clamp(1.2rem, 1.9vw, 1.6rem); font-weight: 800; }
.stages span { color: var(--muted); font-size: .95rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease), opacity .5s var(--ease); }
.stages li.is-on span { max-height: 5em; opacity: 1; }

.device { position: relative; width: 360px; height: 640px; justify-self: center; scale: var(--k, 1); transform-origin: center; --scr-bg: #16161d; --ink: #f4f0e8; --gold: #d9b56f; }
.device[data-stage="2"], .device[data-stage="3"] { --scr-bg: #0a0a0a; }
.screen {
  position: absolute; inset: 0; border-radius: 36px; border: 1px solid var(--line); overflow: hidden;
  background: var(--scr-bg); padding: 20px; transition: background .6s var(--ease);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
}
.t { color: transparent; background: #3b3b47; border-radius: 6px; transition: color .6s var(--ease), background .6s var(--ease); }
.device[data-stage="2"] .t, .device[data-stage="3"] .t { color: var(--ink); background: transparent; }
.s-bar { height: 40px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.s-burger { width: 24px; height: 16px; background: linear-gradient(#3b3b47 0 0) top / 100% 2px no-repeat, linear-gradient(#3b3b47 0 0) center / 100% 2px no-repeat, linear-gradient(#3b3b47 0 0) bottom / 100% 2px no-repeat; transition: filter .6s; }
.s-cart { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #3b3b47; transition: border-color .6s; }
.s-logo { font-family: "Geist", "Vazirmatn", sans-serif; font-weight: 800; letter-spacing: .02em; padding: 0 14px; min-width: 96px; text-align: center; line-height: 1.7; }
.device[data-stage="2"] .s-burger, .device[data-stage="3"] .s-burger { filter: brightness(2.4); }
.device[data-stage="2"] .s-cart, .device[data-stage="3"] .s-cart { border-color: var(--gold); }
.device[data-stage="2"] .s-logo, .device[data-stage="3"] .s-logo { color: var(--gold); }
.s-media {
  position: relative; height: 290px; margin-bottom: 24px; border-radius: 16px; overflow: hidden;
  border: 1px dashed #4a4a58; background:
    linear-gradient(to top right, transparent calc(50% - .5px), #4a4a58 50%, transparent calc(50% + .5px)),
    linear-gradient(to top left, transparent calc(50% - .5px), #4a4a58 50%, transparent calc(50% + .5px)), #1d1d26;
  transition: border-color .6s var(--ease);
}
.s-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0; transform: scale(1.1); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.device[data-stage="2"] .s-media, .device[data-stage="3"] .s-media { border-color: transparent; }
.device[data-stage="2"] .s-media img, .device[data-stage="3"] .s-media img { opacity: 1; transform: none; }
.s-title { height: 34px; width: 74%; margin-bottom: 8px; font-size: 1.3rem; font-weight: 800; line-height: 34px; }
.s-sub { height: 22px; width: 94%; margin-bottom: 18px; font-size: .78rem; line-height: 22px; }
.device[data-stage="2"] .s-sub, .device[data-stage="3"] .s-sub { color: #a8a39a; }
.s-chips { display: flex; gap: 8px; height: 30px; margin-bottom: 22px; }
.s-chips span { padding: 0 14px; border-radius: 999px; font-size: .78rem; line-height: 30px; min-width: 64px; text-align: center; }
.device[data-stage="2"] .s-chips span, .device[data-stage="3"] .s-chips span { border: 1px solid rgba(217, 181, 111, .5); color: var(--gold); }
.s-cta { display: block; width: 100%; height: 52px; border: 0; border-radius: 999px; font-weight: 800; font-size: 1rem; transition: background .6s var(--ease), color .6s var(--ease), transform .25s var(--ease); }
.device[data-stage="2"] .s-cta { background: var(--gold); color: #0a0a0a; }
.device[data-stage="3"] .s-cta { background: #bf9a52; color: #0a0a0a; transform: scale(.97); }
.s-toast { position: absolute; inset-inline: 20px; bottom: 22px; padding: 12px 16px; border-radius: 14px; background: #f4f0e8; color: #0a0a0a; font-size: .875rem; font-weight: 700; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.device[data-stage="3"] .s-toast { opacity: 1; transform: none; transition-delay: .5s; }

.guide { position: absolute; inset-inline-start: 20px; width: 56px; display: grid; place-items: center; background: rgba(255, 107, 74, .22); border-block: 1px solid var(--accent); font-family: "Geist Mono", monospace; font-size: 10px; color: var(--accent); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.guide b { font-weight: 600; }
.g-1 { top: 60px; height: 16px; } .g-2 { top: 366px; height: 24px; } .g-3 { top: 424px; height: 8px; font-size: 0; }
.gridlines { position: absolute; inset: 0; border-radius: 36px; background-image: repeating-linear-gradient(to bottom, rgba(255, 107, 74, .22) 0 1px, transparent 1px 8px); opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; mask-image: linear-gradient(to right, #000, transparent 70%); -webkit-mask-image: linear-gradient(to right, #000, transparent 70%); }
.device[data-stage="1"] .guide, .device[data-stage="1"] .gridlines { opacity: 1; }

.tagbox { position: absolute; right: -28px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: #fff; color: #111; font-family: "Geist Mono", monospace; font-size: 11px; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.tagbox b { font-weight: 700; }
.tagbox i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); border: 1px solid rgba(0, 0, 0, .25); }
.tb-type { top: 384px; } .tb-color { top: 20px; right: -18px; } .tb-state { top: 556px; background: var(--accent); }
.device[data-stage="2"] .tb-type, .device[data-stage="2"] .tb-color, .device[data-stage="3"] .tb-state { opacity: 1; transform: none; transition-delay: .25s; }
.cur-click { top: 640px; left: 60%; opacity: 0; transition: top .9s var(--ease), opacity .4s var(--ease); --cc: var(--text); z-index: 3; }
.device[data-stage="3"] .cur-click { top: 560px; opacity: 1; }

/* Work: camera zooms between frames */
.work { position: relative; }
.work-stage { position: relative; height: 100dvh; overflow: hidden; background-image: var(--dots); background-size: 28px 28px; border-bottom: 1px solid var(--line); }
.hud { position: absolute; z-index: 5; top: calc(var(--nav-h) + 8px); inset-inline-start: var(--gutter); display: flex; gap: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(12, 12, 17, .8); border: 1px solid var(--line); font-family: "Geist Mono", monospace; font-size: .75rem; color: var(--muted); }
.hud #hudName { color: var(--text); }
.world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; direction: ltr; will-change: transform; }
.case { position: absolute; left: var(--x); top: var(--y); width: 1380px; display: flex; gap: 60px; align-items: center; }
.case-frame { position: relative; flex: 0 0 960px; }
.frame-label { position: absolute; bottom: 100%; left: 2px; padding-bottom: 12px; font-family: "Geist Mono", monospace; font-size: 15px; color: var(--muted); white-space: nowrap; }
.shot { display: block; width: 960px; height: 600px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s var(--ease); }
a.shot:hover img { transform: scale(1.03); }
.case-card { flex: 0 0 360px; display: grid; gap: 14px; justify-items: start; }
[dir="rtl"] .case-card { direction: rtl; text-align: right; }
.tags { font-family: "Geist Mono", monospace; font-size: .8125rem; color: var(--accent); }
html[lang="fa"] .tags { font-family: inherit; font-size: .9rem; }
.pal { display: flex; gap: 8px; }
.pal i { width: 30px; height: 30px; border-radius: 999px; background: var(--c); border: 1px solid rgba(237, 235, 230, .25); }

/* Radio Hoodi wireframe frame */
.shot.wire { padding: 36px; background: #15151c; display: grid; grid-template-rows: auto 1fr; gap: 28px; box-shadow: none; }
.wr-top { display: flex; gap: 14px; }
.wr-top i { height: 18px; flex: 0 0 90px; border-radius: 6px; background: #343440; }
.wr-top i:first-child { flex-basis: 140px; }
.wr-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; }
.wr-art { aspect-ratio: 1; border: 1.5px dashed #4a4a58; border-radius: 16px; background:
  linear-gradient(to top right, transparent calc(50% - .5px), #4a4a58 50%, transparent calc(50% + .5px)),
  linear-gradient(to top left, transparent calc(50% - .5px), #4a4a58 50%, transparent calc(50% + .5px)); }
.wr-info { display: grid; gap: 16px; }
.wr-info b { height: 22px; width: 80%; border-radius: 6px; background: #343440; }
.wr-info b.s { height: 14px; width: 50%; }
.wr-wave { display: flex; align-items: center; gap: 6px; height: 70px; margin-top: 8px; }
.wr-wave u { flex: 1; border-radius: 3px; background: #4a4a58; height: 30%; }
.wr-wave u:nth-child(3n) { height: 70%; } .wr-wave u:nth-child(4n+1) { height: 100%; } .wr-wave u:nth-child(5n) { height: 45%; }
.wr-ctrl { display: flex; gap: 18px; align-items: center; }
.wr-ctrl i { width: 38px; height: 38px; border-radius: 999px; border: 2px solid #4a4a58; }
.wr-ctrl i.big { width: 62px; height: 62px; background: #343440; }

/* AI: prompt builds an interface */
.ai { position: relative; }
.ai-scene { position: relative; height: 340vh; }
.ai-stick {
  position: sticky; top: 0; height: 100dvh; padding: calc(var(--nav-h) + 8px) var(--gutter) 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; align-content: center;
  grid-template-areas: "head preview" "prompt preview"; gap: 28px clamp(32px, 5vw, 88px);
}
.ai-head { grid-area: head; display: grid; gap: 14px; align-self: end; }
.prompt { grid-area: prompt; display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-2); font-family: "Geist Mono", monospace; font-size: .9rem; line-height: 1.7; align-self: start; }
.pl { padding: 8px 12px; border-inline-start: 2px solid transparent; border-radius: 6px; color: rgba(237, 235, 230, .4); transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease); }
.pl b { display: inline-block; min-width: 7.5em; color: inherit; font-weight: 700; }
.pl.is-on { color: var(--text); background: rgba(255, 107, 74, .1); border-inline-start-color: var(--accent); }
.pl.is-on b { color: var(--accent); }
.ai-preview { grid-area: preview; position: relative; display: grid; place-items: center; align-content: center; gap: 20px; min-height: min(68dvh, 620px); padding: 40px; border-radius: var(--r-card); border: 1px solid var(--line); background-color: var(--bg-2); background-image: var(--dots); background-size: 28px 28px; overflow: hidden; }
.ap-frame { position: absolute; inset: 20px; border: 1px dashed rgba(255, 107, 74, .55); border-radius: 12px; }
.ap-frame span { position: absolute; top: -1px; left: -1px; padding: 2px 10px; border-radius: 6px 0 6px 0; background: var(--accent); color: var(--on-accent); font-family: "Geist Mono", monospace; font-size: .7rem; font-weight: 600; }
[data-at] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-at].on { opacity: 1; transform: none; }
.ap-card { position: relative; z-index: 1; width: min(100%, 360px); display: grid; gap: 10px; padding: 24px; border-radius: var(--r-card); background: #17171f; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0, 0, 0, .4); text-align: left; direction: ltr; }
.ap-card.rtl { direction: rtl; text-align: right; }
.ap-kicker { font-size: .8125rem; font-weight: 700; color: var(--accent); }
.ap-title { font-size: 1.35rem; font-weight: 800; line-height: 1.4; }
.ap-text { color: var(--muted); font-size: .95rem; }
.ap-actions { margin-top: 6px; }
.ap-btn { height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.ap-badge { position: absolute; top: -12px; right: 18px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-family: "Geist Mono", monospace; font-size: .7rem; }
.ap-grid { position: absolute; inset: 20px; pointer-events: none; background-image: repeating-linear-gradient(to right, rgba(255, 107, 74, .12) 0 1px, transparent 1px 32px), repeating-linear-gradient(to bottom, rgba(255, 107, 74, .12) 0 1px, transparent 1px 32px); border-radius: 12px; }
.ap-states { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ap-states span { padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; font-family: "Geist Mono", monospace; font-size: .75rem; color: var(--muted); }
.ap-states span:nth-child(2) { border-color: var(--accent); color: var(--accent); }

.ai-skills { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 5vw, 88px); align-items: center; padding: clamp(72px, 12vh, 140px) 0; }
.ai-kit img { border-radius: var(--r-card); border: 1px solid var(--line); }
.ai-list { display: grid; gap: 32px; }
.ai-list article { display: grid; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); }

/* System playground */
.system { padding: clamp(96px, 14vh, 180px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.system-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.system-head { grid-column: 1 / -1; display: grid; gap: 18px; }
.pg-controls { display: grid; gap: 28px; align-content: start; }
.pg-controls fieldset { border: 0; min-width: 0; }
.pg-controls legend, .range span { font-weight: 700; font-size: .9375rem; margin-bottom: 12px; display: block; }
.swatches { display: flex; gap: 12px; }
.sw { width: 44px; height: 44px; border-radius: 999px; background: var(--c); border: 2px solid transparent; outline: 1px solid var(--line); outline-offset: 2px; transition: transform .2s var(--ease); }
.sw:hover { transform: scale(1.08); }
.sw.is-on { border-color: var(--bg-2); outline: 2px solid var(--text); }
.range input { width: 100%; accent-color: var(--accent); height: 28px; }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; width: max-content; }
.seg button { background: none; border: 0; border-radius: 999px; min-height: 40px; padding: 0 22px; font-weight: 700; color: var(--muted); transition: background .25s var(--ease), color .25s var(--ease); }
.seg button.is-on { background: var(--text); color: var(--bg); }
.tokens { margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); font-family: "Geist Mono", monospace; font-size: .8125rem; line-height: 1.7; color: var(--muted); white-space: pre; overflow-x: auto; }
.tokens b { color: var(--accent); font-weight: 600; }
.pg-stage { position: relative; display: grid; place-items: center; min-height: 540px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); padding: 32px; background-color: var(--bg); background-image: var(--dots); background-size: 28px 28px; }
.pg-card {
  --p-accent: #ff6b4a; --p-r: 14px;
  --p-bg: #14141a; --p-surface: #1d1d26; --p-text: #f2f0eb; --p-muted: #a9a7a1; --p-line: rgba(255, 255, 255, .14);
  position: relative; width: min(100%, 380px); display: grid; gap: 14px; padding: 28px; border-radius: calc(var(--p-r) + 6px);
  background: var(--p-bg); color: var(--p-text); border: 1px solid var(--p-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transition: background .35s var(--ease), color .35s var(--ease), border-radius .2s var(--ease);
}
.pg-card[data-theme="light"] { --p-bg: #f6f4ef; --p-surface: #ffffff; --p-text: #17171c; --p-muted: #5d5b57; --p-line: rgba(0, 0, 0, .14); }
.pg-kicker { font-size: .8125rem; font-weight: 700; color: var(--p-accent); }
.pg-title { font-size: 1.5rem; font-weight: 800; line-height: 1.4; }
.pg-text { color: var(--p-muted); font-size: .95rem; }
.pg-field { display: grid; gap: 8px; font-size: .875rem; font-weight: 600; }
.pg-field input { height: 48px; padding: 0 14px; border-radius: var(--p-r); background: var(--p-surface); color: var(--p-text); border: 1px solid var(--p-line); font: inherit; transition: border-radius .2s var(--ease); }
.pg-actions { display: flex; gap: 10px; margin-top: 4px; }
.pg-btn { height: 46px; padding: 0 22px; font-weight: 700; border-radius: var(--p-r); border: 1px solid transparent; transition: border-radius .2s var(--ease); }
.pg-btn-p { background: var(--p-accent); color: #0c0c11; }
.pg-btn-g { background: transparent; color: var(--p-text); border-color: var(--p-line); }

/* Process: flowchart with a test loop */
.process { padding: clamp(96px, 16vh, 200px) 0; overflow-x: clip; }
.sketch { margin-top: clamp(32px, 5vw, 56px); }
.sketch img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r-card); border: 1px solid var(--line); }
.flow { position: relative; display: grid; justify-items: center; gap: clamp(48px, 9vh, 84px); width: min(100%, 460px); margin: clamp(56px, 9vw, 110px) auto 0; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--accent); pointer-events: none; z-index: 0; }
.flow-svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.node { position: relative; z-index: 1; width: 100%; padding: 20px 24px; text-align: center; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--bg-3); display: grid; gap: 4px; }
.node .body { margin-inline: auto; font-size: .95rem; }
.node.decision { border: 0; background: rgba(255, 107, 74, .16); clip-path: polygon(0 50%, 10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%); padding-block: 26px; }
.flow-tag { position: absolute; z-index: 2; padding: 2px 10px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: .8125rem; font-weight: 700; white-space: nowrap; }

/* Experience */
.exp { padding: clamp(96px, 14vh, 180px) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.exp-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.cert { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 14px; }
.cert img { border-radius: var(--r-card); border: 1px solid var(--line); }
.cert figcaption { color: var(--muted); font-size: .9375rem; }
.exp-cols { display: grid; gap: clamp(36px, 6vh, 64px); }
.exp-block { display: grid; gap: 14px; }
.timeline { display: grid; gap: 4px; }
.timeline li { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; align-items: baseline; padding: 10px 14px; margin-inline: -14px; border-radius: 12px; transition: background .25s var(--ease); }
.timeline li:hover { background: rgba(237, 235, 230, .05); }
.timeline .yr { font-family: "Geist Mono", monospace; font-size: .875rem; color: var(--muted); }
html[lang="fa"] .timeline .yr { font-family: inherit; }
.timeline strong { display: block; font-weight: 700; }
.timeline em { display: block; font-style: normal; color: var(--muted); font-size: .9375rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .9375rem; }

/* Skills marquee */
.skills { padding: clamp(48px, 9vh, 96px) 0; overflow: hidden; }
.marquee { overflow: hidden; }
.marquee-track { display: flex; width: max-content; gap: clamp(32px, 5vw, 72px); animation: marquee 48s linear infinite; font-family: "Geist", sans-serif; font-weight: 800; font-size: clamp(3rem, 8vw, 7rem); letter-spacing: -.04em; line-height: 1.2; white-space: nowrap; padding-inline-end: clamp(32px, 5vw, 72px); }
.marquee-track .o { color: transparent; -webkit-text-stroke: 1.5px rgba(237, 235, 230, .5); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Contact */
.contact { position: relative; overflow: hidden; padding: clamp(120px, 20vh, 240px) 0 clamp(96px, 16vh, 180px); }
.contact-canvas { position: absolute; inset: 0; background-image: var(--dots); background-size: 28px 28px; mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%); }
.contact-inner { position: relative; display: grid; gap: 32px; justify-items: start; }
.contact-inner .h1 { max-width: 14ch; }
html[lang="en"] .contact-inner .h1 { max-width: 12ch; }
.comment { display: flex; gap: 14px; align-items: flex-start; max-width: 560px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r-card); border-start-start-radius: 4px; background: var(--bg-3); box-shadow: 0 30px 70px rgba(0, 0, 0, .4); }
.avatar { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-family: "Geist", sans-serif; font-weight: 800; font-size: .9rem; }
.comment-body { display: grid; gap: 4px; }
.comment-name { font-weight: 700; font-family: "Geist", "Vazirmatn", sans-serif; }
.comment-name span { color: var(--muted); font-weight: 500; font-size: .875rem; margin-inline-start: 8px; }
.comment-text { color: var(--muted); }
.mail { justify-self: start; font-family: "Geist", sans-serif; font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 2rem); letter-spacing: -.03em; border-bottom: 2px solid var(--accent); padding-bottom: 2px; margin-top: 6px; transition: color .25s var(--ease); }
.mail:hover { color: var(--accent); }

.footer { padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

.js .rv { opacity: 0; transform: translateY(32px); }

/* Responsive */
@media (max-width: 1180px) { .nav-links { display: none; } }

@media (max-width: 900px) {
  .hero { align-items: flex-end; padding-top: calc(var(--nav-h) + 24px); }
  .ab-1 { width: 64vw; top: calc(var(--nav-h) + 40px); inset-inline-end: 4vw; opacity: .9; }
  .ab-2 { display: none; }
  .ab-3 { width: 38vw; inset-inline-end: auto; inset-inline-start: 4vw; top: calc(var(--nav-h) + 140px); bottom: auto; }
  .cur-a { top: 22vh; inset-inline-end: 40vw; } .cur-b { top: 38vh; inset-inline-end: 8vw; }
  .hero-content { padding-top: 38vh; }

  .about-grid { grid-template-columns: 1fr; }
  .statement, .portrait, .about-text { grid-column: 1; grid-row: auto; }
  .portrait { max-width: 240px; }

  .craft { height: 360vh; }
  .craft-stick { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; padding-top: calc(var(--nav-h) + 8px); gap: 8px; }
  .craft-copy { gap: 10px; }
  .craft-copy .h2 { font-size: 1.5rem; }
  .stages { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .stages li { padding: 8px 0 0; }
  .stages b { font-size: .9rem; }
  .stages span { display: none; }
  .device { --k: .72; margin-block: -80px; }

  .work-stage { height: auto; overflow: visible; background: none; }
  .hud { display: none; }
  .world { position: static; width: auto; height: auto; transform: none !important; padding: 72px var(--gutter); display: grid; gap: 56px; }
  .case { position: static; width: auto; flex-direction: column; align-items: stretch; gap: 20px; }
  .case-frame { flex: none; width: 100%; }
  .frame-label { position: static; padding: 0 0 8px; display: block; }
  .shot { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .case-card { flex: none; }

  .ai-scene { height: auto; }
  .ai-stick { position: static; height: auto; grid-template-columns: 1fr; grid-template-areas: "head" "prompt" "preview"; padding: 96px var(--gutter) 24px; }
  .ai-preview { min-height: 420px; padding: 24px; }
  .ai-skills { grid-template-columns: 1fr; }

  .system-grid { grid-template-columns: 1fr; }
  .pg-stage { min-height: 480px; padding: 20px; }

  .exp-grid { grid-template-columns: 1fr; }
  .cert { position: static; order: 2; }
  .exp-cols { order: 1; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 560px) {
  .flow { width: calc(100% - 40px); margin-left: 0; margin-right: auto; }
  .nav { gap: 12px; }
  .btn { padding: 0 22px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .prompt { font-size: .78rem; padding: 12px; }
  .pl b { min-width: 6.4em; }
}

/* Reduced motion: no pinned scenes, everything is laid out statically */
html.reduced .hero-canvas .cursor { display: none; }
html.reduced .craft { height: auto; padding: 96px 0; }
html.reduced .craft-stick { position: static; height: auto; }
html.reduced .work-stage { height: auto; overflow: visible; background: none; }
html.reduced .hud { display: none; }
html.reduced .world { position: static; width: auto; height: auto; transform: none; padding: 72px var(--gutter); display: grid; gap: 56px; }
html.reduced .case { position: static; width: auto; flex-direction: column; align-items: stretch; gap: 20px; }
html.reduced .case-frame { flex: none; width: 100%; }
html.reduced .frame-label { position: static; display: block; padding: 0 0 8px; }
html.reduced .shot { width: 100%; height: auto; aspect-ratio: 16 / 10; }
html.reduced .case-card { flex: none; }
html.reduced .ai-scene { height: auto; }
html.reduced .ai-stick { position: static; height: auto; padding-top: 96px; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .js .rv { opacity: 1; transform: none; }
  .statement .w { opacity: 1; }
  * { transition-duration: .01ms !important; }
}
