/* ============================================================================
   Irfan Haris — irfanharis.my.id
   Personal portfolio · quiet editorial / security researcher aesthetic
   ----------------------------------------------------------------------------
   Palette : warm cream (#F7F4ED) · ink (#1C1B18) · moss accent (#5F7F55)
   Type    : JetBrains Mono (display) · Inter (body) · Fraunces (italic accents)
   ============================================================================ */

/* ── Self-hosted IBM Plex (latin) ─────────────────────────────────────────── */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/ibm-plex-sans-400-64251e64.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/ibm-plex-sans-500-290aaea2.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/ibm-plex-sans-600-99b2fa32.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/ibm-plex-mono-400-d803141a.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/ibm-plex-mono-500-3f7bbac1.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/ibm-plex-serif-italic-400-e80d65dc.woff2") format("woff2"); }

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --color-bg: #F7F4ED;
  --color-bg-subtle: #F0ECE2;
  --color-bg-deep: #1C1B18;
  --color-text: #1C1B18;
  --color-text-muted: #6A665D;
  --color-text-subtle: #8A857A;
  --color-text-inverse: #F7F4ED;
  --color-border: #E3DFD5;
  --color-border-strong: #C9C3B3;
  --color-accent: #5F7F55;
  --color-accent-subtle: #EAF0E4;
  --color-accent-strong: #3E5838;
  --color-warning: #B5844C;
  --color-danger: #A3483C;

  /* IBM Plex superfamily — professional, low-profile, cohesive */
  --font-sans:   'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; /* display / headings */
  --font-mono:   'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;                    /* labels / terminal */
  --font-accent: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;                                  /* italic accents */

  --container: 1240px;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(.2, .65, .3, .9);
  --shadow-sm: 0 1px 2px rgba(28, 27, 24, .04);
  --shadow-md: 0 8px 24px rgba(28, 27, 24, .06);
  --shadow-lg: 0 12px 32px rgba(28, 27, 24, .08);
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-feature-settings: "cv11", "ss01", "ss03", "calt", "kern";
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
img, video { max-width: 100%; display: block; }
input, textarea, select, button { font: inherit; color: inherit; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--color-text); color: var(--color-text-inverse);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 13px;
  z-index: 9999;
  transition: top .2s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--color-accent); }

/* Visible focus styles */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Background video ────────────────────────────────────────────────────── */
.bg-video-wrap {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--color-bg);
}
.bg-video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: saturate(.5) sepia(.2) brightness(1.02);
  opacity: .76;
}
.bg-video-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(247,244,237,.2) 0%, rgba(247,244,237,.4) 55%, rgba(247,244,237,.55) 100%),
    linear-gradient(180deg, rgba(247,244,237,.2), rgba(247,244,237,.35));
}

