/* =========================================================================
   jacobhansson.no
   Palette: deep forest green on warm paper. Change --accent-* below to
   re-skin the whole site in one place.
   ========================================================================= */

:root {
  /* --- brand ------------------------------------------------------------ */
  --accent-900: #0D2A1D;
  --accent-800: #143B29;
  --accent-700: #16452F;
  --accent-600: #1C583B;
  --accent:     #226B49;   /* primary forest green */
  --accent-400: #4A9670;
  --accent-300: #7FB99B;
  --accent-100: #D8EADF;
  --accent-50:  #EEF6F1;
  --brass:      #A67C34;

  /* --- surfaces --------------------------------------------------------- */
  --paper:     #FCFCFA;
  --paper-2:   #F4F5F1;
  --paper-3:   #ECEEE8;
  --card:      #FFFFFF;
  --ink:       #10161A;
  --ink-2:     #39434A;
  --ink-3:     #6C767D;
  --line:      #E3E5DF;
  --line-2:    #D3D7CE;

  --shadow-sm: 0 1px 2px rgba(16,22,26,.05), 0 1px 1px rgba(16,22,26,.04);
  --shadow-md: 0 4px 14px rgba(16,22,26,.06), 0 1px 3px rgba(16,22,26,.05);
  --shadow-lg: 0 18px 46px rgba(16,22,26,.10), 0 3px 10px rgba(16,22,26,.05);

  /* --- type ------------------------------------------------------------- */
  --font-display: 'Inter Tight', 'Helvetica Neue', -apple-system, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- metrics ---------------------------------------------------------- */
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --pace: clamp(64px, 9vw, 118px);
}

[data-theme='dark'] {
  --accent-900: #C9E5D4;
  --accent-800: #B4DCC4;
  --accent-700: #97CDAF;
  --accent-600: #7DC29E;
  --accent:     #63B78C;
  --accent-400: #4C9B75;
  --accent-300: #2F6A50;
  --accent-100: #17352A;
  --accent-50:  #10241C;
  --brass:      #D2A65A;

  --paper:     #0D1113;
  --paper-2:   #12171A;
  --paper-3:   #171D21;
  --card:      #141A1E;
  --ink:       #ECF0EE;
  --ink-2:     #B4BDB9;
  --ink-3:     #7F8A87;
  --line:      #232B2F;
  --line-2:    #2E383D;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.42);
  --shadow-lg: 0 18px 46px rgba(0,0,0,.55);
}

/* --- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

::selection { background: var(--accent-100); color: var(--accent-900); }
[data-theme='dark'] ::selection { background: var(--accent-300); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); transition: top .18s;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }

/* =========================================================================
   header
   ========================================================================= */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.site-head.is-stuck { border-bottom-color: var(--line); }

.site-head-inner {
  display: flex; align-items: center; gap: 24px;
  height: 66px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; background: var(--accent); color: #fff;
  box-shadow: var(--shadow-sm);
}
[data-theme='dark'] .brand-mark { color: var(--paper); }
.brand-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.brand-text {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: var(--ink); letter-spacing: -.015em;
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--ink-2); transition: background .16s, color .16s;
}
.site-nav a:hover { background: var(--paper-3); color: var(--ink); }
.site-nav a.is-active { color: var(--accent-700); background: var(--accent-50); }
[data-theme='dark'] .site-nav a.is-active { color: var(--accent-700); background: var(--accent-100); }

.head-tools { display: flex; align-items: center; gap: 6px; }
.theme-toggle {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 999px; color: var(--ink-3); transition: background .16s, color .16s;
}
.theme-toggle:hover { background: var(--paper-3); color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon, [data-theme='dark'] .theme-toggle .i-sun { display: none; }
[data-theme='dark'] .theme-toggle .i-moon { display: block; }

.menu-toggle { display: none; width: 36px; height: 36px; place-items: center; border-radius: 999px; }
.menu-toggle span { display: block; width: 17px; height: 1.7px; background: var(--ink); border-radius: 2px; transition: transform .22s, opacity .22s; }
.menu-toggle span + span { margin-top: 5px; }
.menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.4px) rotate(-45deg); }

@media (max-width: 720px) {
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 10px var(--gutter) 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
}

/* =========================================================================
   hero
   ========================================================================= */
.hero { padding-top: clamp(48px, 9vw, 104px); }
.hero-inner { max-width: 980px; }

.hero-eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: ''; width: 26px; height: 1.5px; background: var(--accent); flex: none;
}

