/* Layout: a floating pill nav over separate pages — hero, bento of featured work,
   a forest-green "More Work" band the page fades into, about, kit, contact.
   Palette after seanhalpin.xyz: beige + deep teal by day, forest green + mint by night,
   pastel project cards. Matches the Jose Estrada design system (v6): Bricolage Grotesque headings, DM Sans text, 64px tiles. */
:root {
  /* palette */
  --page: #ede7de; --forest: #233831; --teal: #025a4e; --mint: #8fdcc2; --mint-soft: #d4ede4;
  --pink: #d094e5; --aqua: #a3dcd4; --rust: #e8b89c; --sky: #bddff9; --night: #1c1c1c;
  --tile-ink: #364442; --tile-ink-soft: rgba(54, 68, 66, .75);

  /* roles (light) */
  --primary: var(--teal); --on-primary: #ffffff; --link-hover: #013f37;
  --primary-bg-subtle: var(--mint-soft); --primary-border-subtle: var(--mint);
  --primary-tint-10: rgba(2, 90, 78, .1); --primary-text-emphasis: var(--forest); --primary-focus-border: var(--mint);
  --body-color: #364442; --body-bg: #ffffff; --secondary: #4c6763; --muted: rgba(54, 68, 66, .75);
  --light: #ffffff; --border: rgba(0, 0, 0, .1); --border-translucent: rgba(0, 0, 0, .1);
  --surface: #ffffff; --surface-line: rgba(0, 0, 0, .06);
  --shadow-focus: 0 0 0 .25rem rgba(2, 90, 78, .25);
  --bg: var(--page); --fg: var(--body-color); --fg-soft: var(--secondary);
  --nav-bg: hsla(0, 0%, 100%, .5);

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-title: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --space-1: .25rem; --space-2: .5rem; --space-3: 1rem; --space-4: 1.5rem; --space-5: 3rem;
  --radius: .75rem; --radius-lg: .75rem; --radius-card: 64px; --radius-nav: 24px; --radius-pill: 999px;
  --shadow-menu: 0px 10px 60px rgba(0, 0, 0, .1);
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
  --shadow-btn: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --primary: var(--mint); --on-primary: var(--forest); --link-hover: #b5ead8;
  --primary-bg-subtle: rgba(143, 220, 194, .16); --primary-tint-10: rgba(143, 220, 194, .12);
  --primary-text-emphasis: var(--mint-soft); --primary-focus-border: var(--mint);
  --body-color: var(--mint-soft); --body-bg: #2c443c; --secondary: rgba(212, 237, 228, .72); --muted: rgba(212, 237, 228, .72);
  --border: rgba(212, 237, 228, .14); --surface: rgba(212, 237, 228, .06); --surface-line: rgba(212, 237, 228, .1);
  --shadow-focus: 0 0 0 .25rem rgba(143, 220, 194, .3);
  --bg: var(--forest); --fg: var(--mint-soft); --fg-soft: rgba(212, 237, 228, .72);
  --nav-bg: hsla(160, 52%, 71%, .1);
  color-scheme: dark;
} }
:root[data-theme="dark"], body.is-dark {
  --primary: var(--mint); --on-primary: var(--forest); --link-hover: #b5ead8;
  --primary-bg-subtle: rgba(143, 220, 194, .16); --primary-tint-10: rgba(143, 220, 194, .12);
  --primary-text-emphasis: var(--mint-soft); --primary-focus-border: var(--mint);
  --body-color: var(--mint-soft); --body-bg: #2c443c; --secondary: rgba(212, 237, 228, .72); --muted: rgba(212, 237, 228, .72);
  --border: rgba(212, 237, 228, .14); --surface: rgba(212, 237, 228, .06); --surface-line: rgba(212, 237, 228, .1);
  --shadow-focus: 0 0 0 .25rem rgba(143, 220, 194, .3);
  --bg: var(--forest); --fg: var(--mint-soft); --fg-soft: rgba(212, 237, 228, .72);
  --nav-bg: hsla(160, 52%, 71%, .1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  background: var(--bg); color: var(--fg);
  transition: background-color .7s var(--ease), color .7s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: max(16px, 3vw); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 50;
  display: flex; gap: 2px; padding: 5px;
  background: var(--nav-bg); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-menu);
}
.nav a {
  position: relative; z-index: 1; padding: 6px 15px 6px 20px; border-radius: var(--radius-nav);
  color: var(--fg-soft); text-decoration: none; font-size: 17px; white-space: nowrap;
  transition: color .2s;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--primary); }
