/* ============================================================
   Florin Stoian — folio. Bold-modern, dark, type-forward.
   ============================================================ */

:root {
  --bg:        #0b0b0c;
  --bg-2:      #141416;
  --surface:   #17171a;
  --ink:       #f3f0e9;   /* warm white — nods to the cream world of the work */
  --muted:     #8f8f87;
  --faint:     rgba(243, 240, 233, 0.10);
  --faint-2:   rgba(243, 240, 233, 0.06);
  --accent:    #c8f24a;   /* signal lime — used sparingly, as signal not decoration */
  --accent-ink:#0b0b0c;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SF Mono', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* pixel cursor */
html, body { cursor: url('assets/cursor.png') 0 0, auto; }
a, button, .btn, .nav__brand, .nav__links a, .nav__status { cursor: url('assets/cursor-pointer.png') 0 0, pointer; }
em { font-style: italic; }

.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* shared eyebrow / mono label */
.eyebrow, .section-num, .case__index, .nav__status, .marquee, .case__meta span {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}
.eyebrow { color: var(--muted); margin-bottom: 1.4rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--faint); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.nav__mark { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); position: relative; transition: color .25s var(--ease); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { width: 100%; }
.nav__status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.nav__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200,242,74,.5);} 70%{ box-shadow:0 0 0 7px rgba(200,242,74,0);} 100%{box-shadow:0 0 0 0 rgba(200,242,74,0);} }
@media (max-width: 720px) { .nav__status { display: none; } .nav__links { gap: 18px; } }

/* ---------- layout helpers ---------- */
.hero, .work, .about, .contact { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 56px; padding-top: 8px; border-top: 1px solid var(--faint); }
.section-head .section-num { color: var(--accent); padding-top: 28px; }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.02em; padding-top: 20px; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(140px, 22vh, 240px); padding-bottom: clamp(60px, 10vh, 120px); }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.9rem, 9.5vw, 7.4rem);
  line-height: 0.98; letter-spacing: -0.035em;
  margin-bottom: 2rem;
}
.hero__lede { max-width: 58ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #cfcdc6; }
.hero__cta { display: flex; gap: 14px; margin-top: 2.6rem; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; padding: 13px 22px; border-radius: 999px; transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.btn--solid { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn--solid:hover { transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--faint); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--faint); overflow: hidden; padding: 18px 0; margin-block: clamp(40px, 8vh, 90px) 0; }
.marquee__track { display: flex; gap: 38px; width: max-content; animation: scroll 26s linear infinite; color: var(--muted); }
.marquee__track span { white-space: nowrap; font-size: 1.1rem; }
.marquee__track .dot { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- work / cases ---------- */
.work { padding-top: clamp(70px, 12vh, 140px); }
.case { padding-block: clamp(60px, 10vh, 120px); }
.case + .case { border-top: 1px solid var(--faint); }

.case__index { color: var(--accent); display: inline-block; margin-bottom: 1.1rem; }
.case__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 6vw, 4.2rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 1.3rem; }
.case__sub { max-width: 60ch; font-size: 1.18rem; color: #cfcdc6; }

.case__meta { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--faint); }
.case__meta li { font-size: 0.96rem; line-height: 1.45; }
.case__meta span { display: block; color: var(--muted); margin-bottom: 7px; }

.case__hero { margin-top: 3.4rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--faint); box-shadow: 0 30px 80px -40px rgba(0,0,0,.8); }
.case__hero img { width: 100%; }

.case__body { margin-top: clamp(40px, 7vh, 84px); }
.case__block { max-width: 64ch; margin-inline: auto; margin-bottom: clamp(40px, 6vh, 72px); }
.case__block h4 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--accent); margin-bottom: 1rem; }
.case__block p { font-size: 1.12rem; color: #d8d6cf; }
.case__block strong { color: var(--ink); }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.pill { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; padding: 7px 13px; border: 1px solid var(--faint); border-radius: 999px; color: var(--muted); }

/* screenshot gallery */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-block: clamp(40px, 6vh, 72px); }
.shot { border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--faint); transition: transform .4s var(--ease), border-color .4s var(--ease); }
.shot img { width: 100%; }
.shot:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.shot figcaption { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); padding: 12px 14px 16px; line-height: 1.4; border-top: 1px solid var(--faint); }
@media (max-width: 860px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .shots { grid-template-columns: 1fr; } }

/* outcome metrics */
.case__outcome { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 64ch; margin: clamp(50px,7vh,80px) auto 0; padding-top: 2.4rem; border-top: 1px solid var(--faint); }
.metric strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.7rem); display: block; line-height: 1; letter-spacing: -0.02em; }
.metric span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); display: block; margin-top: 10px; line-height: 1.4; }
@media (max-width: 620px) { .case__outcome { grid-template-columns: 1fr; gap: 28px; } }