.hero-name {
  font-size: clamp(42px, 8.2vw, 84px);
  font-weight: 600; letter-spacing: -.038em; line-height: 1.02;
  margin-bottom: 22px;
}
.hero-tagline {
  font-size: clamp(18px, 2.4vw, 23px); line-height: 1.5; max-width: 40ch;
  color: var(--ink-2); font-weight: 400; text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-rule { margin-top: clamp(48px, 7vw, 84px); }
.hero-rule::after { content: ''; display: block; height: 1px; background: var(--line); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 32px; margin-top: clamp(44px, 6vw, 66px);
  padding-top: 26px; border-top: 1px solid var(--line);
}
.stats dt {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .075em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.stats dd {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  color: var(--ink); letter-spacing: -.02em;
}

/* =========================================================================
   buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -.005em;
  border: 1px solid var(--line-2); color: var(--ink);
  background: var(--card);
  transition: transform .14s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--ink-3); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: var(--shadow-sm);
}
[data-theme='dark'] .btn-primary { color: var(--paper); }
.btn-primary:hover { background: var(--accent-600); border-color: var(--accent-600); }

.linkish { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   section furniture
   ========================================================================= */
.block { padding-block: var(--pace); }
.block-tight { padding-block: clamp(38px, 5vw, 56px); }

.section-head {
  display: grid; gap: 14px; margin-bottom: clamp(30px, 4vw, 46px);
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.section-title { display: flex; align-items: baseline; gap: 16px; }
.section-index {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  color: var(--accent); letter-spacing: .06em; flex: none;
  padding-top: 2px;
}
.section-title h2 { font-size: clamp(24px, 3.4vw, 33px); letter-spacing: -.028em; }
.section-blurb { max-width: 58ch; color: var(--ink-3); font-size: 16px; }
.section-blurb a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.block-more { margin-top: 30px; }
.link-more, .card-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  color: var(--accent);
}
.link-more svg, .card-cta svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s;
}
.link-more:hover svg, .card:hover .card-cta svg { transform: translateX(4px); }

.page-head { padding-top: clamp(40px, 6.5vw, 76px); padding-bottom: clamp(22px, 3vw, 34px); }
.page-eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.page-head h1 { font-size: clamp(34px, 6vw, 58px); letter-spacing: -.033em; margin-bottom: 18px; }
.page-lead { font-size: clamp(17px, 2vw, 19.5px); color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.page-lead a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cv-contact { margin-top: 14px; font-size: 15px; font-family: var(--font-mono); }

/* =========================================================================
   tags & chips
   ========================================================================= */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: 12.5px; font-weight: 500; line-height: 1;
  padding: 6px 11px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tags-sm .tag { font-size: 11.5px; padding: 5px 9px; }
.tags-lg { gap: 9px; }
.tags-lg .tag { font-size: 14px; padding: 9px 15px; background: var(--card); }
.tag-more { color: var(--ink-3); background: transparent; }

.chip {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-50); color: var(--accent-700);
  border: 1px solid var(--accent-100);
}
.chip-ongoing, .chip-active { background: var(--accent-50); color: var(--accent-700); }
.chip-archived, .chip-shelved { background: var(--paper-2); color: var(--ink-3); border-color: var(--line); }

/* =========================================================================
   project cards
   ========================================================================= */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid-featured { grid-template-columns: repeat(2, 1fr); }
.grid-projects { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) { .grid-projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .grid-featured, .grid-projects { grid-template-columns: 1fr; }
}

.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border-color .22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}

.card-media {
  aspect-ratio: 16 / 10; background: var(--paper-2);
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card-media img { transform: scale(1.035); }
.card-media-empty {
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent-50), var(--paper-2));
}
.card-media-empty span {
  font-family: var(--font-display); font-size: 30px; font-weight: 600;
  color: var(--accent-300); letter-spacing: .04em;
}

.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 11px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em;
}
.card-cat { color: var(--accent); text-transform: uppercase; }
.card-year { color: var(--ink-3); margin-left: auto; }
.card-title { font-size: 20px; margin-bottom: 8px; letter-spacing: -.024em; }
.card-tagline { font-size: 14.8px; color: var(--ink-3); line-height: 1.55; text-wrap: pretty; }
.card .tags { margin-top: 14px; }
.card-cta { margin-top: auto; padding-top: 20px; font-size: 14px; }

.grid-featured .card-lg { grid-column: span 2; flex-direction: row; }
.grid-featured .card-lg .card-media {
  aspect-ratio: auto; width: 52%; flex: none;
  border-bottom: 0; border-right: 1px solid var(--line);
}
.grid-featured .card-lg .card-body { padding: clamp(26px, 3.4vw, 42px); justify-content: center; }
.grid-featured .card-lg .card-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.grid-featured .card-lg .card-tagline { font-size: 16.5px; max-width: 46ch; }