.nav a kbd {
  font: inherit; font-size: 11px; margin-left: 6px; padding: 0 6px; border-radius: 4px;
  border: 1px solid var(--border); color: var(--fg-soft);
}
.nav .pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: var(--radius-nav); background: var(--primary-bg-subtle);
  transition: left .45s var(--ease), width .45s var(--ease);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(140px, 22vh, 220px) clamp(64px, 10vh, 110px); text-align: center; }
.hero h1 {
  font-weight: 700; color: var(--primary);
  font-size: clamp(2.25rem, 8.4vw, 8rem); line-height: .95; letter-spacing: -.045em;
}
.hero h1 span { display: block; }
.hero h1 .line { opacity: 0; translate: 0 .35em; animation: rise .9s var(--ease) forwards; }
.hero h1 .line + .line { animation-delay: .12s; }
.hero .lead {
  max-width: 34rem; margin: var(--space-4) auto 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 400; color: var(--fg-soft);
}
.now {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--space-4);
  padding: 8px 16px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: 14px; color: var(--fg); text-decoration: none; background: var(--body-bg);
  transition: border-color .2s, box-shadow .2s;
}
.now:hover { border-color: var(--primary-focus-border); box-shadow: var(--shadow-focus); }
.now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(2,90,78,.5); animation: ping 2s infinite; }
.now b { font-weight: 700; color: var(--primary); }

.sparkle { position: absolute; width: var(--s); height: var(--s); color: #ffffff; filter: drop-shadow(0 2px 6px rgba(35,56,49,.12)); pointer-events: none; will-change: transform; }
.sparkle svg { width: 100%; height: 100%; animation: twinkle var(--d, 6s) ease-in-out infinite; }
.sparkle.alt { color: var(--mint); }

@keyframes rise { to { opacity: 1; translate: 0 0; } }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(45deg) scale(.82); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(2,90,78,.45); } 80%, 100% { box-shadow: 0 0 0 10px rgba(2,90,78,0); } }

/* ---------- Section heads ---------- */
.section { padding-block: clamp(56px, 9vw, 120px); }
.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head h2 {
  font-size: clamp(3rem, 9vw, 7.5rem); line-height: .95; letter-spacing: -.045em; font-weight: 700;
  color: var(--primary);
}
.section-head p { max-width: 36rem; margin: var(--space-3) auto 0; font-weight: 400; font-size: 1.125rem; color: var(--fg-soft); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.tile {
  --tile-bg: #ffffff; --tile-fg: var(--tile-ink); --tile-soft: var(--tile-ink-soft);
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(380px, 42vw, 560px); padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-card); background: var(--tile-bg); color: var(--tile-fg);
  border: 0; text-align: right; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-end;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(35,56,49,.35); }
.tile:active { transform: translateY(-1px) scale(.995); }
.tile .eyebrow { font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--tile-fg); }
.tile h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; margin-top: 6px; }
.tile .art {
  position: absolute; z-index: -1; left: clamp(24px, 3vw, 40px); bottom: 0; right: 0; top: 34%;
  transition: transform .7s var(--ease);
}
.tile:hover .art { transform: translateY(-10px); }
.span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; }

