/* =========================================
   Boris Mitioglov — Portfolio
   Dark, terminal-tinged, editorial
   ========================================= */

/* ---------- Theme tokens ---------- */
:root {
  /* Dark (default) */
  --bg:        oklch(0.16 0.008 255);
  --bg-2:      oklch(0.19 0.008 255);
  --bg-3:      oklch(0.22 0.010 255);
  --panel:     oklch(0.20 0.008 255);
  --border:    oklch(0.30 0.010 255);
  --border-2:  oklch(0.25 0.010 255);
  --fg:        oklch(0.96 0.008 90);
  --muted:     oklch(0.72 0.010 90);
  --dim:       oklch(0.50 0.010 250);
  --accent:    oklch(0.80 0.15 155);
  --accent-2:  oklch(0.65 0.18 155);
  --accent-bg: oklch(0.80 0.15 155 / 0.08);
  --accent-line: oklch(0.80 0.15 155 / 0.35);

  /* Fonts */
  --f-display: "Instrument Serif", "IBM Plex Serif", Georgia, serif;
  --f-body:    "Inter", system-ui, -apple-system, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, Menlo, monospace;

  --f-scale: 1;
}

[data-theme="light"] {
  --bg:        oklch(0.985 0.004 90);
  --bg-2:      oklch(0.96 0.006 90);
  --bg-3:      oklch(0.93 0.008 90);
  --panel:     oklch(0.97 0.006 90);
  --border:    oklch(0.85 0.010 90);
  --border-2:  oklch(0.90 0.008 90);
  --fg:        oklch(0.20 0.010 250);
  --muted:     oklch(0.38 0.010 250);
  --dim:       oklch(0.58 0.010 250);
  --accent:    oklch(0.58 0.17 155);
  --accent-2:  oklch(0.50 0.18 155);
  --accent-bg: oklch(0.58 0.17 155 / 0.10);
  --accent-line: oklch(0.58 0.17 155 / 0.35);
}
[data-theme="sepia"] {
  --bg:        oklch(0.94 0.024 75);
  --bg-2:      oklch(0.91 0.028 75);
  --bg-3:      oklch(0.87 0.030 75);
  --panel:     oklch(0.92 0.026 75);
  --border:    oklch(0.78 0.030 75);
  --border-2:  oklch(0.84 0.028 75);
  --fg:        oklch(0.26 0.020 60);
  --muted:     oklch(0.44 0.024 60);
  --dim:       oklch(0.60 0.024 60);
  --accent:    oklch(0.52 0.14 40);
  --accent-2:  oklch(0.46 0.16 40);
  --accent-bg: oklch(0.52 0.14 40 / 0.10);
  --accent-line: oklch(0.52 0.14 40 / 0.35);
}

/* Accent variants */
[data-accent="amber"]   { --accent: oklch(0.82 0.16 75);  --accent-2: oklch(0.70 0.18 75);  --accent-bg: oklch(0.82 0.16 75 / 0.08);  --accent-line: oklch(0.82 0.16 75 / 0.35); }
[data-accent="blue"]    { --accent: oklch(0.75 0.17 240); --accent-2: oklch(0.62 0.18 240); --accent-bg: oklch(0.75 0.17 240 / 0.08); --accent-line: oklch(0.75 0.17 240 / 0.35); }
[data-accent="magenta"] { --accent: oklch(0.72 0.19 340); --accent-2: oklch(0.60 0.20 340); --accent-bg: oklch(0.72 0.19 340 / 0.08); --accent-line: oklch(0.72 0.19 340 / 0.35); }
[data-accent="red"]     { --accent: oklch(0.72 0.20 20);  --accent-2: oklch(0.60 0.22 20);  --accent-bg: oklch(0.72 0.20 20 / 0.08);  --accent-line: oklch(0.72 0.20 20 / 0.35); }

/* Font pair variants */
[data-fontpair="geometric"] {
  --f-display: "Geist", system-ui, sans-serif;
  --f-body:    "Geist", system-ui, sans-serif;
  --f-mono:    "Geist Mono", ui-monospace, monospace;
}
[data-fontpair="classic"] {
  --f-display: "EB Garamond", Georgia, serif;
  --f-body:    "IBM Plex Sans", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, monospace;
}

[data-density="compact"] {
  --f-scale: 0.92;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: calc(16px * var(--f-scale));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
}