/* ── Layout primitives ───────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.page-main { min-height: 60vh; position: relative; z-index: 1; }
.section { padding: 120px 0; border-top: 1px solid var(--color-border); position: relative; }
.section:first-of-type { border-top: none; }
.section-subtle { background: rgba(240, 236, 226, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.section-head { margin-bottom: 48px; }
.section-foot { margin-top: 48px; }

.section:not(.section-subtle)::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(247,244,237,.5), rgba(247,244,237,.65) 50%, rgba(247,244,237,.5));
  pointer-events: none;
  z-index: 0;
}
.section > * { position: relative; z-index: 1; }

@media (max-width: 720px) {
  .section { padding: 80px 0; }
}

/* ── Typography helpers ──────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -.022em;
  margin: 0;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt", "liga";
  text-wrap: balance;
}
h1 { font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; letter-spacing: -.026em; }
h2 { font-variation-settings: "opsz" 120, "SOFT" 30, "WONK" 0; }
h3 { font-variation-settings: "opsz" 72, "SOFT" 40, "WONK" 0; letter-spacing: -.018em; }
h4 { font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0; letter-spacing: -.012em; }

em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
}
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; font-feature-settings: "calt", "ss02"; }
.muted { color: var(--color-text-muted); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 22px;
  font-feature-settings: "calt", "ss02";
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .65; }
.kicker.small { font-size: 10px; letter-spacing: .16em; margin-bottom: 14px; }

.h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -.024em;
  font-weight: 500;
  margin-bottom: 18px;
  font-variation-settings: "opsz" 120, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt", "liga";
  text-wrap: balance;
}
.h2 em { font-variation-settings: "opsz" 120, "SOFT" 60, "WONK" 0; }
.h2-dot { color: var(--color-accent); }
.section-intro {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.62;
  color: var(--color-text-muted);
  margin: 0 0 40px;
  text-wrap: pretty;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--color-text); color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-accent-strong); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border-color: var(--color-border-strong); color: var(--color-text); }
.btn-ghost:hover { border-color: var(--color-text); }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-strong);
  transition: border-color .2s ease, gap .25s ease, color .2s ease;
  font-size: 15px;
}
.text-link:hover { border-color: var(--color-accent); gap: 14px; color: var(--color-accent-strong); }

/* ── Top nav ─────────────────────────────────────────────────────────────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 18px 0;
  transition: background .3s ease, backdrop-filter .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.topnav.is-scrolled {
  padding: 12px 0;
  border-bottom-color: transparent;
}
.topnav.is-scrolled .nav-links,
.topnav.is-scrolled .nav-status {
  background: rgba(247, 244, 237, .85);
  border-color: var(--color-border-strong);
}
.topnav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.logo-mark {
  display: inline-flex; align-items: center;
  height: 44px;
}
.logo-mark img { height: 44px; width: auto; display: block; }

.nav-links {
  justify-self: center;
  display: flex; align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .002em;
  padding: 5px;
  background: rgba(247, 244, 237, .58);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow-sm);
}
.nav-links a {
  color: var(--color-text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
  position: relative;
}
.nav-links a:hover { color: var(--color-text); background: rgba(247, 244, 237, .82); }
.nav-links a.is-active {
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 1px 0 rgba(28,27,24,.04), 0 0 0 1px var(--color-border) inset;
}

/* Right-side status pill (mirrors logo for visual symmetry) */
.nav-status {
  justify-self: end;
  display: inline-flex; align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(247, 244, 237, .58);
  border: 1px solid var(--color-border);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  text-transform: lowercase;
  white-space: nowrap;
  user-select: none;
}
.nav-status .status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(95,127,85,.12);
  animation: pulse 2.4s ease-in-out infinite;
}
.nav-status .status-text strong { color: var(--color-text); font-weight: 500; }
@media (max-width: 1080px) {
  .nav-status .status-text .lbl { display: none; }
}

/* Mobile toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  position: relative;
}
.nav-toggle span {
  width: 18px; height: 1.5px;
  background: var(--color-text);
  position: absolute;
  transition: transform .3s var(--ease-out), opacity .2s ease, top .3s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .topnav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-status { display: none; }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    background: rgba(247, 244, 237, .98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
    align-items: stretch;
    justify-self: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s var(--ease-out);
    font-size: 17px;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.is-active { color: var(--color-accent-strong); }
  .nav-toggle { display: inline-flex; }
}

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--color-accent);
  z-index: 600;
  width: 0%;
  transition: width .1s linear;
}

/* ── Intro overlay ───────────────────────────────────────────────────────── */
.intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-bg-deep);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 24px;
  color: var(--color-text-inverse);
  transition: opacity .7s ease, visibility .7s;
}
.intro-overlay.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.no-intro .intro-overlay { display: none !important; }
.no-intro .page-main { opacity: 1 !important; transform: none !important; }

.intro-logo { display: flex; align-items: center; opacity: 0; animation: introLogo .6s ease .1s forwards; }
.intro-logo img {
  height: 52px; width: auto; display: block;
  filter: drop-shadow(0 0 24px rgba(95,127,85,.35));
  animation: pulse 1.6s ease-in-out infinite;
}
.intro-bar {
  width: 220px; height: 2px;
  background: rgba(247,244,237,.1);
  overflow: hidden; position: relative;
}
.intro-bar::after {
  content: ""; position: absolute; inset: 0;
  background: var(--color-accent);
  transform: translateX(-100%);
  animation: introLoad 1.6s cubic-bezier(.4,.1,.3,1) .1s forwards;
}
.intro-lines {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(247,244,237,.55);
  letter-spacing: .04em;
  display: flex; flex-direction: column; gap: 4px;
  align-items: center; min-height: 50px;
  text-align: center;
}
.intro-lines span { opacity: 0; animation: introLine .4s ease forwards; }
.intro-lines span:nth-child(1) { animation-delay: .2s; }
.intro-lines span:nth-child(2) { animation-delay: .55s; }
.intro-lines span:nth-child(3) { animation-delay: .9s; }
.intro-lines span:nth-child(4) { animation-delay: 1.25s; }