/* before / after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block: clamp(36px, 5vh, 56px); }
.ba__col figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-top: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.ph { aspect-ratio: 16/10; border-radius: 12px; border: 1px dashed var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--bg-2); }
.ph span { font-family: var(--font-mono); letter-spacing: 0.2em; color: var(--muted); }
.ph small { font-family: var(--font-mono); font-size: 0.68rem; color: #5d5d57; }
.ph--after { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ph--after span { color: var(--accent); }
@media (max-width: 620px) { .ba { grid-template-columns: 1fr; } }

/* draft / todo affordances */
.case--draft { position: relative; }
.todo { color: var(--accent); font-style: normal; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.todo-block { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 2px solid var(--accent); padding: 14px 18px; border-radius: 0 8px 8px 0; }

/* ---------- about ---------- */
.about { padding-block: clamp(80px, 14vh, 160px); }
.about__lede { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.25; letter-spacing: -0.02em; max-width: 22ch; }
.about__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.about__cols h5 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; color: var(--accent); margin-bottom: 1.1rem; }
.about__cols ul { list-style: none; }
.about__cols li { padding: 8px 0; border-bottom: 1px solid var(--faint-2); font-size: 0.98rem; }
@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .about__cols { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { padding-block: clamp(70px, 12vh, 150px); text-align: center; }
.contact__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 6.5vw, 5rem); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 2.6rem; }
.contact__links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.foot { max-width: var(--maxw); margin-inline: auto; padding: 30px var(--gutter) 50px; display: flex; justify-content: space-between; border-top: 1px solid var(--faint); font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
@media (max-width: 480px) { .foot { flex-direction: column; gap: 8px; } }

/* ---------- case sections (kicker + components) ---------- */
.case__kicker { display: flex; align-items: baseline; gap: 14px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.6rem); letter-spacing: -0.01em; margin: clamp(48px, 7vh, 80px) 0 26px; padding-top: 22px; border-top: 1px solid var(--faint); }
.case__kicker b { font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; color: var(--accent); letter-spacing: 0.1em; transform: translateY(-2px); }

.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.idea-grid h5 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.74rem; color: var(--accent); margin-bottom: 0.9rem; }
.idea-grid p { font-size: 1rem; color: #d3d1ca; line-height: 1.6; }
.idea-grid strong { color: var(--ink); }
@media (max-width: 760px) { .idea-grid { grid-template-columns: 1fr; gap: 22px; } }

.posline { font-family: var(--font-mono); font-size: 0.95rem; color: var(--muted); margin-top: 28px; padding: 14px 0; border-top: 1px solid var(--faint-2); }
.posline strong { color: var(--accent); letter-spacing: 0.02em; }

.figure-wide { margin-top: 8px; border-radius: 14px; overflow: hidden; border: 1px solid var(--faint); background: var(--bg-2); box-shadow: 0 30px 80px -42px rgba(0,0,0,.85); }
.figure-wide img { width: 100%; display: block; }
.figure-wide figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); padding: 13px 18px; border-top: 1px solid var(--faint); }

.featurelist, .stack { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--faint); border: 1px solid var(--faint); border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.featurelist li, .stack li { background: var(--bg); padding: 20px 22px; }
.featurelist b, .stack b { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--accent); display: block; margin-bottom: 7px; }
.featurelist span, .stack span { font-size: 0.96rem; color: #cbc9c2; line-height: 1.5; }
.stack b { color: var(--ink); }
.stack em, .featurelist em { color: var(--accent); font-style: normal; }
@media (max-width: 680px) { .featurelist, .stack { grid-template-columns: 1fr; } }

.statuslist { list-style: none; display: grid; gap: 12px; }
.statuslist li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; padding: 14px 18px; border: 1px solid var(--faint); border-radius: 10px; font-size: 1rem; color: #d3d1ca; }
.statuslist b { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.statuslist .is-done b { background: rgba(200,242,74,.14); color: var(--accent); }
.statuslist .is-now b { background: var(--accent); color: var(--accent-ink); }
.statuslist .is-next b { border: 1px solid var(--faint); color: var(--muted); }
.statuslist .is-done { opacity: .8; }

/* render-pending placeholders (cover + diagram) */
.ph-render { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 16/9; border: 1px dashed color-mix(in srgb, var(--accent) 32%, transparent); background: repeating-linear-gradient(45deg, var(--bg-2) 0 12px, var(--bg) 12px 24px); }
.ph-render.case__hero { box-shadow: none; }
.ph-render--tall { aspect-ratio: 16/8; }
.ph-render span { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.16em; color: var(--accent); }
.ph-render small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }

/* ---------- browser-frame figures (Conqueror) ---------- */
.browser-fig { margin: 8px 0; }
.browser { border-radius: 12px; overflow: hidden; border: 1px solid var(--faint); box-shadow: 0 30px 80px -42px rgba(0,0,0,.85); }
.browser__bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #202024; border-bottom: 1px solid rgba(0,0,0,.45); }
.browser__dots { display: flex; gap: 7px; flex: 0 0 auto; }
.browser__dots i { width: 11px; height: 11px; border-radius: 50%; background: #4a4a4f; }
.browser__dots i:nth-child(1) { background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }
.browser__url { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); background: #0e0e10; padding: 5px 14px; border-radius: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__hint { flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--accent); }
.browser__view { height: 480px; overflow-y: auto; background: #fff; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.browser__view::-webkit-scrollbar { width: 9px; }
.browser__view::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 9px; }
.browser__view img { width: 100%; display: block; }
.browser-fig figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); padding: 13px 4px 0; line-height: 1.4; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ba-pair .browser__view { height: 420px; }
@media (max-width: 760px) { .ba-pair { grid-template-columns: 1fr; } }

/* ---------- reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; } }