@media (max-width: 820px) {
  .grid-featured .card-lg { flex-direction: column; }
  .grid-featured .card-lg .card-media {
    width: 100%; aspect-ratio: 16 / 9;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 620px) { .grid-featured .card-lg { grid-column: span 1; } }

/* =========================================================================
   filter toolbar
   ========================================================================= */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); border: 1px solid var(--line); background: var(--card);
  transition: all .16s;
}
.filter span {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  padding-left: 6px; border-left: 1px solid var(--line-2);
}
.filter:hover { border-color: var(--ink-3); color: var(--ink); }
.filter.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
[data-theme='dark'] .filter.is-active { color: var(--paper); }
.filter.is-active span { color: inherit; opacity: .72; border-left-color: currentColor; }

.search {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  min-width: 230px; transition: border-color .16s, box-shadow .16s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.search svg {
  width: 15px; height: 15px; flex: none; fill: none; stroke: var(--ink-3);
  stroke-width: 1.7; stroke-linecap: round;
}
.search input { border: 0; outline: 0; background: none; width: 100%; font-size: 15px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.empty-state { text-align: center; padding: 60px 0; color: var(--ink-3); }
.card.is-hidden { display: none; }

/* =========================================================================
   timeline
   ========================================================================= */
.timeline { display: grid; gap: 4px; }
.tl-year {
  display: grid; grid-template-columns: 96px 1fr; gap: 24px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.tl-year:first-child { border-top: 0; }
.tl-year-label {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--accent); padding-top: 5px; letter-spacing: .02em;
}
.tl-list { display: grid; gap: 2px; }
.tl-item a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 7px 12px; margin-inline: -12px; border-radius: var(--radius-sm);
  transition: background .15s;
}
.tl-item a:hover { background: var(--paper-2); }
.tl-name {
  font-family: var(--font-display); font-weight: 500; font-size: 16.5px;
  color: var(--ink); letter-spacing: -.015em;
}
.tl-item a:hover .tl-name { color: var(--accent-700); }
.tl-dot {
  flex: 1; height: 1px; min-width: 14px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 5px);
  transform: translateY(-3px);
}
.tl-cat { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.tl-item.is-hidden { display: none; }

@media (max-width: 620px) {
  .tl-year { grid-template-columns: 1fr; gap: 8px; }
  .tl-year-label { padding-top: 0; }
  .tl-dot { display: none; }
  .tl-item a { flex-wrap: wrap; gap: 4px 10px; }
}

/* =========================================================================
   project detail
   ========================================================================= */
.back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; color: var(--ink-3); margin-bottom: 28px;
  transition: color .15s;
}
.back:hover { color: var(--accent); }
.back svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .18s;
}
.back:hover svg { transform: translateX(-3px); }

.project-hero { padding-top: clamp(30px, 4.5vw, 52px); padding-bottom: clamp(26px, 3.5vw, 40px); }
.project-eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .085em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 15px;
}
.project-hero h1 { font-size: clamp(33px, 5.6vw, 56px); letter-spacing: -.034em; margin-bottom: 16px; }
.project-tagline {
  font-size: clamp(17px, 2.1vw, 20.5px); color: var(--ink-2);
  max-width: 60ch; text-wrap: pretty;
}

.project-hero-media {
  width: 100%; max-width: var(--wrap);
  margin: 0 auto clamp(38px, 5vw, 62px);
  padding-inline: var(--gutter);
}
.project-hero-media img {
  width: 100%; max-height: 62vh; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--paper-2);
}

.project-layout {
  display: grid; grid-template-columns: 232px 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: var(--pace);
}
@media (max-width: 880px) {
  .project-layout { grid-template-columns: 1fr; gap: 34px; }
}

.project-side { position: sticky; top: 92px; display: grid; gap: 26px; }
@media (max-width: 880px) {
  .project-side {
    position: static;
    padding-bottom: 26px; border-bottom: 1px solid var(--line);
  }
}

.facts { display: grid; gap: 15px; }
.facts dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px;
}
.facts dd { font-size: 15px; color: var(--ink); font-weight: 500; }

.side-links h2, .toc h2 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  margin-bottom: 11px;
}
.side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 500; color: var(--ink);
  background: var(--card); transition: all .16s;
}
.side-link:hover { border-color: var(--accent); color: var(--accent-700); background: var(--accent-50); }
.side-link svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.toc { display: grid; gap: 1px; }
.toc a {
  font-size: 14px; color: var(--ink-3); padding: 5px 0 5px 12px;
  border-left: 2px solid var(--line); transition: all .15s;
}
.toc a:hover, .toc a.is-current { color: var(--accent-700); border-left-color: var(--accent); }