@keyframes introLogo { to { opacity: 1; } }
@keyframes introLoad { to { transform: translateX(0); } }
@keyframes introLine {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: .7; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: .85; }
}

/* App fade-in */
.page-main { opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform .9s var(--ease-out); }
.page-main.is-ready { opacity: 1; transform: translateY(0); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(247,244,237,.85) 0%, rgba(247,244,237,.55) 60%, rgba(247,244,237,.35) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 110px 0 60px; }
}
.hero-copy { max-width: 560px; }
.hero-headline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(42px, 6.2vw, 84px);
  line-height: .98;
  letter-spacing: -.028em;
  margin: 0 0 26px;
  text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt", "liga";
}
.hero-headline em {
  color: var(--color-accent);
  font-weight: 400;
  letter-spacing: -.020em;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
}
.hero-desc {
  font-size: 18px;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  display: flex; gap: 28px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.hero-meta strong { color: var(--color-text); font-weight: 500; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  max-height: 640px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: rgba(240, 236, 226, .88);
  overflow: hidden;
}
.hero-visual canvas { width: 100%; height: 100%; display: block; }
.hero-visual-label {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex; align-items: center; gap: 10px;
}
.hero-visual-label .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}
.hero-visual-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em;
  color: var(--color-text-subtle);
}

.hero-marquee {
  position: absolute; bottom: 0; left: 0; right: 0;
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  padding: 14px 0;
  background: rgba(247, 244, 237, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex; gap: 48px;
  animation: marquee 48s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: .05em;
}
.marquee-track span::before { content: "◇"; color: var(--color-accent); margin-right: 12px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Word reveal ─────────────────────────────────────────────────────────── */
.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s var(--ease-out);
}
.reveal-word.is-shown { opacity: 1; transform: translateY(0); }

/* Generic scroll-reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s var(--ease-out); }
.reveal.is-shown { opacity: 1; transform: translateY(0); }

/* ── Page header (writing/shop/services/etc) ─────────────────────────────── */
.page-header { padding: 140px 0 40px; }
.page-header .kicker { margin-bottom: 14px; }
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 6.6vw, 96px);
  line-height: .94;
  letter-spacing: -.028em;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 24px;
  text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt", "liga";
}
.page-title em {
  color: var(--color-accent);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
}
.page-header .section-intro { max-width: 620px; }

/* ── Home teaser cards ───────────────────────────────────────────────────── */
.home-teasers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 20px;
}
@media (max-width: 720px) { .home-teasers { grid-template-columns: 1fr; } }

.home-teaser-card {
  background: rgba(247, 244, 237, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 36px 32px 32px;
  color: var(--color-text);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: background .25s ease;
  min-height: 220px;
}
.home-teaser-card:hover { background: rgba(240, 236, 226, .96); }
.home-teaser-card:hover .home-teaser-arrow { transform: translateX(6px); color: var(--color-accent); }
.home-teaser-title {
  font-family: var(--font-serif);
  font-size: 36px;
  letter-spacing: -.024em;
  line-height: 1.05;
  font-weight: 500;
  margin: 0;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt";
}
.home-teaser-desc {
  color: var(--color-text-muted);
  font-size: 15px; line-height: 1.62;
  margin: 0; max-width: 42ch;
  text-wrap: pretty;
}
.home-teaser-arrow {
  position: absolute; right: 28px; bottom: 28px;
  font-size: 22px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  transition: transform .25s ease, color .25s ease;
}

/* ── Writing list ────────────────────────────────────────────────────────── */
.tag-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--color-border);
}
.tag-pill {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  background: transparent;
  color: var(--color-text-muted);
  transition: all .2s ease;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}
.tag-pill:hover { border-color: var(--color-text); color: var(--color-text); }
.tag-pill.is-active { background: var(--color-text); color: var(--color-text-inverse); border-color: var(--color-text); }

