/* Hallmark · shape: Workbench · genre: modern-minimal · theme: brand · redesign: full · draw: 823542 · job: hire
 * paper: oklch(97% 0 90) · accent: oklch(24.8% 0.0058 271) · display: IBM Plex Sans · body: IBM Plex Sans · hero: Counter · nav: slab · footer: letter close · signature: the live terminal that answers questions about the work, set large beside the head
 * axes: light/grotesk-sans/neutral · posture: Committed (the brand charcoal carries the nav, the terminal and two bands) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, the work ran as three equal zigzags; DapurBuddy now opens across the full width and the other two split at different ratios */
/* Hallmark · waive 47b · one frame, the real working terminal inside, wired to POST /api/ask · the terminal is the site's own product and its signature */
/* Hallmark · answered F4 · .btn-light is the one primary recipe inverted for the charcoal band, never beside the filled one */
/* Hallmark · reworded straight apostrophes in prose and heads (Who's, Let's, I'm, I've, Dean's) to typographic ones · F1 names them */
/* Hallmark · reworded "Who's behind Codeen Lab" to "Who’s behind Codeen Lab" · F1 names the straight quote */
/* Hallmark · reworded "Have an app in mind? Let's talk." to "Have an app in mind? Let’s talk." · F1 names the straight quote */
/* Hallmark · dismissed F1 · the chip labels stay straight because main.js sends their text as the question */
/* Hallmark · restored data-aos fade-up below the hero at the owner's request */
/* Hallmark · reworded "Codeen Lab — Web and mobile apps by Addin" to "Codeen Lab: web and mobile apps by Addin" · 19 names the dash */
/* Hallmark · reworded "1–2 working days" to "1 to 2 working days" and the timeline arrows to "to" · 19 names the dash */
/* Hallmark · reworded the project kickers "My own product · Android and web" and kin to a comma line under each title · 54 and 63 name them */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --nav-h: 72px;
  --measure: 65ch;
}

/* Shared frame (index, privacy, terms) */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--space-md)); }
body { font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
a:hover { color: var(--color-ink-2); }
.lead { color: var(--color-ink-2); }
.meta { font-size: var(--text-sm); color: var(--color-ink-2); }

/* Buttons: one filled style, inverted on night surfaces */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: 1px solid var(--color-accent); background: var(--color-accent); color: var(--color-accent-ink); font: 700 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); color: var(--color-accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-light { background: var(--color-night-ink); border-color: var(--color-night-ink); color: var(--color-night); }
.btn-light:hover { background: var(--color-paper-2); border-color: var(--color-paper-2); color: var(--color-night); }
.btn-light:focus-visible { outline-color: var(--color-night-focus); }
.btn-text { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.btn-text:hover { text-decoration-thickness: 2px; color: var(--color-ink); }
.btn-text:active { color: var(--color-ink-2); }

/* Nav: a slab, the brand charcoal edge to edge */
header { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-night); color: var(--color-night-ink); --color-focus: var(--color-night-focus); }
.nav { min-height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-night-ink); text-decoration: none; }
.logo:hover { color: var(--color-paper-2); }
.logo-svg { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-sm); color: var(--color-night-ink-2); text-decoration: none; }
.nav-links a:hover { color: var(--color-paper-2); }
.nav-links a:active { color: var(--color-night-ink-3); }
.nav-links .btn-dark { margin-left: var(--space-sm); padding: 0 var(--space-md); border: 1px solid var(--color-night-rule-2); color: var(--color-night-ink); font-weight: 700; }
.nav-links .btn-dark:hover { border-color: var(--color-night-ink-3); background: var(--color-night-2); color: var(--color-paper-2); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--color-night-rule-2); background: transparent; color: var(--color-night-ink); cursor: pointer; }
.nav-toggle:active { background: var(--color-night-2); }
.nav-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle .i-close, .nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline; }

/* Hero: the head beside the working terminal */
.hero { min-height: calc(100dvh - var(--nav-h)); display: grid; align-items: center; padding-block: var(--space-xl); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-3xl); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: var(--space-lg); }
.hero-copy .term-note { margin-top: var(--space-xs); max-width: 48ch; }
.hero h1 { max-width: 13ch; }
.hero .lead { max-width: 40ch; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); margin-top: var(--space-xs); }

