/* Leon Bachmann · Portfolio v2 – dark & calm */
:root {
  --bg: #F7F4EE;
  --bg-2: #FFFFFF;
  --bg-3: #EFEAE0;
  --text: #1B1D1C;
  --soft: #474B49;
  --muted: #7B7D78;
  --line: #E3DDD2;
  --accent: #E0592A;
  --accent-2: #C04A1F;
  --par: #3E8E7E;
  --serif: 'Inter Tight', system-ui, sans-serif;
  --sans: 'Inter Tight', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --wrap: 1240px;
  --gut: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--soft); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--text); margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
strong { color: var(--text); font-weight: 500; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.label { font: 400 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(226,115,63,.5); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(226,115,63,0); } 100% { box-shadow: 0 0 0 0 rgba(226,115,63,0); } }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gut); background: rgba(247,244,238,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { font-weight: 500; color: var(--text); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.nav nav { display: flex; gap: 4px; }
.nav nav a { text-decoration: none; font-size: 15px; color: var(--soft); padding: 7px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav nav a:hover, .nav nav a.active { color: var(--text); background: var(--bg-3); }
.nav .nav-cta { color: var(--bg) !important; background: var(--text) !important; }
.nav .nav-cta:hover { background: var(--accent) !important; }

/* hero */
.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 10vw, 120px) var(--gut) 0; display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px 64px; align-items: end; }
.hero h1 { font-size: clamp(56px, 10vw, 136px); line-height: .92; letter-spacing: -.045em; font-weight: 500; margin: 0 0 36px; }
.hero h1 .l { display: block; opacity: 0; transform: translateY(30px); animation: up 1s var(--ease) forwards; }
.hero h1 .l:nth-child(2) { animation-delay: .1s; } .hero h1 .l:nth-child(3) { animation-delay: .2s; }
.hero h1 em { color: var(--accent); letter-spacing: -.02em; padding-right: .04em; }
@keyframes up { to { opacity: 1; transform: none; } }
.lead { font-size: clamp(18px, 1.7vw, 21px); max-width: 30em; color: var(--soft); margin: 0; }
.portrait { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 30%;  transition: filter 1s var(--ease), transform 1.2s var(--ease); }
.portrait:hover img { transform: scale(1.03); }
.meta { grid-column: 1 / -1; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.meta div { padding: 20px 20px 0 0; }
.meta dt { font: 400 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta dd { margin: 0; color: var(--text); font-size: 15px; }

/* section heads */
section { position: relative; }
.work, .path, .about, .contact { max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 14vw, 168px) var(--gut) 0; }
.head { margin-bottom: 56px; }
.head h2 { font-size: clamp(48px, 8.4vw, 112px); line-height: .95; letter-spacing: -.04em; }
.head h2 em, .contact h2 em { color: var(--accent); letter-spacing: -.01em; }
.sub { font: 700 clamp(26px, 3.2vw, 40px)/1.15 var(--serif); color: var(--soft); margin: 14px 0 0; }
.sub em { color: var(--accent); }
.sub.small { font: 400 18px/1.6 var(--sans); max-width: 34em; margin-top: 20px; }

/* case */
.case-top { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px 80px; margin-bottom: 64px; }
.case-text p { font-size: 19px; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 11px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; color: var(--text); font-size: 15px; }
.facts a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid rgba(240,154,110,.35); }
.facts a:hover { border-color: var(--accent-2); }
.facts small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.viewer { margin: 0 calc(var(--gut) * -0.5) 80px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 calc(var(--gut) * .5) 18px; }
.tabs button { font: 400 14px var(--sans); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all .2s; }
.tabs button:hover { color: var(--text); border-color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.screen { all: unset; display: block; width: 100%; cursor: zoom-in; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-3);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(60,40,20,.35); }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: opacity .3s; }
.screen img.swap { opacity: 0; }
.caption { margin: 20px calc(var(--gut) * .5) 0; max-width: 46em; min-height: 3.4em; font-size: 16px; }
.caption b { font: 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-right: 10px; }