.post-list { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 180px 1fr 40px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
  transition: padding-left .25s ease, background .25s ease;
}
.post-row:hover { padding-left: 12px; background: var(--color-accent-subtle); }
.post-row:hover .post-arrow { transform: translateX(6px); color: var(--color-accent-strong); }
.post-row:hover .post-title { color: var(--color-accent-strong); }
.post-meta { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.post-title {
  font-family: var(--font-serif);
  font-size: 25px; line-height: 1.18;
  letter-spacing: -.022em;
  margin: 0 0 10px;
  font-weight: 500;
  text-wrap: balance;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt";
}
.post-excerpt {
  color: var(--color-text-muted);
  margin: 0 0 12px;
  font-size: 15px; line-height: 1.62;
  max-width: 62ch;
  text-wrap: pretty;
}
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  padding: 3px 8px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-xs);
}
.section-subtle .tag-chip { background: var(--color-bg); }
.post-arrow {
  font-size: 18px;
  color: var(--color-text-subtle);
  padding-top: 4px;
  transition: transform .25s ease, color .25s ease;
  font-family: var(--font-mono);
}
@media (max-width: 720px) {
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-arrow { display: none; }
  .post-meta { flex-direction: row; gap: 16px; }
}

/* ── Shop ────────────────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 960px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(247, 244, 237, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}
.product-card:hover .product-cta { opacity: 1; transform: translateX(0); }

.product-cover {
  aspect-ratio: 3/4;
  position: relative; overflow: hidden;
  background: var(--color-bg-deep);
  color: var(--color-text-inverse);
}
.product-one .product-cover   { background: #1C1B18; }
.product-two .product-cover   { background: #3E5838; }
.product-three .product-cover { background: #7C5A3A; }
.product-cover-inner {
  position: absolute; inset: 0;
  padding: 20px;
  display: flex; flex-direction: column;
}
.product-cover-inner .mono { color: rgba(247,244,237,.55); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.product-cover-inner .mono:first-child { color: rgba(247,244,237,.85); }
.product-cover-title {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 22px; line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.025em;
  max-width: 80%;
  text-wrap: balance;
}
.product-cover-stripe {
  height: 1px; margin-top: 16px;
  background: rgba(247,244,237,.18);
}
.product-cover-stripe + .product-cover-stripe { margin-top: 6px; width: 60%; }

.product-info { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.badge {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent-strong);
  align-self: flex-start;
  padding: 3px 8px;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-xs);
}
.product-title {
  font-family: var(--font-serif);
  font-size: 20px; line-height: 1.22;
  letter-spacing: -.018em;
  margin: 0; font-weight: 500;
  text-wrap: balance;
  font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern";
}
.product-desc { font-size: 14px; color: var(--color-text-muted); margin: 0; line-height: 1.6; text-wrap: pretty; }
.product-price { font-variant-numeric: tabular-nums lining-nums; }
.product-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--color-border);
}
.product-price { font-weight: 500; font-size: 15px; }
.product-cta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .04em;
  color: var(--color-accent-strong);
  opacity: 0; transform: translateX(-6px);
  transition: all .25s ease;
}

/* Currency toggle */
.currency-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 24px;
}
.currency-toggle button {
  padding: 6px 14px;
  background: transparent;
  color: var(--color-text-muted);
  transition: background .2s ease, color .2s ease;
  letter-spacing: .04em;
}
.currency-toggle button.is-active {
  background: var(--color-text);
  color: var(--color-text-inverse);
}