/* Subtle grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
[data-theme="light"] body::before,
[data-theme="sepia"] body::before {
  background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.inline-link { color: var(--accent); border-bottom: 1px dashed var(--accent-line); }
.inline-link:hover { background: var(--accent-bg); }

button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }

em { font-style: italic; font-family: var(--f-display); color: var(--accent); font-weight: 400; }

/* ---------- Utilities ---------- */
.mono { font-family: var(--f-mono); letter-spacing: 0.01em; }
.xs   { font-size: 0.70rem; }
.sm   { font-size: 0.82rem; }
.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.accent{ color: var(--accent); }
.uppercase { text-transform: uppercase; }
.tracked { letter-spacing: 0.18em; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 2rem; }

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (max-width: 1000px) {
  .sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

.sb-top { display: flex; flex-direction: column; gap: 1rem; }
.sb-avatar {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-3);
}
.sb-avatar .avatar-inner { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.95) contrast(1.02); }
.sb-avatar-ring { position: absolute; inset: -3px; border-radius: 999px; border: 1px dashed var(--accent-line); animation: spin 18s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.sb-name .display {
  font-family: var(--f-display);
  font-size: 1.9rem;
  line-height: 1.0;
  letter-spacing: -0.01em;
}

/* Nav */
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  color: var(--muted);
  text-align: left;
  position: relative;
  transition: color 0.15s, background 0.15s;
}
.sb-nav-item:hover { color: var(--fg); background: var(--bg-3); }
.sb-nav-item.active { color: var(--fg); }
.sb-nav-item.active .sb-nav-dot { opacity: 1; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.sb-nav-idx { opacity: 0.6; width: 1.4rem; }
.sb-nav-label { flex: 1; }
.sb-nav-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--border); opacity: 0.5; transition: all 0.2s; }

/* Bottom */
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.sb-status { display: flex; align-items: center; gap: 0.5rem; }
.sb-pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } }
.sb-meta { display: flex; flex-direction: column; gap: 2px; }
.sb-links { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.sb-links a { border-bottom: 1px solid transparent; }
.sb-links a:hover { color: var(--accent); border-color: var(--accent-line); }

/* ---------- Main content ---------- */
.main {
  padding: 3rem clamp(1.5rem, 5vw, 5rem) 4rem;
  max-width: 1100px;
  /*margin: 0 auto;*/
}

/* Sections */
.sec { padding: 4rem 0 3rem; scroll-margin-top: 1rem; }
.sec:first-child { padding-top: 2rem; }
.sec-head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.sec-head-l { display: flex; align-items: center; gap: 0.35rem; text-transform: lowercase; }
.sec-head-rule { flex: 1; height: 1px; background: var(--border); }
.sec-head-aside { white-space: nowrap; }
.sec-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 2rem;
}
.sec-body {}