.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.cols3 h3 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 20px; display: flex; gap: 12px; align-items: baseline; }
.cols3 h3 span { font: 700 22px var(--serif); color: var(--accent); }
.cols3 p { font-size: 15.5px; }
.stats { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats li { padding: 28px 0 24px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats b { display: block; font: 400 clamp(48px, 6vw, 76px)/1 var(--serif); color: var(--text); }
.stats span { font: 400 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 120px; }
.more article { padding-top: 24px; border-top: 1px solid var(--line); }
.more .label { margin-bottom: 14px; }
.more h3 { font-size: 30px; letter-spacing: -.025em; margin-bottom: 14px; }
.more p { font-size: 15.5px; }
.arrow { color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color .2s; }
.arrow:hover { color: var(--accent); }

.gallery { margin-top: 120px; }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.gallery-head h3 { font: 700 clamp(34px, 4vw, 48px)/1 var(--serif); }
.gallery-head p { margin: 0; color: var(--muted); font-size: 15px; }
.grid-ph { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 10px; }
.ph { all: unset; cursor: zoom-in; overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.ph.tall { grid-row: span 2; } .ph.wide { grid-column: span 2; }
.ph img { width: 100%; height: 100%; object-fit: cover;  transition: filter .6s var(--ease), transform .8s var(--ease); }
.ph:hover img, .ph:focus-visible img { filter: none; transform: scale(1.04); }

/* path */
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.filter button { font: 400 14px var(--sans); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all .2s; }
.filter button:hover { color: var(--text); }
.filter button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.k { width: 8px; height: 8px; border-radius: 50%; }
.k.crit { background: var(--accent); } .k.par { background: var(--par); }
.tl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tl li { display: grid; grid-template-columns: 170px 1.1fr 1fr; gap: 24px 40px; padding: 26px 0 26px 22px; border-bottom: 1px solid var(--line); position: relative; transition: background .3s, opacity .4s; }
.tl li::before { content: ''; position: absolute; left: 0; top: 34px; width: 8px; height: 8px; border-radius: 50%; background: var(--par); }
.tl li[data-track="crit"]::before { background: var(--accent); }
.tl li:hover { background: var(--bg-2); }
.tl li.hide { display: none; }
.when { font: 400 13px/1.9 var(--mono); color: var(--muted); }
.tl h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.25; }
.org { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }
.what { margin: 0; font-size: 15.5px; }
.what a { color: var(--accent-2); text-decoration: none; }
.tl li.ms h3 { font: 700 30px/1.1 var(--serif); color: var(--accent); }
.tl li.ms::before { width: 12px; height: 12px; left: -2px; top: 32px; background: var(--accent); }
.tl li.ms.next::before { background: transparent; border: 1.5px solid var(--accent); }

/* about */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.reasons li { padding: 36px 40px 30px 0; border-bottom: 1px solid var(--line); }
.reasons li:nth-child(even) { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }
.reasons span { font: 700 22px var(--serif); color: var(--accent); }
.reasons h3 { font-size: 28px; letter-spacing: -.025em; margin: 10px 0 12px; }
.reasons p { margin: 0; max-width: 30em; }
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 96px; }
.skills h3 { font: 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.skills ul { list-style: none; margin: 0; padding: 0; }
.skills li { color: var(--text); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.ai { margin: 96px 0 0; padding: 0; max-width: 900px; }
.ai p { font: 700 clamp(26px, 3.4vw, 42px)/1.25 var(--serif); color: var(--text); margin: 0 0 18px; }
.ai cite { font: normal 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ai cite::before { content: '— '; color: var(--accent); }
.letter { margin: 120px auto 0; max-width: 680px; padding: clamp(28px, 5vw, 56px); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; font-size: 18px; }
.letter p:not(.label) { color: var(--soft); }
.sign { font: 700 38px/1 var(--serif); color: var(--text) !important; margin: 28px 0 0; }

/* contact */
.contact { padding-bottom: 0; }
.contact h2 { font-size: clamp(52px, 10vw, 140px); line-height: .92; letter-spacing: -.045em; margin-bottom: 48px; }
.mail { display: inline-block; font: 400 clamp(28px, 5vw, 60px)/1.1 var(--serif); color: var(--text); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 6px; transition: color .2s; word-break: break-word; }
.mail:hover { color: var(--accent); }
.socials { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: inline-block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; transition: all .2s; }
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 120px; padding: 28px 0 36px; border-top: 1px solid var(--line); font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* reveal */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(27, 29, 28, .88); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lb-cap { color: #EEE; text-align: center; margin: 14px 0 0; font: 400 13px var(--mono); }
.lb-close { position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; color: #fff; font-size: 24px; cursor: pointer; }

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; aspect-ratio: 4 / 4.4; }
  .meta { grid-template-columns: repeat(2, 1fr); }
  .case-top, .cols3, .more { grid-template-columns: 1fr; }
  .cols3, .more { gap: 32px; }
  .tl li { grid-template-columns: 130px 1fr; }
  .tl .what { grid-column: 2; }
  .skills { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .brand { font-size: 15px; }
  .nav nav a { padding: 6px 9px; font-size: 14px; }
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .tl li { grid-template-columns: 1fr; gap: 6px; padding-left: 20px; }
  .tl .what { grid-column: 1; margin-top: 6px; }
  .tl li::before { top: 33px; }
  .reasons { grid-template-columns: 1fr; }
  .reasons li, .reasons li:nth-child(even) { padding: 28px 0; border-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-ph { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .skills { grid-template-columns: 1fr; gap: 40px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .viewer { margin-left: 0; margin-right: 0; }
  .tabs, .caption { margin-left: 0; margin-right: 0; }
}
@media (max-width: 400px) { .brand { display: none; } .nav { justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .l, .js .rv { opacity: 1; transform: none; }
}

/* ---------- v3: light, warm, friendly ---------- */
body { overflow-x: clip; }
h1, h2, h3 { font-weight: 700; }
.hero { align-items: center; }
.hero h1 { font-size: clamp(64px, 11vw, 150px); font-weight: 800; letter-spacing: -.05em; line-height: .9; margin: 0 0 28px; animation: up 1s var(--ease) both; }
.lead { font-size: clamp(19px, 1.9vw, 23px); color: var(--soft); max-width: 28em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 14px 22px; border-radius: 999px; background: var(--text); color: var(--bg); transition: background .2s, transform .2s var(--ease); }
.btn:hover { background: var(--accent); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn.ghost:hover { background: var(--text); color: var(--bg); }
.portrait { border-radius: 24px; position: relative; }
.portrait::after { content: ''; position: absolute; right: -14px; bottom: -14px; width: 46%; height: 46%; background: var(--accent); border-radius: 24px; z-index: -1; }
.portrait { overflow: visible; background: none; }
.portrait img { border-radius: 24px; }
.meta { margin-top: 64px; }
.head h2 { font-weight: 800; }
.sub { font-weight: 600; font-size: clamp(22px, 2.6vw, 32px); }
.screen { border-radius: 16px; }
.cols3 h3 span, .reasons span { font: 700 13px var(--mono); color: #fff; background: var(--accent); border-radius: 999px; padding: 3px 10px; }
.reasons span { display: inline-block; }
.stats { border: 0; gap: 12px; }
.stats li, .stats li + li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.stats b { font-weight: 800; color: var(--accent); letter-spacing: -.03em; }
.more article { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.ph, .ph img { border-radius: 12px; }
.gallery-head h3 { font-weight: 800; letter-spacing: -.03em; }
.tl li:hover { background: var(--bg-2); }
.tl li.ms h3 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.ai { background: var(--par); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px); max-width: none; }
.ai p { color: #fff; font-weight: 600; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.02em; }
.ai cite { color: rgba(255,255,255,.75); }
.ai cite::before { color: #fff; }
.letter { background: var(--bg-2); border-radius: 20px; box-shadow: 0 20px 50px -30px rgba(60,40,20,.3); }
.sign { font-weight: 800; font-size: 30px; letter-spacing: -.02em; }
.contact { padding-top: 0; margin-top: clamp(96px, 14vw, 168px); color: #fff; }
.contact::before { content: ''; position: absolute; inset: 0 calc(50% - 50vw); background: var(--accent); z-index: -1; }
.contact { padding-top: clamp(80px, 10vw, 128px); }
.contact .label { color: rgba(255,255,255,.8); }
.contact h2 { color: #fff; font-weight: 800; }
.contact h2 em { color: var(--text); }
.mail { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.mail:hover { color: var(--text); }
.socials a { color: #fff; border-color: rgba(255,255,255,.5); }
.socials a:hover { background: #fff; color: var(--accent); border-color: #fff; }
.foot { color: rgba(255,255,255,.8); border-top-color: rgba(255,255,255,.3); }
@media (max-width: 980px) { .portrait::after { right: -10px; bottom: -10px; } }
@media (max-width: 680px) { .stats li, .stats li + li { padding: 18px; } .stats li:nth-child(n+3) { border-top: 1px solid var(--line); } }
.grid-ph { grid-auto-flow: dense; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3, .sub { text-wrap: balance; }