.project-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding-bottom: var(--pace);
}
.pn {
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); transition: all .18s;
}
.pn:hover { border-color: var(--accent); background: var(--accent-50); transform: translateY(-2px); }
.pn-next { text-align: right; }
.pn-label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 6px;
}
.pn-title {
  font-family: var(--font-display); font-weight: 500; font-size: 17px;
  color: var(--ink); letter-spacing: -.018em;
}
@media (max-width: 620px) { .project-nav { grid-template-columns: 1fr; } .pn-next { text-align: left; } }

/* =========================================================================
   prose
   ========================================================================= */
.prose { max-width: 68ch; font-size: 17px; line-height: 1.72; color: var(--ink-2); }
.prose-wide { max-width: 72ch; }
.prose-lead { font-size: 18px; }
.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-size: clamp(21px, 2.6vw, 26px); margin-top: 2.1em; margin-bottom: .55em;
  letter-spacing: -.026em; scroll-margin-top: 92px;
}
.prose h3 {
  font-size: 18.5px; margin-top: 1.7em; margin-bottom: .4em;
  letter-spacing: -.02em; scroll-margin-top: 92px;
}
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--accent-700); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--accent-300);
  transition: text-decoration-color .15s;
}
.prose a:hover { text-decoration-color: var(--accent); }

.md-list { display: grid; gap: .5em; padding-left: 1.35em; }
.md-list li { position: relative; }
.md-list li::before {
  content: ''; position: absolute; left: -1.05em; top: .68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-300);
}
ol.md-list { counter-reset: li; }
ol.md-list li::before {
  counter-increment: li; content: counter(li) '.';
  background: none; width: auto; height: auto; top: 0;
  left: -1.35em; color: var(--accent); font-family: var(--font-mono); font-size: 13px;
}
.md-list .nested { margin-top: .45em; }

.prose blockquote {
  border-left: 2px solid var(--accent-300);
  padding: 2px 0 2px 20px; color: var(--ink-3); font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .7em; }

.prose code {
  font-family: var(--font-mono); font-size: .87em;
  background: var(--paper-2); border: 1px solid var(--line);
  padding: 1.5px 5px; border-radius: 5px; color: var(--accent-700);
}
.prose .code {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px;
  overflow-x: auto; font-size: 13.6px; line-height: 1.6;
}
.prose .code code { background: none; border: 0; padding: 0; color: var(--ink-2); }

.rule { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.8px; }
.prose th, .prose td { padding: 11px 15px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  background: var(--paper-2);
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--ink); font-weight: 500; }

.md-figure { margin-block: 1.8em; }
.md-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.md-figure figcaption, .g-item figcaption {
  margin-top: 9px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5;
}

.embed {
  margin-block: 1.8em; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2);
}
.embed iframe, .embed video { width: 100%; height: 100%; border: 0; }

/* =========================================================================
   gallery + lightbox
   ========================================================================= */
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 1.6em;
}
.gallery[data-count='1'] { grid-template-columns: 1fr; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.g-item { margin: 0; }
.g-open {
  display: block; width: 100%; padding: 0; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); background: var(--paper-2);
  cursor: zoom-in;
}
.g-open img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.3,1), opacity .2s;
}
.g-open:hover img { transform: scale(1.03); }
.g-video video { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: clamp(16px, 4vw, 56px);
  background: rgba(10, 14, 12, .93);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .18s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 14px; }
.lb-figure img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: 10px; margin-inline: auto;
}
.lb-figure figcaption {
  text-align: center; color: rgba(255,255,255,.72); font-size: 14px;
  max-width: 66ch; margin-inline: auto;
}
.lb-figure figcaption:empty { display: none; }

.lb-close, .lb-prev, .lb-next {
  position: absolute; color: #fff; opacity: .62;
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 999px; font-size: 30px; line-height: 1;
  transition: opacity .15s, background .15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; background: rgba(255,255,255,.12); }
.lb-close { top: 16px; right: 16px; font-size: 34px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 42px; }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 42px; }
@media (max-width: 620px) { .lb-prev, .lb-next { display: none; } }

/* =========================================================================
   home extras
   ========================================================================= */