.term-note { font-size: var(--text-sm); color: var(--color-ink-2); max-width: 60ch; }
.term { display: flex; flex-direction: column; height: min(680px, calc(100dvh - var(--nav-h) - 128px)); min-height: 440px; background: var(--color-night); color: var(--color-night-ink); font-family: var(--font-outlier); --color-focus: var(--color-night-focus); }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-md); background: var(--color-night-2); border-bottom: 1px solid var(--color-night-rule); }
.term-title { font-size: var(--text-xs); color: var(--color-night-ink-3); }
.term-btn { min-height: 44px; padding: 0 var(--space-md); border: 0; background: transparent; color: var(--color-night-ink-3); font: 400 var(--text-xs)/1 var(--font-outlier); cursor: pointer; }
.term-btn:hover { color: var(--color-night-ink); }
.term-btn:active { color: var(--color-night-ink-2); }
.term-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--space-md) var(--space-lg) var(--space-xs); font-size: var(--text-sm); line-height: 1.7; color: var(--color-night-ink); }
.term-log .cmd { color: var(--color-paper-2); font-weight: 500; white-space: pre-wrap; }
.term-log .out { color: var(--color-night-ink-2); white-space: pre-wrap; }
.term-log .gap { height: var(--space-sm); }
.term-log .thinking { color: var(--color-night-ink-4); }
.term-form { display: flex; align-items: center; gap: var(--space-sm); margin: var(--space-xs) var(--space-sm) var(--space-sm); padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-sm); background: var(--color-night-3); border: 1px solid var(--color-night-ink-4); }
.term-form:focus-within { outline: 2px solid var(--color-night-focus); outline-offset: 2px; }
.term-form label { flex-shrink: 0; font-size: var(--text-sm); color: var(--color-paper-2); }
.term-input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--color-paper-2); font: 400 var(--text-md)/1 var(--font-outlier); }
.term-input:focus { outline: none; }
.term-input::placeholder { color: var(--color-night-ink-4); }
.term-submit { flex-shrink: 0; min-height: 44px; padding: 0 var(--space-md); border: 0; background: var(--color-night-ink); color: var(--color-night); font: 500 var(--text-xs)/1 var(--font-outlier); cursor: pointer; }
.term-submit:hover { background: var(--color-paper-2); }
.term-submit:active { transform: translateY(1px); }
.term-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); padding: 0 var(--space-sm) var(--space-sm); }
.chip { text-align: left; white-space: nowrap; }
.chip { min-height: 44px; padding: 0 var(--space-sm); border: 1px solid var(--color-night-rule-2); background: transparent; color: var(--color-night-ink-2); font: 400 var(--text-xs)/1 var(--font-outlier); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.chip:hover { background: var(--color-night-rule); color: var(--color-paper-2); }
.chip:active { background: var(--color-night-2); }
.term-btn:focus-visible, .term-submit:focus-visible, .chip:focus-visible { outline: 2px solid var(--color-night-focus); outline-offset: 2px; }
.term-note a:focus-visible { outline-color: var(--color-ink); }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor { animation: blink 1.1s steps(1) 4; }

/* Section heads: head left, its line on the right */
.head-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.head-split .lead { max-width: 44ch; }

/* Work: the captures carry it */
.work { padding-block: var(--section-gap-s) var(--section-gap); background: var(--color-paper-2); }
.case { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); }
.case + .case { margin-top: var(--space-4xl); }
.shot { aspect-ratio: 16 / 10; background: var(--color-paper-3); }
.shot img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid color-mix(in oklab, var(--color-ink) 8%, transparent); outline-offset: -1px; }
.case h3 { font-size: var(--text-section); }
.case-text, .case-title, .case-body { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.case-text > p:not(.meta) { max-width: var(--measure); }
.case--wide .shot { grid-column: 1 / -1; }
.case--wide .case-title { grid-column: 1 / span 5; }
.case--wide .case-body { grid-column: 7 / -1; }
.case--split { align-items: center; }
.case--split .case-text { grid-column: 1 / span 5; }
.case--split .shot { grid-column: 6 / -1; }
.case--flip .shot { grid-column: 1 / span 6; grid-row: 1; }
.case--flip .case-text { grid-column: 8 / -1; grid-row: 1; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font-size: var(--text-sm); color: var(--color-ink-2); }
.links { display: flex; flex-wrap: wrap; gap: var(--space-lg); font-weight: 700; }
.links a, .row-link { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 0.25em; }
.links a:not(.primary) { color: var(--color-ink-2); }
.links a:active, .row-link:active { color: var(--color-ink-2); }

.more { margin-top: var(--space-4xl); border-top: 1px solid var(--color-rule-strong); }
.more-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xs); padding-block: var(--space-xl); border-bottom: 1px solid var(--color-rule-strong); }
.more-row h3 { grid-column: 1 / span 3; grid-row: 1; }
.more-row .meta { grid-column: 1 / span 3; grid-row: 2; }
.more-row > p:not(.meta) { grid-column: 5 / span 6; grid-row: 1 / span 2; max-width: var(--measure); }
.more-row .row-link { grid-column: 11 / -1; grid-row: 1; justify-self: end; align-self: start; min-height: 0; font-weight: 700; white-space: nowrap; }