/* ── Services ────────────────────────────────────────────────────────────── */
.service-table {
  border-top: 1px solid var(--color-border);
}
.service-row {
  display: grid;
  grid-template-columns: 60px 1fr 1.4fr 120px 140px;
  gap: 28px;
  padding: 28px 0 28px 12px;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
  transition: padding-left .25s ease, background .25s ease;
}
.service-row:hover {
  padding-left: 24px;
  background: linear-gradient(90deg, var(--color-accent-subtle), transparent);
}
.service-num { color: var(--color-text-subtle); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.service-title {
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: -.022em;
  line-height: 1.18;
  font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern";
}
.service-desc { color: var(--color-text-muted); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.service-meta { color: var(--color-text-subtle); font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.service-price { text-align: right; color: var(--color-text); font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em; }
@media (max-width: 820px) {
  .service-row { grid-template-columns: 1fr; gap: 6px; padding-left: 0; }
  .service-row:hover { padding-left: 0; }
  .service-price { text-align: left; }
}
.service-foot {
  margin-top: 48px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}

/* ── Experience timeline ─────────────────────────────────────────────────── */
.exp-list {
  display: flex; flex-direction: column;
  margin-top: 20px;
  border-top: 1px solid var(--color-border);
}
.exp-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  transition: background .25s ease;
}
.exp-row:hover { background: rgba(247,244,237,.35); }
.exp-row::before {
  content: "";
  position: absolute;
  left: 176px; top: 52px;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 1px;
  box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 4px var(--color-border);
}
@media (max-width: 720px) {
  .exp-row { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .exp-row::before { display: none; }
}
.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}
.exp-head { margin-bottom: 16px; }
.exp-role {
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: -.024em;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 0 8px;
  line-height: 1.14;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern";
  text-wrap: balance;
}
.exp-company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  letter-spacing: .02em;
}
.exp-dot { color: var(--color-text-subtle); }
.exp-summary {
  color: var(--color-text);
  font-size: 15.5px; line-height: 1.65;
  margin: 0 0 18px;
  max-width: 62ch;
  text-wrap: pretty;
}
.exp-highlights {
  list-style: none;
  padding: 0; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.exp-highlights li {
  display: flex; gap: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}
.exp-bullet {
  font-family: var(--font-mono);
  color: var(--color-accent);
  flex-shrink: 0;
}
.exp-stack { display: flex; flex-wrap: wrap; gap: 6px; }

.exp-foot { margin-top: 60px; }
.exp-cv-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.exp-cv-card .kicker { margin-bottom: 8px; }
.exp-cv-card h3 {
  font-family: var(--font-serif);
  font-size: 30px; letter-spacing: -.018em;
  font-weight: 500;
  margin: 0 0 6px;
}
.exp-cv-card p { margin: 0; max-width: 44ch; color: var(--color-text-muted); }

/* ── About ───────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.photo-frame {
  aspect-ratio: 4/5;
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px;
  overflow: hidden;
  position: relative;
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(.92) contrast(1.02);
}
.photo-frame::after {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 2px;
  background-image: radial-gradient(rgba(28,27,24,.15) .5px, transparent .5px);
  background-size: 3px 3px;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .25;
}

.about-now {
  margin-top: 20px;
  padding: 18px;
  background: rgba(247, 244, 237, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.55;
}
.about-now .mono { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; color: var(--color-text-muted); }
.about-now p { margin: 8px 0 0; color: var(--color-text); }
.now-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent); margin-right: 8px;
  animation: pulse 2.4s ease-in-out infinite;
  vertical-align: middle;
}

.about-copy p {
  font-size: 17px; line-height: 1.7;
  color: var(--color-text);
  max-width: 58ch;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.skill-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--color-border);
}
@media (max-width: 640px) { .skill-matrix { grid-template-columns: 1fr; gap: 24px; } }
.skill-col ul {
  padding: 0; margin: 0; list-style: none;
  font-size: 14px; line-height: 1.75;
  color: var(--color-text-muted);
  font-feature-settings: "cv11", "ss01", "kern";
}
.skill-col li {
  padding: 2px 0;
  display: flex; align-items: baseline; gap: 10px;
}
.skill-col li::before {
  content: "";
  flex: 0 0 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-2px);
  margin: 0;
}

.cred-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 40px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--color-border);
}
.cred-matrix .skill-col li { font-size: 13.5px; line-height: 1.7; }

/* ── Contact form ────────────────────────────────────────────────────────── */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0 16px;
}
.contact-form .form-row.full { grid-column: 1 / -1; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.form-row input,
.form-row textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: rgba(247,244,237,.7);
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  transition: border-color .2s ease, background .2s ease;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(247,244,237,.95);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--color-text-subtle); }
.form-row textarea { min-height: 120px; }
.form-row .error-msg {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-danger);
  display: none;
}
.form-row.has-error input,
.form-row.has-error textarea { border-color: var(--color-danger); }
.form-row.has-error .error-msg { display: block; }
.contact-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .contact-form { grid-template-columns: 1fr; }
}