.t-pink  { --tile-bg: var(--pink); }
.t-aqua  { --tile-bg: var(--aqua); }
.t-rust  { --tile-bg: var(--rust); }
.t-sky   { --tile-bg: var(--sky); }
.t-white { --tile-bg: #ffffff; }
.t-night { --tile-bg: var(--night); --tile-fg: #ffffff; --tile-soft: rgba(255, 255, 255, .7); }

/* browser frame used for screenshots */
.browser {
  height: 100%; border-radius: 14px 0 0 0; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), var(--shadow-lg);
  display: flex; flex-direction: column;
}
.browser .bar { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding-inline: 12px; background: #f1f3f5; border-bottom: 1px solid rgba(0,0,0,.08); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #ced4da; }
.browser .bar i:nth-child(1) { background: #ff5f57; } .browser .bar i:nth-child(2) { background: #febc2e; } .browser .bar i:nth-child(3) { background: #28c840; }
.browser .bar span { margin-left: 10px; font-size: 11px; color: #4c6763; }
.browser img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* Quiero Rentar: drawn dashboard (no screenshot yet) */
.qr { height: 100%; display: grid; grid-template-columns: 64px 1fr; background: #fff; border-radius: 14px 0 0 0; overflow: hidden; box-shadow: var(--shadow-lg); color: var(--tile-ink); text-align: left; }
.qr aside { background: var(--forest); padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr aside i { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.12); }
.qr aside i:first-child { background: var(--mint); }
.qr .main { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.qr .row { display: flex; gap: 10px; }
.qr .kpi { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid rgba(0,0,0,.1); border-radius: 10px; }
.qr .kpi small { display: block; font-size: 10px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr .kpi b { font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qr .list { border: 1px solid rgba(0,0,0,.1); border-radius: 10px; overflow: hidden; }
.qr .item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 12px; font-size: 12px; border-top: 1px solid rgba(0,0,0,.1); }
.qr .item:first-child { border-top: 0; }
.qr .chip { font-size: 10px; padding: 2px 8px; border-radius: 99px; background: rgba(2,90,78,.1); color: var(--teal); }
.qr .chip.ok { background: rgba(25,135,84,.1); color: #146c43; }
.qr .title { font-weight: 700; font-size: 15px; }

/* phone-ish frame for ECOmmunity */
.shot-plain { height: 100%; border-radius: 20px 0 0 0; overflow: hidden; box-shadow: var(--shadow-lg); }
.shot-plain img { width: 100%; height: 100%; object-fit: cover; object-position: 30% top; }

/* ---------- Dark band: more work ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-bottom: var(--space-5); }
.filters button {
  font: inherit; font-size: 14px; padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; color: var(--fg-soft); border: 1px solid var(--border);
  transition: background .2s, color .2s, border-color .2s;
}
.filters button:hover { color: var(--fg); border-color: var(--fg-soft); }
.filters button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filters button span { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }

.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.card {
  text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 10px 10px 20px;
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: 28px;
  display: flex; flex-direction: column; gap: 14px; transition: background .3s, transform .4s var(--ease);
}
.card:hover { background: rgba(212,237,228,.1); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card .thumb { aspect-ratio: 1440 / 1024; border-radius: 20px; overflow: hidden; background: rgba(0,0,0,.2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .thumb img { transform: scale(1.04); }
.card .meta { padding-inline: 10px; display: flex; flex-direction: column; gap: 6px; }
.card .kind { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.card h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.card p { font-size: 14px; font-weight: 400; color: var(--fg-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.portrait { position: sticky; top: 100px; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.portrait img {
  width: min(100%, 340px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 5px solid var(--primary); box-shadow: var(--shadow-lg);
}
.facts { width: 100%; max-width: 340px; margin: 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px; }
.facts dt { color: var(--secondary); } .facts dd { margin: 0; text-align: right; }
.about-copy h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); color: var(--primary); letter-spacing: -.035em; line-height: 1.05; }
.about-copy .big { font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 400; margin-top: var(--space-4); max-width: 38rem; }
.about-copy p + p { margin-top: var(--space-3); }
.about-copy .body { margin-top: var(--space-4); font-weight: 400; max-width: 38rem; color: var(--fg); }
.about-copy .body p + p { margin-top: var(--space-3); }
.about-copy .body strong { font-weight: 400; }

.timeline { margin-top: var(--space-5); display: grid; gap: var(--space-5); }
.timeline h3 { font-size: 1.75rem; color: var(--primary); letter-spacing: -.02em; margin-bottom: var(--space-3); }
.edu { display: grid; grid-template-columns: 9.5rem minmax(0,1fr); gap: var(--space-3); padding-block: var(--space-3); border-top: 1px solid var(--border); }
.edu time { font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; padding-top: 4px; }
.edu h4 { font-size: 1.125rem; font-weight: 700; }
.edu .school { font-size: 14px; color: var(--secondary); }
.edu p { font-weight: 400; font-size: 15px; margin-top: 6px; }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { border-top: 1px solid var(--border); }
.certs a, .certs .row { display: grid; grid-template-columns: 9.5rem minmax(0,1fr) auto; gap: var(--space-3); align-items: baseline; padding-block: 12px; text-decoration: none; }
.certs time { font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.certs .n { font-size: 15px; } .certs .by { display: block; font-size: 13px; color: var(--secondary); font-weight: 400; }
.certs .arrow { color: var(--secondary); transition: translate .25s var(--ease), color .2s; }
.certs a:hover .n { color: var(--link-hover); } .certs a:hover .arrow { color: var(--primary); translate: 3px -3px; }
.more-certs { margin-top: var(--space-3); }

/* ---------- Kit ---------- */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.role { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); text-align: center; }
.role .ico { width: 56px; height: 56px; margin: 0 auto var(--space-3); display: grid; place-items: center; border-radius: 18px; background: var(--primary-tint-10); color: var(--primary); }
.role .ico svg { width: 26px; height: 26px; }
.role h3 { font-size: 1.375rem; letter-spacing: -.02em; }
.role p { margin-top: var(--space-2); font-weight: 400; font-size: 15px; }
.stack { margin-top: clamp(14px, 1.8vw, 24px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.group { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); }
.group h4 { font-size: 1.125rem; font-weight: 400; margin-bottom: var(--space-3); }
.group.wide { grid-column: 1 / -1; }
.badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.badge { font-size: 14px; line-height: 1; padding: 8px 12px; border-radius: var(--radius-pill); background: var(--primary-bg-subtle); color: var(--primary); }
.badge.new { background: var(--primary); color: var(--on-primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; cursor: pointer;
  padding: 10px 18px; border-radius: var(--radius-lg); text-decoration: none; border: 1px solid transparent;
  box-shadow: var(--shadow-btn); transition: background-color .15s ease-in-out, border-color .15s ease-in-out, color .15s;
}
.btn svg { width: 1em; height: 1em; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--link-hover); border-color: var(--link-hover); }
.btn-outline { background: transparent; border-color: var(--secondary); color: var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: var(--bg); }
.btn-ghost { background: transparent; border-color: rgba(54,68,66,.35); color: var(--tile-ink); box-shadow: none; }
.btn-ghost:hover { background: rgba(54,68,66,.08); }

/* ---------- Footer ---------- */
footer { background: transparent; color: var(--fg); border-top: 1px solid var(--border); padding-block: clamp(56px, 8vw, 96px) 0; overflow: hidden; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .6fr)); gap: var(--space-5); align-items: start; }
.foot .cta h2 { font-size: clamp(2.5rem, 7vw, 5.5rem); letter-spacing: -.045em; line-height: .95; }
.foot .cta p { margin-top: var(--space-3); font-weight: 400; font-size: 1.125rem; max-width: 26rem; }
.foot .actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.email { font-weight: 400; font-size: 15px; user-select: all; }
.foot h4 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: var(--space-3); font-weight: 700; color: var(--primary); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { text-decoration: none; font-size: 15px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.foot ul a:hover { background-size: 100% 1px; }
.legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); font-size: 13px; }
.ruler { position: relative; height: 64px; margin-top: var(--space-4); display: flex; align-items: flex-end; justify-content: space-between; padding-inline: max(16px, 3vw); }
.ruler i { width: 1px; height: 12px; background: var(--border); transition: height .25s var(--ease), background .25s; }
.ruler i.major { height: 22px; }

/* ---------- Dialog ---------- */
dialog {
  width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0;
  border-radius: 32px; background: var(--body-bg); color: var(--body-color); overflow: auto; box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(35, 56, 49, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dlg-media { aspect-ratio: 1440 / 1024; max-height: 52vh; width: 100%; background: var(--light); overflow: hidden; }
.dlg-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dlg-media.drawn { display: grid; place-items: stretch; padding: 24px 0 0 24px; background: var(--primary); }
.dlg-body { padding: clamp(24px, 4vw, 40px); display: grid; gap: var(--space-3); }
.dlg-body .eyebrow { font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--secondary); }
.dlg-body h3 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.035em; color: var(--primary); line-height: 1.05; }
.dlg-body p { font-weight: 400; font-size: 1.0625rem; max-width: 40rem; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.dlg-close {
  position: sticky; top: 14px; float: right; margin: 14px 14px -58px 0; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 22px; line-height: 1;
  background: rgba(35,56,49,.85); color: #fff; display: grid; place-items: center;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); translate: -50% 20px; z-index: 60;
  padding: 10px 18px; border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .span-5, .span-7 { grid-column: 1 / -1; }
  .tile { min-height: 440px; }
  .about { grid-template-columns: 1fr; }
  .portrait { position: static; }
  .roles { grid-template-columns: 1fr; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .cta { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .nav a { padding: 8px 11px; font-size: 13px; }
  .nav a kbd { display: none; }
  .stack { grid-template-columns: 1fr; }
  .edu, .certs a, .certs .row { grid-template-columns: 1fr; gap: 2px; }
  .certs .arrow { display: none; }
  .tile { min-height: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .hero h1 .line { opacity: 1; translate: 0 0; }
}

/* ---------- Multi-page additions ---------- */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

.page-head { padding-block: clamp(130px, 20vh, 200px) clamp(40px, 6vw, 80px); text-align: center; }
.page-head h1 {
  font-weight: 700; color: var(--primary);
  font-size: clamp(3.25rem, 10vw, 8rem); line-height: .95; letter-spacing: -.045em;
  opacity: 0; translate: 0 .3em; animation: rise .8s var(--ease) forwards;
}
.page-head p { max-width: 36rem; margin: var(--space-4) auto 0; font-weight: 400; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--fg-soft); }
.page-head + .section { padding-top: 0; }

/* Work page: "see all" link under the bento */
.next-link { display: flex; justify-content: center; margin-top: clamp(32px, 5vw, 56px); }

/* About page */
.statement { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; color: var(--primary); }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.principle { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--surface-line); }
.principle h3 { font-size: 1.375rem; letter-spacing: -.02em; }
.principle p { margin-top: var(--space-2); font-weight: 400; }
.principle .ico { width: 48px; height: 48px; margin-bottom: var(--space-3); display: grid; place-items: center; border-radius: 16px; background: var(--primary-tint-10); color: var(--primary); }
.principle .ico svg { width: 22px; height: 22px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.split h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; color: var(--primary); line-height: 1.05; margin-bottom: var(--space-4); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.contact-tile {
  min-height: 280px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius-card);
  background: var(--tile-bg, #ffffff); color: var(--tile-fg, var(--tile-ink)); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4);
}
.contact-tile .eyebrow { font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: inherit; }

.contact-tile h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.03em; line-height: 1.05; margin-top: 6px; }
.contact-tile p { font-weight: 400; margin-top: var(--space-2); max-width: 28rem; }
.contact-tile .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.contact-tile .email { font-size: clamp(1rem, 2vw, 1.25rem); word-break: break-all; }
a.contact-tile { text-decoration: none; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
a.contact-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(35,56,49,.35); }
.contact-tile .go { align-self: flex-end; font-size: 28px; transition: translate .3s var(--ease); }
a.contact-tile:hover .go { translate: 4px -4px; }
.socials { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.socials a { padding: 10px 16px; border-radius: var(--radius-pill); text-decoration: none; font-size: 14px; background: rgba(0,0,0,.03); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: box-shadow .2s, color .2s; }
.socials a:hover { color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }

/* Footer on every page */
.foot .cta h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); color: var(--primary); }
.btn-dark { background: var(--forest); border-color: var(--forest); color: var(--mint-soft); }
.btn-dark:hover { background: #2e4a40; }

/* 404 */
.lost { min-height: 70vh; display: grid; place-content: center; text-align: center; padding-block: 140px 80px; }
.lost h1 { font-size: clamp(4rem, 14vw, 10rem); line-height: .9; letter-spacing: -.05em; color: var(--primary); }
.lost p { margin-top: var(--space-3); font-weight: 400; font-size: 1.125rem; color: var(--fg-soft); }
.lost .btn { margin: var(--space-4) auto 0; border-radius: var(--radius-pill); }

@media (max-width: 900px) {
  .principles, .split { grid-template-columns: 1fr; }
  .contact-grid > * { grid-column: 1 / -1 !important; }
}

/* Theme toggle (footer), like the moon button on seanhalpin.xyz */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--mint); color: var(--forest); transition: transform .3s var(--ease), background .2s;
}
.theme-toggle:hover { transform: rotate(-15deg) scale(1.05); }
.theme-toggle svg { width: 20px; height: 20px; }
.legal { align-items: center; }

/* About: photo strip, recovered from the old React site's gallery */
.gallery-band { padding-block: clamp(24px, 4vw, 48px); }
.gallery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(14px, 1.8vw, 24px); align-items: start; }
.shot { margin: 0; display: grid; gap: 12px; }
.shot img {
  width: 100%; height: clamp(260px, 30vw, 400px); object-fit: cover;
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
  transition: transform .6s var(--ease);
}
.shot:hover img { transform: translateY(-4px) rotate(var(--tilt, 0deg)); }
.shot-beach { --tilt: -1.5deg; margin-top: clamp(24px, 4vw, 56px); }
.shot-team  { --tilt: .8deg; }
.shot-team img { object-position: 50% 40%; }
.shot-wall  { --tilt: 1.5deg; margin-top: clamp(40px, 6vw, 88px); }
.shot-wall img { object-position: 60% 30%; }
.shot figcaption { font-size: 14px; font-weight: 400; color: var(--fg-soft); padding-inline: 8px; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-team { grid-column: 1 / -1; order: -1; }
  .shot-beach, .shot-wall { margin-top: 0; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .shot img { height: auto; aspect-ratio: 4 / 3; }
}

/* Design system: headings in the title face (stand-in for the reference display font) */
h1, h2, h3, h4, .statement, .num { font-family: var(--font-title); }