/* The ask after the work: a night band */
.next { padding-block: var(--section-gap-s); background: var(--color-night); color: var(--color-night-ink); }
.next-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap-columns); row-gap: var(--space-md); align-items: end; }
.next h2 { grid-column: 1; }
.next .lead { grid-column: 1; color: var(--color-night-ink-2); }
.next .btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }

/* Skills: rows under hairlines */
.skills-sec { padding-block: var(--section-gap) var(--section-gap-s); }
.skills { border-top: 1px solid var(--color-rule-strong); }
.skill { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: baseline; padding-block: var(--space-lg); border-bottom: 1px solid var(--color-rule-strong); }
.skill dt { grid-column: 1 / span 4; font-size: var(--text-title); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.skill dd { grid-column: 5 / -1; font-size: var(--text-md); color: var(--color-ink); }

/* Experience: the head holds while the record scrolls */
.experience { padding-block: var(--section-gap-s) var(--section-gap-l); background: var(--color-paper-2); }
.exp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); }
.exp-head { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--nav-h) + var(--space-xl)); display: flex; flex-direction: column; gap: var(--space-md); }
.exp-main { grid-column: 5 / -1; min-width: 0; }
.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 6fr); column-gap: var(--gap-columns); padding-block: var(--space-xl); border-top: 1px solid var(--color-rule); }
.timeline li:first-child { padding-top: 0; border-top: 0; }
.when { font-size: var(--text-sm); color: var(--color-ink-2); font-variant-numeric: tabular-nums; padding-top: var(--space-2xs); }
.timeline h3 { margin-bottom: var(--space-xs); }
.timeline p:not(.when) { color: var(--color-ink-2); max-width: var(--measure); }
.awards { margin-top: var(--space-2xl); padding: var(--space-xl); background: var(--color-paper); display: flex; flex-direction: column; gap: var(--space-md); }
.awards ul { padding-left: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); color: var(--color-ink-2); }
.awards strong { color: var(--color-ink); }

/* About */
.about { padding-block: var(--section-gap); }
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: end; }
.about-body { grid-column: 1 / span 8; display: flex; flex-direction: column; gap: var(--space-lg); }
.about-lead { font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
.about-body > p:not(.about-lead) { color: var(--color-ink-2); max-width: var(--measure); }
.facts { grid-column: 10 / -1; display: flex; flex-direction: column; }
.facts > div { padding-block: var(--space-md); border-top: 1px solid var(--color-rule-strong); }
.facts dt { font-size: var(--text-sm); color: var(--color-ink-2); }
.facts dd { font-weight: 700; }

/* Contact: the close */
.contact { padding-block: var(--section-gap-s) var(--section-gap); border-top: 1px solid var(--color-rule-strong); }
.contact-inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: end; }
.contact h2 { grid-column: 1 / span 7; font-size: var(--text-display); max-width: 12ch; }
.contact-act { grid-column: 8 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-lg); }