.contact-done {
  padding: 18px 22px;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  color: var(--color-accent-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 24px 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: rgba(240, 236, 226, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 72px 0 32px;
  border-top: 1px solid var(--color-border);
  position: relative; z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.footer-about p { margin: 14px 0 0; color: var(--color-text-muted); max-width: 280px; }
.footer-about .logo-mark img { height: 34px; opacity: .95; }
.footer-domain {
  margin-top: 10px !important;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.footer-col .kicker { margin-bottom: 8px; }
.footer-col a { color: var(--color-text-muted); padding: 3px 0; transition: color .2s ease; }
.footer-col a:hover { color: var(--color-accent-strong); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-subtle);
  letter-spacing: .04em;
}

.footer-social {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; align-items: center;
  gap: 8px;
}
.footer-social a {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: rgba(247, 244, 237, .7);
  color: var(--color-text-muted);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.footer-social a:hover {
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
  transform: translateY(-1px);
}
.footer-social svg { display: block; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.notfound {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative; z-index: 1;
}
.notfound-code {
  font-family: var(--font-mono);
  font-size: clamp(80px, 14vw, 180px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--color-accent);
  margin: 0 0 16px;
}
.notfound h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -.018em;
  margin: 0 0 12px;
}
.notfound p { color: var(--color-text-muted); max-width: 48ch; margin: 0 0 32px; }

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .marquee-track { animation: none; }
  .bg-video { display: none; }
}

/* ── Portfolio ───────────────────────────────────────────────────────────── */
.portfolio-list {
  display: flex; flex-direction: column;
  gap: 28px;
  margin-top: 16px;
}
.portfolio-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(247, 244, 237, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.portfolio-row:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
@media (max-width: 820px) {
  .portfolio-row { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
}

.portfolio-cover {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xs);
  overflow: hidden;
  color: var(--color-text-inverse);
  background: var(--color-bg-deep);
}
.portfolio-cover::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(135deg, transparent 49%, rgba(247,244,237,.07) 50%, transparent 51%),
    radial-gradient(circle at 22% 28%, rgba(95,127,85,.34), transparent 58%),
    radial-gradient(circle at 78% 80%, rgba(95,127,85,.16), transparent 60%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
.portfolio-cover-mark {
  position: absolute; top: 16px; left: 18px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  color: rgba(247,244,237,.78);
}
.portfolio-cover-mark::before { content: "§ "; opacity: .55; }
.portfolio-cover-label {
  position: absolute; bottom: 16px; left: 18px; right: 18px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(247,244,237,.78);
  border-top: 1px solid rgba(247,244,237,.18);
  padding-top: 12px;
}
@media (max-width: 820px) {
  .portfolio-cover { aspect-ratio: 16/9; }
}
.portfolio-one   .portfolio-cover { background: linear-gradient(155deg, #1C1B18 0%, #2c3328 100%); }
.portfolio-two   .portfolio-cover { background: linear-gradient(155deg, #1f2418 0%, #3E5838 100%); }
.portfolio-three .portfolio-cover { background: linear-gradient(155deg, #1C1B18 0%, #4b3825 100%); }
.portfolio-four  .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #393524 100%); }
.portfolio-five  .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #233738 100%); }
.portfolio-six   .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #25303d 100%); }
.portfolio-seven .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #5a3424 100%); }
.portfolio-eight .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #2e3a42 100%); }
.portfolio-nine  .portfolio-cover { background: linear-gradient(155deg, #1c1b18 0%, #3b2a52 100%); }

.portfolio-body { display: flex; flex-direction: column; gap: 14px; }
.portfolio-body .kicker { margin-bottom: 2px; }
.portfolio-title {
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.7vw, 34px);
  letter-spacing: -.024em;
  line-height: 1.14;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 0;
  font-feature-settings: "ss01", "ss02", "kern", "calt";
}
.portfolio-title em {
  color: var(--color-accent);
  font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 0;
}
.portfolio-summary {
  font-size: 16px; line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}
.portfolio-outcomes {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.portfolio-outcomes li {
  display: flex; gap: 12px;
  font-size: 14px; line-height: 1.6;
  color: var(--color-text);
  text-wrap: pretty;
}
.portfolio-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.portfolio-foot { margin-top: 56px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 540px) { .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 180px; } }
.gallery-span-2 { grid-column: span 2; }
@media (max-width: 540px) { .gallery-span-2 { grid-column: span 1; } }

.gallery-tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-deep);
  color: var(--color-text-inverse);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gallery-tile:hover .gallery-caption { opacity: 1; transform: translateY(0); }

.gallery-tile-inner {
  position: absolute; inset: 0;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-image:
    linear-gradient(135deg, transparent 49%, rgba(247,244,237,.06) 50%, transparent 51%),
    radial-gradient(circle at 25% 28%, rgba(95,127,85,.30), transparent 60%);
  background-size: 24px 24px, 100% 100%;
}
.gallery-kind {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(247,244,237,.55);
}
.gallery-label {
  font-family: var(--font-serif);
  font-size: 19px; line-height: 1.2;
  letter-spacing: -.012em;
  font-weight: 500;
  color: var(--color-text-inverse);
  max-width: 22ch;
  text-wrap: balance;
}
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(180deg, transparent, rgba(28,27,24,.82));
  color: rgba(247,244,237,.82);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.gallery-caption .mono { font-size: 11px; letter-spacing: .04em; }

.gallery-one   .gallery-tile-inner { background-color: #1C1B18; }
.gallery-two   .gallery-tile-inner { background-color: #2A3320; }
.gallery-three .gallery-tile-inner { background-color: #1f2a2a; }
.gallery-four  .gallery-tile-inner { background-color: #3a2c1c; }
.gallery-five  .gallery-tile-inner { background-color: #1f2538; }
.gallery-six   .gallery-tile-inner { background-color: #2c1f1f; }

.gallery-note {
  margin: 36px 0 0;
  font-size: 13px; line-height: 1.6;
  max-width: 64ch;
}
.gallery-note .mono {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  font-size: 10px; letter-spacing: .12em;
  color: var(--color-accent-strong);
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
/* (moved earlier block kept as-is below; this stub avoids accidental dedup) */

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .topnav, .scroll-progress, .intro-overlay, .bg-video-wrap, .hero-marquee { display: none !important; }
  body { background: white; color: black; }
  .section { padding: 24px 0; border-color: #ccc; }
  .portfolio-row, .gallery-tile { break-inside: avoid; box-shadow: none; }
}

/* ============================================================================
   Article detail (writing/:slug) — added for clickable post detail pages
   ============================================================================ */
.article { padding: 40px 0 8px; }
.article-container { max-width: 760px; }
.article-back { margin-bottom: 22px; }
.article-meta { font-size: 13px; letter-spacing: .02em; margin-bottom: 14px; display: flex; gap: 6px; }
.article-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08; letter-spacing: -.02em; font-weight: 600;
  margin: 0 0 18px;
}
.article-lead {
  font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55;
  color: var(--color-text-muted); margin: 0 0 20px;
}
.article-head .post-tags { margin-bottom: 8px; }
.article-body { border-top: 1px solid var(--color-border); padding-top: 32px; margin-top: 26px; }

/* Prose — rich-text (Action Text / .trix-content) rendering.
   Action Text wraps content in .trix-content, so spacing rules must reach inside it. */
.prose { font-size: 17px; line-height: 1.75; color: var(--color-text); }
.prose > *, .prose .trix-content > * { margin: 0 0 1.15em; }
.prose > *:last-child, .prose .trix-content > *:last-child { margin-bottom: 0; }
.prose h2, .prose .trix-content > h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 26px; line-height: 1.2; letter-spacing: -.01em;
  margin: 1.9em 0 .3em;
}
.prose h3, .prose .trix-content > h3 { font-weight: 600; font-size: 20px; margin: 1.6em 0 .2em; }
.prose a { color: var(--color-accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: .4em; }
.prose li::marker { color: var(--color-accent); }
.prose blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 2px 0 2px 18px; margin-left: 0;
  color: var(--color-text-muted); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--color-bg-subtle); border: 1px solid var(--color-border);
  border-radius: var(--radius-xs); padding: .1em .4em;
}
.prose pre {
  background: var(--color-bg-deep); color: var(--color-text-inverse);
  border-radius: var(--radius-md); padding: 16px 18px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: 2em 0; }
.prose strong { font-weight: 600; }

.article-foot { margin-top: 40px; }
