/* David Enker — site v2
   Paper, ink and one signal orange. Anton for display, IBM Plex Mono for labels, Inter for reading. */

:root {
  --paper: #EFEBE3;
  --sand: #E3DDD1;
  --ink: #141413;
  --accent: #E5501E;
  --muted: #5A5853;
  --soft: #B9B5AC;
  --on-dark: #D6D2C9;
  --line-dark: #3A3936;
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --body: 'Inter', system-ui, sans-serif;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { opacity: .75; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1360px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.label { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.label.small { font-size: 11px; }
.muted { color: var(--muted); }
.display { font-family: var(--display); font-weight: 400; line-height: .9; letter-spacing: -.5px; }
.accent-text { color: var(--accent); }
.lead { font-size: 22px; line-height: 1.4; font-weight: 600; }
.prose p { font-size: 18px; line-height: 1.65; }
.prose p + p { margin-top: 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.btn .arr, .text-link .arr, .tag .arr { font-size: 1.65em; line-height: 1; display: inline-block; vertical-align: -0.04em; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 500; min-height: 56px; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Header */
.site-header { border-bottom: 1px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: 1px; text-decoration: none; white-space: nowrap; }
.logo-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.logo-sep { color: var(--accent); margin-right: -3px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-decoration: none; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); }
.nav .btn { min-height: 38px; padding: 0 18px; }
.menu-toggle { display: none; width: 40px; height: 40px; background: var(--ink); border: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { width: 18px; height: 2px; background: var(--paper); }

/* Home: hero */
.hero { padding-top: 40px; padding-bottom: 80px; }
.meta-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; }
.hero-text { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.hero-text h1 { font-size: clamp(72px, 10vw, 168px); }
.hero-bottom { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; }
.hero-bottom p { max-width: 420px; font-size: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-image { flex: 1 1 380px; min-height: 560px; position: relative; overflow: hidden; background: #0E0E0D; text-decoration: none; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 14px; bottom: 0; background: var(--paper); color: var(--ink); padding: 5px 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; }

/* Sections */
.section { padding-top: 96px; padding-bottom: 96px; }
.dark { background: var(--ink); color: var(--paper); }
.dark .muted { color: var(--soft); }
.sand { background: var(--sand); border-top: 2px solid var(--ink); }
.orange { background: var(--accent); color: var(--ink); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 48px; }
.section-head h2 { font-size: 64px; line-height: 1; }

/* Work cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; }
.card .num { font-family: var(--mono); font-size: 15px; color: var(--accent); }
.card .frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line-dark); }
.card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .frame img { transform: scale(1.03); }
.card:hover { opacity: 1; }
.card .arrow { position: absolute; right: 0; bottom: 0; width: 48px; height: 48px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.card .row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 14px; letter-spacing: 1px; }
.card p { color: var(--on-dark); }
.card .tags { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--soft); }

/* Books */
.books { display: flex; flex-wrap: wrap; gap: 56px; }
.books-intro { flex: 1 1 280px; }
.books-intro h2 { font-size: 64px; line-height: 1; margin-bottom: 20px; }
.books-intro p { max-width: 340px; font-size: 17px; }
.book-grid { flex: 999 1 640px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.book { display: flex; gap: 22px; align-items: flex-start; border-top: 1.5px solid var(--ink); padding-top: 24px; }
.book img { flex: 0 0 120px; width: 120px; height: 176px; object-fit: cover; box-shadow: 0 2px 0 var(--ink); }
.book div { display: flex; flex-direction: column; gap: 10px; }
.book h3 { font-size: 22px; font-weight: 600; }
.book p { font-size: 15px; }
.text-link { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; min-height: 44px; display: inline-flex; align-items: center; }

/* Contact / work with me */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact-main h2 { font-size: clamp(56px, 7vw, 112px); line-height: .92; }
.contact-main .lead { max-width: 520px; }
.contact-main p { max-width: 500px; font-size: 18px; }
.services { flex: 1 1 340px; list-style: none; margin: 0; padding: 0; }
.services li { display: flex; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1.5px solid var(--ink); font-size: 18px; font-weight: 500; }
.services li span:first-child { font-family: var(--mono); font-size: 13px; }

/* Footer */
.site-footer .wrap { padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 56px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-name { font-family: var(--display); font-size: clamp(56px, 9vw, 140px); line-height: .9; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 56px; align-content: end; }
.footer-links a { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-decoration: none; min-height: 40px; display: flex; align-items: center; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 12px; color: var(--soft); }

/* Work index */
.page-title { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.page-title h1 { font-size: clamp(64px, 9vw, 150px); }
.page-title p { max-width: 420px; font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 24px; }
.filters button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 1px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters .count { opacity: .7; margin-left: 4px; }
.work-list { list-style: none; margin: 0 0 96px; padding: 0; border-top: 2px solid var(--ink); }
.work-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 22px 0; border-bottom: 1px solid var(--ink); text-decoration: none; }
.work-list .n { flex: 0 0 48px; font-family: var(--mono); font-size: 14px; }
.work-list .t { flex: 1 1 220px; font-family: var(--display); font-size: 34px; line-height: 1; text-transform: uppercase; }
.work-list .d { flex: 2 1 260px; }
.work-list .c { flex: 0 0 140px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }
.work-list .s { flex: 0 0 120px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.work-list .go { flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); }
.work-list li[hidden] { display: none; }
.lab { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lab a { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px; padding: 16px; background: var(--paper); border: 1px solid var(--ink); text-decoration: none; }
.lab strong { font-size: 17px; line-height: 1.25; }
.lab span { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; }

/* Project pages */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 40px; }
.project-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-top: 28px; padding-bottom: 32px; }
.project-head h1 { font-size: clamp(80px, 12vw, 196px); line-height: .86; }
.project-head .side { display: flex; flex-direction: column; gap: 20px; max-width: 440px; }
.wide-img { width: 100%; aspect-ratio: 1600 / 830; object-fit: cover; border: 1.5px solid var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-bottom: 1.5px solid var(--ink); }
.facts div { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 20px 0; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; line-height: 1.35; }
.idea { display: flex; flex-wrap: wrap; gap: 32px 56px; padding-top: 96px; padding-bottom: 72px; }
.idea > .label { flex: 1 1 220px; }
.idea .body { flex: 999 1 560px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.quote { font-family: var(--display); font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 12px; border-top: 1.5px solid var(--paper); padding-top: 20px; }
.step .num { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; }
.step p { color: var(--on-dark); }
.dark-intro { max-width: 820px; font-size: 18px; line-height: 1.65; color: var(--on-dark); margin-bottom: 40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 56px; }
figure { display: flex; flex-direction: column; gap: 10px; }
figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; display: flex; justify-content: space-between; gap: 12px; }
.dark figcaption .muted { color: var(--soft); }
.shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line-dark); }
.made { display: flex; flex-wrap: wrap; gap: 48px 56px; }
.made-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 22px; }
.made-list { margin: 0; }
.made-list div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.made-list dt { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }
.made-list dd { margin: 0; font-weight: 600; text-align: right; }
.made-media { flex: 1 1 520px; display: grid; gap: 24px; align-items: start; }
.made-media.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.made-media img { width: 100%; border: 1.5px solid var(--ink); }
.cta-band .wrap { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.cta-band .text { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.cta-band h2 { font-size: clamp(44px, 5.5vw, 80px); line-height: .95; }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--ink); }
.next a.big { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-decoration: none; }
.next .big strong { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; }
.mini-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 32px; padding-bottom: 32px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }

/* Phone */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .logo { flex-direction: column; gap: 2px; font-size: 22px; }
  .logo-sep { display: none; }
  .logo-sub { font-size: 10px; letter-spacing: 1.2px; }
  .menu-toggle { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 61px; z-index: 5; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); padding: 8px 20px 20px; }
  .nav.open { display: flex; }
  .nav a { color: var(--paper); min-height: 52px; display: flex; align-items: center; border-bottom: 1px solid var(--line-dark); }
  .nav .btn { margin-top: 12px; justify-content: center; background: var(--accent); color: var(--ink); border-color: var(--accent); }
  .site-header { position: relative; }
  .hero { padding-bottom: 56px; }
  .meta-row { margin-bottom: 28px; }
  .hero-image { min-height: 360px; }
  .btn-row { flex-direction: column; width: 100%; }
  .btn-row .btn { justify-content: center; min-height: 52px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-head h2, .books-intro h2 { font-size: 48px; }
  .book img { flex-basis: 104px; width: 104px; height: 152px; }
  .made-media.two { grid-template-columns: 1fr; }
  .work-list .c, .work-list .s { flex: 0 0 auto; }
  .cta-band .wrap { padding-top: 64px; padding-bottom: 64px; }
  .next a.big { align-items: flex-start; }
}
.work-list a[aria-disabled], .lab a[aria-disabled] { cursor: default; }
.work-list a[aria-disabled]:hover, .lab a[aria-disabled]:hover { opacity: 1; }
.work-list a[aria-disabled] .go { background: transparent; color: var(--muted); }

/* Hero: always fits the screen (height and width) */
:root { --header: 63px; }
@media (min-width: 761px) {
  .hero { min-height: calc(100svh - var(--header)); display: flex; flex-direction: column; padding-top: clamp(16px, 4svh, 40px); padding-bottom: clamp(24px, 5svh, 64px); }
  .hero .meta-row { margin-bottom: clamp(16px, 4svh, 40px); }
  .hero-grid { flex: 1; min-height: 0; }
  .hero-text { gap: clamp(20px, 4svh, 40px); }
  .hero-text h1 { font-size: clamp(56px, min(10vw, 15.5svh), 168px); }
  .hero-bottom p { font-size: clamp(15px, 2svh, 18px); }
  .hero-image { min-height: 320px; }
}
.hero-image { background: transparent; }
.hero-image canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.hero-image .robot-still { object-fit: contain; }
.hero-image.is-live .robot-still { opacity: 0; }
.hero-image:hover { opacity: 1; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 16px; max-width: 620px; margin-top: 8px; }
.contact-form .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.contact-form .opt { text-transform: none; opacity: .7; }
.contact-form input, .contact-form textarea { font: 16px/1.4 var(--body); color: var(--ink); background: rgba(239, 235, 227, .92); border: 1.5px solid var(--ink); padding: 12px 14px; min-height: 48px; border-radius: 0; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--ink); outline-offset: 1px; }
.contact-form button { align-self: flex-start; min-height: 52px; }
.contact-status { font-family: var(--mono); font-size: 13px; line-height: 1.5; margin-top: 2px; min-height: 1.2em; }
.contact-status.err { background: var(--ink); color: var(--paper); padding: 10px 14px; }
.honey { position: absolute; left: -9999px; }

/* Work list thumbnails */
.work-list .thumb { flex: 0 0 120px; width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--ink); background: var(--sand); }
.work-list .thumb.type { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 40px; color: var(--accent); }
@media (max-width: 760px) {
  .work-list .thumb { flex-basis: 96px; width: 96px; }
}

/* Lab tiles with a small moving picture */
.lab a { justify-content: flex-start; gap: 12px; padding: 10px 10px 14px; }
.lab .lab-media { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink); display: block; }
.lab .lab-media.type { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 56px; color: var(--accent); background: var(--sand); }
.lab strong { padding: 0 4px; }
.lab a > span { padding: 0 4px; margin-top: auto; }