.prose p { max-width: 62ch; color: var(--muted); margin: 0 0 1em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Hero (editorial) ---------- */
.hero { padding-top: 2rem; padding-bottom: 5rem; position: relative; }
.hero-meta {
  display: flex; justify-content: space-between; align-items: center;
  text-transform: lowercase;
  margin-bottom: 3rem;
}
.hero-meta-right { display: inline-flex; align-items: center; gap: 0.5rem; }

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 2rem;
  text-wrap: pretty;
}
.hero-title .line { display: block; }
.hero-title .line:nth-child(1) { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
.hero-title .line:nth-child(2) { animation: rise 0.9s 0.1s cubic-bezier(.2,.7,.2,1) both; }
.hero-title .line:nth-child(3) { animation: rise 1.0s 0.2s cubic-bezier(.2,.7,.2,1) both; }
.hero-title .line:nth-child(4) { animation: rise 1.1s 0.3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-sub { max-width: 62ch; margin-bottom: 2.5rem; }

.hero-now { margin-top: 2rem; }
.now-list { list-style: none; padding: 0; margin: 0.5rem 0 0; color: var(--muted); }
.now-list li { padding: 0.25rem 0; }
.now-marker { color: var(--accent); margin-right: 0.5rem; }

.hero-scroll { position: absolute; bottom: 0.5rem; right: 0; display: flex; gap: 0.3rem; align-items: center; }
.scroll-arrow { animation: bounce 1.8s ease-in-out infinite; display: inline-block; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Hero (terminal) ---------- */
.hero-terminal { padding-top: 2rem; padding-bottom: 3rem; }
.term-window {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  max-width: 820px;
}
.term-head { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.8rem; background: var(--bg-3); border-bottom: 1px solid var(--border); }
.term-head .dot { width: 10px; height: 10px; border-radius: 999px; }
.term-head .dot.r { background: #ff5f56; }
.term-head .dot.y { background: #ffbd2e; }
.term-head .dot.g { background: #27c93f; }
.term-title { margin-left: 0.6rem; }
.term-body { padding: 1.4rem 1.2rem; font-size: 0.95rem; }
.term-body .prompt { color: var(--accent); margin-right: 0.5rem; }
.term-body .caret { color: var(--accent); animation: blink 1.05s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.term-out { color: var(--muted); line-height: 1.9; }
.term-out .k  { color: var(--fg); }
.term-out .eq { color: var(--dim); margin: 0 0.2rem; }
.term-out .v  { color: var(--muted); }
.term-out .v.accent { color: var(--accent); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: 2rem; }
.about-cell { border: 1px solid var(--border); border-radius: 4px; padding: 0.9rem 1rem; background: var(--panel); }
.about-cell > div:last-child { font-size: 0.9rem; margin-top: 0.3rem; }

/* ---------- Work ---------- */
.work-list { list-style: none; padding: 0; margin: 0; }
.work-item {
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.work-item:last-child { border-bottom: 1px solid var(--border); }
.work-item.highlight {
  background: linear-gradient(90deg, var(--accent-bg) 0%, transparent 60%);
  border-left: 2px solid var(--accent-line);
  padding-left: 1.25rem;
  margin-left: -1.25rem;
}
.work-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 0.5rem 1.2rem 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.work-head:hover { background: var(--bg-3); }
.work-head-l { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.work-period { text-transform: uppercase; letter-spacing: 0.08em; }
.work-title { font-family: var(--f-display); font-size: 1.4rem; line-height: 1.2; }
.work-role { font-weight: 400; }
.work-company { color: var(--accent); }
.work-location { text-transform: lowercase; }
.work-head-r { display: flex; align-items: center; gap: 0.8rem; }
.tag-live { color: var(--accent); border: 1px solid var(--accent-line); padding: 0.12rem 0.45rem; border-radius: 999px; background: var(--accent-bg); }
.work-toggle { font-size: 1.2rem; color: var(--dim); width: 1rem; text-align: center; }
.work-item.open .work-toggle { color: var(--accent); }

.work-body { padding: 0 0 1.6rem 0; }
.work-bullets { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 0.55rem; max-width: 72ch; }
.work-bullets li { color: var(--muted); position: relative; padding-left: 1.2rem; text-wrap: pretty; }
.work-bullets li::before { content: "›"; color: var(--accent); position: absolute; left: 0; top: 0; }
.work-stack { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem; }

.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  background: var(--bg-2);
  white-space: nowrap;
}

/* ---------- Projects ---------- */
.proj-list { list-style: none; padding: 0; margin: 0; }
.proj-row { border-top: 1px solid var(--border); overflow: hidden; transition: background 0.2s; }
.proj-row:last-child { border-bottom: 1px solid var(--border); }
.proj-row.hover { background: var(--bg-3); }
.proj-row.featured .proj-name::before { content: "★ "; color: var(--accent); font-size: 0.8em; vertical-align: middle; }
.proj-link { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0.5rem; align-items: baseline; }
.proj-row-l { display: flex; gap: 1rem; flex: 1; min-width: 0; align-items: baseline; }
.proj-idx { width: 1.6rem; }
.proj-main { min-width: 0; flex: 1; }
.proj-name { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.2; display: flex; align-items: center; gap: 0.6rem; }
.proj-featured { color: var(--accent); background: var(--accent-bg); padding: 0.12rem 0.45rem; border-radius: 2px; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; }
.proj-tagline { margin-top: 0.2rem; }
.proj-row-r { display: flex; gap: 1.2rem; align-items: baseline; text-align: right; white-space: nowrap; }
.proj-desc { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.proj-desc-inner { padding: 0 0.5rem 1.2rem 3rem; max-width: 72ch; display: flex; flex-direction: column; gap: 0.5rem; }

/* ---------- PumpX Case Study ---------- */
.pumpx-case {
  background: linear-gradient(180deg, transparent 0%, var(--accent-bg) 30%, transparent 100%);
  padding: 5rem 2rem 5rem;
  margin: 4rem -2rem;
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
}
.pumpx-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) {
  .pumpx-hero { grid-template-columns: 1fr; }
}
.pumpx-eyebrow { text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.75rem; }
.pumpx-title { margin-top: 0; }
.pumpx-ctas { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { color: var(--bg); transform: translateY(-1px); box-shadow: 0 8px 20px -8px var(--accent); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Phone mockup */
.phone-mock { display: flex; justify-content: center; }
.phone-frame {
  width: 270px; height: 540px;
  background: #0a0a0a;
  border: 2px solid var(--border);
  border-radius: 36px;
  padding: 10px;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 70px; height: 18px; background: #0a0a0a; border-radius: 999px; z-index: 2; }
.phone-screen {
  width: 100%; height: 100%;
  background: linear-gradient(165deg, oklch(0.16 0.02 155) 0%, oklch(0.12 0.008 255) 60%);
  border-radius: 28px;
  padding: 32px 16px 16px;
  color: #e6e6e6;
  font-family: var(--f-body);
  overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
}
.phone-screen-img { padding: 0; background: #000; }
.phone-screen-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 28px; }
.app-head { display: flex; justify-content: space-between; color: rgba(255,255,255,0.7); }
.app-title { text-transform: uppercase; letter-spacing: 0.12em; }
.app-heading { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.1; }
.app-sub { margin-bottom: 0.4rem; }
.app-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ac-row { display: flex; justify-content: space-between; align-items: center; }
.ac-name { font-weight: 500; font-size: 0.9rem; }
.ac-meta { margin-top: 2px; }
.ac-pill { padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); font-size: 0.62rem; }
.ac-pill.accent { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent); }
.ac-bars { display: flex; gap: 4px; align-items: flex-end; height: 30px; }
.ac-bar { width: 10px; background: rgba(255,255,255,0.15); border-radius: 2px 2px 0 0; }
.ac-bar.active { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.app-coach { background: var(--accent-bg); border: 1px solid var(--accent-line); padding: 8px 10px; border-radius: 8px; line-height: 1.5; }

/* Metrics */
.metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
@media (max-width: 800px) { .metrics-row { grid-template-columns: repeat(2, 1fr); } }
.metric-card { border: 1px solid var(--border); border-radius: 4px; padding: 1.2rem; background: var(--panel); }
.metric-val { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.metric-lbl { margin-top: 0.5rem; text-transform: lowercase; }
.metric-trend { margin-top: 0.3rem; }

/* Case subtitle */
.case-subhead { text-transform: lowercase; letter-spacing: 0.05em; }
.case-subtitle { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 400; margin: 0.5rem 0 1.5rem; letter-spacing: -0.01em; }

/* Architecture diagram */
.arch-diagram { position: relative; margin: 1.5rem 0 2rem; padding: 1rem 0; }
.arch-wrap { position: relative; width: 100%; }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arch-lines path { stroke: var(--border); stroke-width: 1; }
.arch-packets .packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.arch-nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1rem 3rem;
  position: relative;
  z-index: 2;
}
.arch-node { border: 1px solid var(--border); background: var(--panel); padding: 0.9rem 1rem; border-radius: 4px; display: flex; flex-direction: column; gap: 0.2rem; position: relative; }
.arch-node.ai { border-color: var(--accent-line); background: var(--accent-bg); }
.an-label { text-transform: uppercase; letter-spacing: 0.1em; }
.an-name { font-family: var(--f-display); font-size: 1.15rem; }
@media (max-width: 800px) {
  .arch-nodes { grid-template-columns: 1fr 1fr; }
  .arch-svg { display: none; }
}

/* Case grid */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1rem; }
@media (max-width: 800px) { .case-grid { grid-template-columns: 1fr; } }
.case-col { border-left: 1px solid var(--accent-line); padding-left: 1rem; }
.case-col-head { text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.5rem; }

.stack-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

/* ---------- SEOAuto case study ---------- */
/* ---------- Skills ---------- */
.seo-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .seo-hero { grid-template-columns: 1fr; } }

.browser-mock {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}
.bm-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--bg-3); border-bottom: 1px solid var(--border); }
.bm-dot { width: 10px; height: 10px; border-radius: 999px; }
.bm-dot.r { background: #ff5f56; } .bm-dot.y { background: #ffbd2e; } .bm-dot.g { background: #27c93f; }
.bm-url { margin-left: 10px; padding: 3px 10px; background: var(--bg-2); border-radius: 4px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.bm-body { background: #fff; }
.bm-body img { width: 100%; display: block; }

.chart-frame { border: 1px solid var(--border); border-radius: 6px; background: var(--panel); padding: 1rem; margin-top: 0.75rem; }
.chart-caption { text-transform: lowercase; margin-bottom: 0.75rem; }
.chart-img { width: 100%; display: block; border-radius: 4px; background: #fff; }

/* Pipeline */
.pipe-diagram { display: flex; align-items: stretch; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.pipe-step { flex: 1 1 180px; min-width: 180px; border: 1px solid var(--border); border-radius: 4px; padding: 0.9rem 1rem; background: var(--panel); display: flex; flex-direction: column; gap: 0.25rem; }
.pipe-step.accent-step { border-color: var(--accent-line); background: var(--accent-bg); }
.ps-num { text-transform: uppercase; letter-spacing: 0.1em; }
.ps-name { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.2; }
.pipe-arrow { align-self: center; color: var(--dim); font-size: 1.2rem; }
@media (max-width: 700px) { .pipe-arrow { display: none; } }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.skill-cat { border-top: 1px solid var(--border); padding-top: 0.8rem; }
.skill-cat-head { text-transform: lowercase; margin-bottom: 0.6rem; }
.skill-items { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ---------- Credentials ---------- */
.credentials-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
@media (max-width: 800px) { .credentials-grid { grid-template-columns: 1fr; } }
.cred-head { text-transform: lowercase; margin-bottom: 0.75rem; }
.cred-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.cred-item { border-left: 1px solid var(--border); padding-left: 0.9rem; transition: border-color 0.2s; }
.cred-item:hover { border-left-color: var(--accent); }
.cred-name { font-family: var(--f-display); font-size: 1.1rem; line-height: 1.3; }
.cred-issuer { margin-top: 0.2rem; }
.cred-link { display: block; }
.cred-link:hover .cred-name { color: var(--accent); }
.cred-verify { opacity: 0; transition: opacity 0.15s; margin-left: 0.2rem; }
.cred-link:hover .cred-verify { opacity: 1; }

/* ---------- Contact ---------- */
.contact-sec { padding-bottom: 3rem; }
.contact-title { font-family: var(--f-display); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 1.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  text-align: left; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.contact-card:hover { border-color: var(--accent); background: var(--bg-3); transform: translateY(-1px); }
.contact-card.static { cursor: default; }
.contact-card.static:hover { transform: none; border-color: var(--border); background: var(--panel); }
.cc-label { text-transform: uppercase; letter-spacing: 0.1em; }
.cc-value { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.2; word-break: break-all; }
.cc-action { margin-top: 0.2rem; }

.foot { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  z-index: 1000;
  overflow: hidden;
}
.tweaks.collapsed { width: auto; }
.tw-head { display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--bg-3); }
.tweaks.collapsed .tw-head { border-bottom: none; }
.tw-title { letter-spacing: 0.05em; }
.tw-collapse { color: var(--muted); padding: 0 0.3rem; font-size: 1rem; }
.tw-collapse:hover { color: var(--accent); }
.tw-body { padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
.tw-row { display: flex; flex-direction: column; gap: 0.3rem; }
.tw-row-label { text-transform: lowercase; }
.tw-seg { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.tw-seg-btn { flex: 1; padding: 0.35rem 0.4rem; color: var(--muted); text-align: center; transition: all 0.15s; }
.tw-seg-btn:hover { color: var(--fg); background: var(--bg-3); }
.tw-seg-btn.on { color: var(--accent); background: var(--accent-bg); }
.tw-swatches { display: flex; gap: 6px; }
.tw-swatch { width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--border); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.tw-swatch:hover { transform: scale(1.1); }
.tw-swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }
.tw-stack { display: flex; flex-direction: column; gap: 3px; }
.tw-stack-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.5rem; text-align: left; color: var(--muted); border-radius: 3px; transition: all 0.15s; }
.tw-stack-btn:hover { background: var(--bg-3); color: var(--fg); }
.tw-stack-btn.on { background: var(--accent-bg); color: var(--accent); }
.tw-dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; opacity: 0.6; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Selection */
::selection { background: var(--accent); color: var(--bg); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
::-webkit-scrollbar-track { background: transparent; }