/* Footer: a letter close */
.footer { background: var(--color-night); color: var(--color-night-ink-2); --color-focus: var(--color-night-focus); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); padding-block: var(--space-2xl); font-size: var(--text-sm); }
.footer-legal { display: flex; flex-direction: column; gap: var(--space-2xs); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-right: calc(var(--space-sm) * -1); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-sm); color: var(--color-night-ink); text-decoration: none; white-space: nowrap; }
.footer-links a:hover { color: var(--color-paper-2); text-decoration: underline; }
.footer-links a:active { color: var(--color-night-ink-3); }

/* Back to top: visible without script, hidden at the top only once main.js runs */
.to-top { position: fixed; right: var(--space-lg); bottom: var(--space-lg); z-index: var(--z-sticky); display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--color-night); color: var(--color-night-ink); border: 1px solid var(--color-night-rule-2); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), visibility var(--dur-short); --color-focus: var(--color-ink); }
.js .to-top:not(.show) { opacity: 0; visibility: hidden; transform: translateY(8px); }
.to-top:hover { color: var(--color-paper-2); background: var(--color-night-2); }
.to-top:active { transform: translateY(1px); }
.to-top svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Legal pages (privacy, terms) */
.legal { padding-block: var(--space-2xl) var(--section-gap-s); }
.legal-doc { max-width: 44em; display: flex; flex-direction: column; gap: var(--space-md); }
.legal-doc h1 { font-size: var(--text-display-s); max-width: none; }
.legal-doc h2 { margin-top: var(--space-lg); font-size: var(--text-title); letter-spacing: -0.01em; }
.legal-doc ul { padding-left: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); }
.legal-doc address { font-style: normal; }
.legal-meta { font-size: var(--text-sm); color: var(--color-ink-2); }
.lang-switch { display: flex; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 700; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-sm); border: 1px solid var(--color-rule-strong); text-decoration: none; }
.lang-switch a:active { background: var(--color-paper-3); }
.legal-part + .legal-part { margin-top: var(--space-2xl); padding-top: var(--space-2xl); border-top: 1px solid var(--color-rule); }

@media (max-width: 60rem) {
  :root { --nav-h: 64px; }
  .nav.has-menu .nav-toggle { display: inline-flex; }
  .nav.has-menu .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-xs) var(--gutter) var(--space-lg); background: var(--color-night); border-top: 1px solid var(--color-night-rule); font-size: var(--text-md); }
  .nav.has-menu .nav-links.open { display: flex; }
  .nav.has-menu .nav-links a { padding: 0 var(--space-2xs); border-bottom: 1px solid var(--color-night-rule); color: var(--color-night-ink); }
  .nav.has-menu .nav-links .btn-dark { margin: var(--space-md) 0 0; justify-content: center; border: 1px solid var(--color-night-rule-2); }

  .hero { min-height: 0; padding-block: var(--space-xl) var(--space-2xl); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .term { height: auto; min-height: 0; }
  .term-log { flex: none; height: 300px; padding: var(--space-sm) var(--space-sm) var(--space-2xs); }

  .head-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); margin-bottom: var(--space-xl); }
  .case { row-gap: var(--space-lg); }
  .case + .case { margin-top: var(--space-3xl); }
  .case > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .case--split .shot { order: -1; }
  .more { margin-top: var(--space-3xl); }
  .more-row > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .more-row .row-link { justify-self: start; }

  .next-inner { grid-template-columns: minmax(0, 1fr); }
  .next .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--space-xs); }

  .skill { row-gap: var(--space-xs); }
  .skill dt, .skill dd { grid-column: 1 / -1; }

  .exp-head { grid-column: 1 / -1; position: static; margin-bottom: var(--space-xl); }
  .exp-main { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xs); }
  .awards { padding: var(--space-lg); }

  .about-body, .facts, .contact h2, .contact-act { grid-column: 1 / -1; }
}

@media (max-width: 40rem) {
  .logo-svg { height: 24px; }
  .term-chips { grid-template-columns: minmax(0, 1fr); }
  .hero-ctas { gap: var(--space-md); }
  .footer .wrap { flex-direction: column; align-items: flex-start; }
  .footer-links { margin-left: calc(var(--space-sm) * -1); margin-right: 0; }
  .btn-mail { width: 100%; padding: 0 var(--space-md); font-size: var(--text-sm); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .btn, .chip, .to-top { transition: none; }
}