.block-split {
  display: grid; grid-template-columns: 1fr 320px;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
@media (max-width: 880px) { .block-split { grid-template-columns: 1fr; } }

.split-side { display: grid; gap: 18px; }
.now, .side-card {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
.now { background: var(--accent-50); border-color: var(--accent-100); }
.now-title {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  margin-bottom: 14px;
}
.now-list { display: grid; gap: 11px; font-size: 15px; }
.now-list li { position: relative; padding-left: 17px; line-height: 1.5; }
.now-list li::before {
  content: ''; position: absolute; left: 0; top: .58em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.now-list a, .mini-list a { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }

.mini-list { display: grid; gap: 14px; }
.mini-row { display: grid; gap: 3px; font-size: 14.5px; }
.mini-when { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .03em; }
.mini-what { display: grid; gap: 1px; }
.mini-what strong { color: var(--ink); font-weight: 600; font-size: 15px; }
.mini-what em { font-style: normal; color: var(--ink-3); font-size: 14px; }

.contact { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 720px; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 17px 4px; border-bottom: 1px solid var(--line);
  font-size: 16px; transition: padding .18s, color .18s;
}
.contact-row span:first-child {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); flex: none;
}
.contact-row span:last-child { color: var(--ink); font-weight: 500; text-align: right; word-break: break-word; }
a.contact-row:hover { padding-inline: 12px 4px; }
a.contact-row:hover span:last-child { color: var(--accent-700); }
.contact-static { cursor: default; }

/* =========================================================================
   CV
   ========================================================================= */
.cv-block + .cv-block { padding-top: 0; }
.cv-rows { display: grid; }
.cv-row {
  display: grid; grid-template-columns: 168px 1fr; gap: 28px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.cv-row:last-child { border-bottom: 0; }
.cv-when {
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  letter-spacing: .01em; padding-top: 3px;
}
.cv-role { font-size: 19px; letter-spacing: -.02em; margin-bottom: 4px; }
.cv-org { font-size: 15.5px; color: var(--ink-3); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.cv-org a { color: var(--accent-700); }
.cv-loc::before { content: '·'; margin-right: 10px; color: var(--line-2); }
.cv-what p { font-size: 15.8px; line-height: 1.65; max-width: 68ch; }
.cv-highlights { display: grid; gap: 7px; margin-top: 11px; }
.cv-highlights li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.6; max-width: 68ch; }
.cv-highlights li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-300);
}
.lang-list { display: grid; gap: 8px; }
.lang-list li { display: flex; gap: 12px; font-size: 15.5px; }
.lang-list strong { color: var(--ink); min-width: 110px; font-weight: 600; }
.lang-list span { color: var(--ink-3); }

@media (max-width: 700px) {
  .cv-row { grid-template-columns: 1fr; gap: 8px; }
  .cv-when { padding-top: 0; }
}

/* =========================================================================
   footer
   ========================================================================= */
.site-foot { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: auto; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 24px;
  padding-block: 44px 40px; align-items: start;
}
.footer-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.footer-brand .muted { font-size: 14.5px; margin-top: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14.5px; }
.footer-links a { color: var(--ink-2); transition: color .15s; }
.footer-links a:hover { color: var(--accent-700); }
.footer-meta { grid-column: 1 / -1; padding-top: 26px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 620px) { .footer-inner { grid-template-columns: 1fr; } }

.notfound { min-height: 46vh; }

/* =========================================================================
   print — the CV page becomes a clean PDF
   ========================================================================= */
@media print {
  :root { --paper: #fff; --card: #fff; --ink: #000; --ink-2: #222; --ink-3: #555;
          --line: #ccc; --accent: #1a5c3d; --accent-700: #14452e; }
  .site-head, .site-foot, .hero-actions, .theme-toggle, .menu-toggle,
  .lightbox, .toolbar, .block-more { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .block { padding-block: 14pt; }
  .page-head { padding-top: 0; }
  .cv-row { page-break-inside: avoid; padding: 11pt 0; }
  .section-head { page-break-after: avoid; }
  a { text-decoration: none; color: #000; }
  .wrap { max-width: none; padding-inline: 0; }
}

/* portrait on the about page */
.portrait {
  float: right; width: clamp(140px, 22%, 210px);
  margin: 4px 0 20px 28px;
}
.portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
@media (max-width: 620px) {
  .portrait { float: none; width: 150px; margin: 0 0 20px; }
}

/* headerless spec tables: `| | |` reads as a definition list */
.table-plain td:first-child {
  width: 34%; color: var(--ink-3); font-weight: 500;
  font-family: var(--font-mono); font-size: 13px;
  vertical-align: top; padding-top: 13px;
}
.table-plain td:last-child { color: var(--ink); font-weight: 500; }
