/* Hughes WD — site styles. No framework; modern CSS only. */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #efede8;
  --ink: #16161a;
  --muted: #5b5b66;
  --line: #e2dfd8;
  --accent: #2f54d6;
  --accent-ink: #ffffff;
  --focus: #2f54d6;
  --ok: #1f7a43;
  --err: #b42318;
  --shadow: 0 1px 2px rgb(20 20 30 / .06), 0 8px 24px rgb(20 20 30 / .06);

  /* The color-swatch spectrum from the HWD logo. */
  --spectrum: linear-gradient(90deg, #ff3b30, #ff9500, #ffcc00, #34c759, #0a84ff, #5e5ce6, #ff2d92);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1014;
    --surface: #17181d;
    --surface-2: #131418;
    --ink: #ececf1;
    --muted: #a0a0ad;
    --line: #2a2b33;
    --accent: #8ea2ff;
    --accent-ink: #0f1014;
    --focus: #8ea2ff;
    --ok: #5fd08b;
    --err: #ff8a80;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1014;
  --surface: #17181d;
  --surface-2: #131418;
  --ink: #ececf1;
  --muted: #a0a0ad;
  --line: #2a2b33;
  --accent: #8ea2ff;
  --accent-ink: #0f1014;
  --focus: #8ea2ff;
  --ok: #5fd08b;
  --err: #ff8a80;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before { /* thin spectrum rule across the top of the page */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--spectrum);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

.eyebrow {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.spectrum-text {
  background: var(--spectrum);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 9px;
  font: 700 22px/1 var(--font-display);
  color: #fff;
  background: conic-gradient(from 200deg, #ff3b30, #ff9500, #ffcc00, #34c759, #0a84ff, #5e5ce6, #ff2d92, #ff3b30);
  text-shadow: 0 1px 2px rgb(0 0 0 / .35);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08);
}
.brand-name { font: 600 18px/1 var(--font-display); letter-spacing: -0.01em; }
.brand-name span { color: var(--muted); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--accent); }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- Photos (the Portland shots from the original site) ----------
   Each photo fades into the page color through gradients built from --bg,
   so the same image works in light and dark mode and text never sits on a busy area. */
:root { --photo-dim: 1; }
:root[data-theme="dark"] { --photo-dim: .62; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --photo-dim: .62; } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(64px, 12vw, 140px) 0 clamp(56px, 9vw, 112px); }
.hero-photo {
  position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: min(62%, 1000px);
  background:
    linear-gradient(to right, var(--bg) 0%, var(--bg) 12%, color-mix(in srgb, var(--bg) 72%, transparent) 34%, transparent 68%),
    linear-gradient(to top, var(--bg) 0%, transparent 28%),
    url("img/bg-st-johns-bridge.jpg") 30% 40% / cover no-repeat;
}
.hero-photo::after { /* dims the photo in dark mode */
  content: ""; position: absolute; inset: 0; background: var(--bg); opacity: calc(1 - var(--photo-dim));
}
.hero .wrap { position: relative; }
@media (max-width: 860px) {
  .hero { padding-top: clamp(230px, 58vw, 340px); }
  .hero-photo {
    width: 100%; bottom: auto; height: clamp(300px, 72vw, 440px);
    background:
      linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 30%, transparent 70%),
      url("img/bg-st-johns-bridge.jpg") 30% 45% / cover no-repeat;
  }
}
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 700; max-width: 16ch; margin-bottom: 28px; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 50ch; margin-bottom: 36px; }
.hero .lede { color: color-mix(in srgb, var(--ink) 78%, var(--bg)); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, background-color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.hero-links { list-style: none; display: flex; flex-wrap: wrap; gap: 24px; padding: 0; margin: 0; }
.hero-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.hero-links a:hover { color: var(--ink); }
.hero-links svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--surface-2); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2, .contact-intro h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; max-width: 22ch; }

/* ---------- Photo band (Experience: the FURTHR plate) ---------- */
.section--band { padding-top: 0; position: relative; isolation: isolate; }
.photo-band {
  position: relative; height: clamp(220px, 34vw, 420px);
  background:
    linear-gradient(to bottom, transparent 35%, color-mix(in srgb, var(--bg) 70%, transparent) 72%, var(--bg) 100%),
    url("img/bg-furthr.jpg") 50% 52% / cover no-repeat;
}
.photo-band::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: calc(1 - var(--photo-dim)); }
.section-head--over-band { position: relative; margin-top: clamp(-96px, -7vw, -48px); }

