/* timothyverhaeghe.com: bold and warm. A dark hero, big editorial headings, one accent (ochre, from the bridge in the photo). */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1f1c18;
  --text: #3a3530;
  --muted: #7a7168;
  --line: #e9e3da;
  --accent: #c8952e;
  --accent-text: #9a6f1f;
  --accent-soft: #f3ead9;
  --night: #12100d;
  --night-2: #1d1a16;
  --night-text: #d9d2c7;
  --night-muted: #8f877c;
  --danger: #b4432f;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --page: 1120px;
  --text-width: 660px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s, opacity .2s; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: 44px; }
h2 { font-size: 34px; }
h3 { font-size: 21px; }
p { margin: 0 0 1.1em; }
.lead { font-size: 19px; line-height: 1.65; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Layout */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.text { max-width: var(--text-width); }
.page { padding: 56px 0 104px; }
.page section + section { margin-top: 80px; }
.band { padding: 96px 0; }
.band + .band { padding-top: 0; }

/* Header */
.site-header { padding: 26px 0; position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { white-space: nowrap; font-family: var(--serif); font-size: 21px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Dark pages (home): the header sits on the night hero */
body.dark-top { background: var(--bg); }
body.dark-top .site-header { background: var(--night); }
body.dark-top .brand { color: #fff; }
body.dark-top .nav a { color: var(--night-muted); }
body.dark-top .nav a:hover { color: #fff; }

/* Hero */
.hero { background: var(--night); color: var(--night-text); padding: 48px 0 112px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(46px, 7.4vw, 92px); line-height: .98; letter-spacing: -0.03em; margin-bottom: 28px; }
.hero h1 .accent { display: block; }
.hero .lead { color: var(--night-text); max-width: 560px; }
.hero .lead a { color: #fff; text-decoration-color: var(--accent); }
.hero-photo { position: relative; }
.hero-photo img { border-radius: 22px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; filter: saturate(.95) contrast(1.02); }
.hero-photo::after { content: ""; position: absolute; inset: auto -18px -18px auto; width: 46%; height: 46%; border: 1px solid var(--accent); border-radius: 22px; z-index: -1; }
.hero-photo { z-index: 0; }
.hero .socials a { color: var(--night-muted); }
.hero .socials a:hover { color: #fff; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: -56px; position: relative; z-index: 1; }
.number { background: var(--surface); padding: 30px 32px; }
.number strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1; color: var(--ink); letter-spacing: -0.03em; margin-bottom: 10px; }
.number span { color: var(--muted); font-size: 15px; }

/* Now: Autonomous */
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.feature h2 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.05; }
.feature .card-dark { background: var(--night); color: var(--night-text); border-radius: 22px; padding: 40px; }
.card-dark p { color: var(--night-text); }
.card-dark .big { font-family: var(--serif); font-size: 28px; line-height: 1.3; color: #fff; margin-bottom: 18px; }
.card-dark a.link { color: var(--accent); font-weight: 500; text-decoration: none; }
.card-dark a.link:hover { text-decoration: underline; }

/* Before: compact rows */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.row h3 { margin: 0; }
.row p { margin: 0; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1 var(--sans); padding: 15px 24px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { background: #000; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--night); }
.btn.accent:hover { background: #d9a43c; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn.ghost:hover { border-color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: default; }

/* Social icons */
.socials { display: flex; gap: 16px; align-items: center; }
.socials a { color: var(--muted); display: inline-flex; padding: 4px; }
.socials a:hover { color: var(--ink); }
.actions .socials { margin-left: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.star { background: none; border: 0; padding: 0 2px; margin-left: 4px; color: var(--line); cursor: pointer; font-size: 13px; transition: color .3s; }
.star:hover { color: var(--accent); }

/* Timeline (About) */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 36px 28px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li.now::before { background: var(--accent); }
.timeline h3 { margin-bottom: .3em; }
.timeline p { margin: 0; }

/* Form */
.form { display: grid; gap: 22px; max-width: var(--text-width); }
.field label { display: block; font-weight: 500; color: var(--ink); font-size: 15px; }
.field .hint { display: block; font-size: 14px; color: var(--muted); margin: 2px 0 8px; }
.field input, .field select, .field textarea { width: 100%; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .error { color: var(--danger); font-size: 15px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.elsewhere { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; margin-top: 8px; }

/* Legal pages */
.legal h2 { font-size: 22px; margin-top: 2em; }
.legal ul { padding-left: 20px; margin: 0 0 1.1em; }
.legal li { margin-bottom: .4em; }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(18, 16, 13, .45); z-index: 50; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 18px; max-width: 440px; width: 100%; padding: 32px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); }
.modal-box h2 { font-size: 24px; }
.modal-box p { color: var(--muted); }

/* 404 */
.notfound { text-align: center; padding: 40px 0; }
.notfound .text { margin: 0 auto; }

/* Easter egg: the crawl */
.crawl { position: fixed; inset: 0; z-index: 100; background: #000; display: none; overflow: hidden; perspective: 380px; cursor: pointer; }
.crawl.open { display: block; }
.crawl::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(1px 1px at 40% 80%, #ddd, transparent), radial-gradient(1px 1px at 85% 20%, #fff, transparent), radial-gradient(1px 1px at 10% 70%, #ccc, transparent); background-size: 260px 260px; opacity: .7; }
.crawl-text { position: absolute; left: 50%; width: min(620px, 90vw); bottom: 0; transform-origin: 50% 100%; transform: translateX(-50%) rotateX(24deg); color: #f5c518; font-family: var(--sans); font-weight: 600; font-size: 22px; line-height: 1.5; text-align: justify; animation: crawl 60s linear forwards; }
.crawl-text h2 { color: #f5c518; font-family: var(--sans); text-align: center; font-weight: 700; letter-spacing: .08em; }
.crawl-hint { position: absolute; top: 16px; right: 20px; color: #888; font-size: 13px; z-index: 1; }
@keyframes crawl { from { transform: translateX(-50%) rotateX(24deg) translateY(20%); } to { transform: translateX(-50%) rotateX(24deg) translateY(-260%); } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .crawl-text { animation: none; transform: translateX(-50%); position: relative; bottom: auto; top: 40px; margin: 0 auto; }
  .crawl { overflow: auto; perspective: none; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-photo { max-width: 420px; }
  .hero-photo img { aspect-ratio: 1 / 1; }
  .numbers { grid-template-columns: 1fr; margin-top: -40px; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .band { padding: 72px 0; }
  .page { padding: 32px 0 80px; }
  .page section + section { margin-top: 64px; }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .brand { font-size: 17px; }
  .lead { font-size: 18px; }
  .hero { padding: 28px 0 88px; }
  .feature .card-dark { padding: 28px; }
  .card-dark .big { font-size: 23px; }
  .number strong { font-size: 44px; }
  .actions .socials { margin-left: 0; width: 100%; }
}