/* About */
.about-intro { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; padding-top: 56px; padding-bottom: 24px; }
.about-intro-text { flex: 999 1 560px; display: flex; flex-direction: column; gap: 20px; }
.about-intro h1 { font-size: clamp(52px, 7.5vw, 128px); }
.portrait { flex: 1 1 300px; max-width: 460px; }
.portrait img, .portrait .placeholder { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1.5px solid var(--ink); }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--sand); font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }
.placeholder-text { font-family: var(--mono); font-size: 14px !important; background: var(--paper); border: 1.5px dashed var(--ink); padding: 14px 16px; }
.about-title { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.about-title > div:first-child { flex: 1 1 220px; }
.about-title .prose { flex: 999 1 560px; max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.about-title .prose p + p { margin-top: 0; }
.thread { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: center; }
.thread-text { flex: 999 1 480px; max-width: 680px; }
.thread-visual { flex: 1 1 320px; max-width: 440px; display: flex; flex-direction: column; gap: 22px; }
.triangle { width: 100%; max-width: 420px; height: auto; }
.thread-quote { margin: 0; padding-left: 16px; border-left: 2px solid var(--accent); display: flex; flex-direction: column; gap: 8px; }
.thread-quote p { font-size: 14.5px; line-height: 1.6; font-style: italic; color: var(--ink); }
.thread-quote cite { font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.press { padding-bottom: 96px; }
.press-box { border: 1.5px solid var(--ink); padding: 32px; display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.press-box p { font-size: 18px; line-height: 1.6; }
.press-box .btn { align-self: flex-start; }
.mini-footer a { text-decoration: none; }

/* Photo strip */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.strip a:hover { opacity: .85; }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 20; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--ink); border: 1.5px solid var(--ink); font-size: 22px; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { opacity: 1; background: var(--ink); color: var(--paper); }
.photo-strip { padding-top: 0; }