/* ---------- Experience ---------- */
.employer { display: grid; gap: 20px; margin-top: clamp(28px, 4vw, 48px); }
.employer + .employer { margin-top: clamp(48px, 7vw, 80px); }
@media (min-width: 900px) {
  .employer { grid-template-columns: 240px 1fr; column-gap: 48px; align-items: start; }
  .employer-head { grid-row: span 2; position: sticky; top: 96px; }
  .employer .role { grid-column: 2; }
}
.employer-name { font-size: clamp(26px, 3vw, 34px); }
.employer-when { color: var(--muted); font-weight: 500; margin: 6px 0 0; }

.role {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow);
}
.role--featured { overflow: hidden; }
.role--featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--spectrum); }
.role-when { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.role h4 { font: 700 clamp(20px, 2.2vw, 24px)/1.2 var(--font-display); letter-spacing: -0.01em; margin: 0 0 14px; }
.role h4 span { font-weight: 500; color: var(--muted); }
.role > p:not(.role-when) { color: var(--muted); }
.role > p:last-of-type { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 0; }
.stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dt { font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.stats dd { margin: 0 0 2px; font: 700 clamp(28px, 3.4vw, 38px)/1.1 var(--font-display); letter-spacing: -0.02em; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.tags li { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }

/* ---------- Work ---------- */
.work-grid { display: grid; gap: clamp(20px, 3vw, 32px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.project {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.project:hover { transform: translateY(-3px); }
.project-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.project-media--dark { background: #000; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project:hover .project-media img { transform: scale(1.03); }
.project-body { padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; flex: 1; }
.project-meta { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.project h3 { font-size: 26px; margin-bottom: 12px; }
.project h3 a { color: var(--ink); text-decoration: none; }
.project h3 a::after { content: " ↗"; font-size: .7em; color: var(--muted); }
.project h3 a:hover { color: var(--accent); }
.project-body > p:not(.project-meta):not(.press-label) { color: var(--muted); }

/* Featured project: full row, image beside the text on wide screens. */
.project--wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .project--wide { flex-direction: row; }
  .project--wide .project-media { flex: 0 0 56%; aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
  .project--wide .project-body { justify-content: center; }
}
.project-media--metar { background: #2fb3c4; }
.project-media--metar img { object-position: 50% 0; }
.store-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 22px 0 0; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

.press-label { font-size: 13px; font-weight: 600; color: var(--ink); margin: 4px 0 10px; }
.press { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.press a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
}
.press a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; gap: 24px 64px; }
@media (min-width: 880px) { .about { grid-template-columns: 5fr 7fr; } .about-body { padding-top: 34px; } }
.about-body p { font-size: 18px; }
.about-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.about-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% 50%; }
:root[data-theme="dark"] .about-photo img { filter: brightness(.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .about-photo img { filter: brightness(.85); } }

/* ---------- Contact backdrop (the feather) ---------- */
.section--feather { position: relative; isolation: isolate; overflow: hidden; }
.section--feather::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("img/bg-feather.jpg") 20% 50% / cover no-repeat;
  filter: blur(3px); transform: scale(1.04);
}
.section--feather::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 55%, var(--bg) 100%);
}

/* ---------- Contact ---------- */
.contact { display: grid; gap: 40px 64px; }
@media (min-width: 880px) { .contact { grid-template-columns: 5fr 7fr; align-items: start; } }
.contact-intro h2 { margin-bottom: 20px; }
.contact-intro p { color: var(--muted); max-width: 42ch; }
.contact-links { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.contact-links a { font-weight: 600; text-decoration: none; }

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 14px; font-weight: 600; }
.optional { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--err); }
.field-error { font-size: 13px; color: var(--err); margin: 0; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form-status { margin: 0; font-weight: 600; font-size: 15px; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--err); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); }
.footer-inner > a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

@media (max-width: 600px) { .br-wide { display: none; } }
@media (max-width: 480px) {
  .brand-name { display: none; }
  .site-nav a { font-size: 14px; }
}
