/* =========================================================
   Owen Flynn — portfolio
   Light, minimal. Palette: light gray / cream / black / white,
   with a single teal accent.
   ========================================================= */

/* Self-hosted fonts — no external requests (no Google Fonts phone-home).
   url() is resolved relative to THIS stylesheet, so it works from every page. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('assets/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg:        #e9e9e5;   /* light gray */
  --bg-2:      #f0f0ec;
  --surface:   #ffffff;   /* white */
  --surface-2: #f5f0e4;   /* cream */
  --border:    #dcdcd5;
  --border-2:  #cbcbc2;
  --ink:       #17181a;   /* near-black */
  --ink-2:     #4a4c4e;
  --ink-3:     #616365;   /* muted — WCAG AA on the light ground */
  --accent:      #0e8794; /* teal */
  --accent-ink:  #0a636f; /* darker teal for text / links / buttons */
  --accent-weak: rgba(14,135,148,.10);

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 10px 30px -16px rgba(20,20,20,.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(150deg, var(--accent), var(--accent-ink));
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--ink-2); transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.cta {
  color: var(--ink); border: 1px solid var(--border-2); padding: 8px 15px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.nav-links a.cta:hover { border-color: var(--accent); background: var(--accent-weak); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }

/* ---------------- hero (home) ---------------- */
.hero { padding: 96px 0 48px; }
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(40px, 8vw, 82px); line-height: .98; letter-spacing: -.03em;
  margin: 0 0 24px; text-wrap: balance; max-width: 15ch;
}
.hero h1 .em { color: var(--accent); }
.hero .lede { font-size: clamp(18px, 2.4vw, 22px); color: var(--ink-2); max-width: 56ch; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 14px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--ink);
  background: var(--surface);
  transition: transform .18s var(--ease), border-color .2s var(--ease), background .2s var(--ease); cursor: pointer;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #ffffff; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------------- section frame ---------------- */
.section { padding: 66px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin: 0; }
.section-head .kicker { font-family: var(--mono); font-size: 13px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }

/* ---------------- project gallery ---------------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery .feature { grid-column: span 2; }
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; min-height: 220px; box-shadow: var(--shadow);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.pcard:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 44px -22px rgba(20,20,20,.28); }
.pcard .top { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.icon-tile {
  width: 52px; height: 52px; border-radius: 13px; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--surface-2);
  background: var(--ink);
}
.pcard .ptag { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.pcard h3 { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.pcard p { color: var(--ink-2); margin: 0 0 20px; font-size: 15.5px; }
.pcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pcard .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--border-2); border-radius: 6px; padding: 3px 8px; }
.pcard .go { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); display: inline-flex; gap: 7px; align-items: center; }
.go .arrow { transition: transform .2s var(--ease); }
.pcard:hover .go .arrow { transform: translateX(4px); }

/* feature card layout (first project) */
.feature .inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; }
.feature .visual {
  border-radius: var(--radius-sm); min-height: 200px; border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
  display: grid; place-items: center; position: relative; overflow: hidden;
}

/* ---------------- about ---------------- */
.about { display: grid; grid-template-columns: 1.3fr .7fr; gap: 44px; align-items: start; }
.about p { color: var(--ink-2); font-size: 18px; margin: 0 0 18px; max-width: 60ch; }
.about p strong { color: var(--ink); font-weight: 600; }
.stack-list { display: flex; flex-direction: column; gap: 16px; }
.stack-row { border-top: 1px solid var(--border); padding-top: 14px; }
.stack-row .k { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 7px; }
.stack-row .v { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------------- project detail page ---------------- */
.back { padding: 30px 0 0; }
.back a { font-family: var(--mono); font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; transition: color .2s; }
.back a:hover { color: var(--accent-ink); }
.back a .arrow { transition: transform .2s var(--ease); }
.back a:hover .arrow { transform: translateX(-3px); }

.p-hero { padding: 40px 0 26px; display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.p-hero .icon-tile { width: 76px; height: 76px; border-radius: 19px; font-size: 32px; }
.p-hero .head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 6vw, 58px); letter-spacing: -.03em; line-height: 1; margin: 4px 0 12px; }
.p-hero .head .tagline { font-size: clamp(18px, 2.4vw, 21px); color: var(--ink-2); max-width: 52ch; margin: 0; }
.p-hero .head .ptag { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); letter-spacing: .05em; text-transform: uppercase; }

.p-status { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.pill { font-family: var(--mono); font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--ink-2); display: inline-flex; gap: 7px; align-items: center; background: var(--surface); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill.accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-ink); background: var(--accent-weak); }

.p-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 44px; padding: 26px 0 40px; align-items: start; }
.p-body h2 { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.01em; margin: 34px 0 12px; }
.p-body h2:first-child { margin-top: 0; }
.p-body p { color: var(--ink-2); margin: 0 0 16px; }
.p-body ul { color: var(--ink-2); padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.p-body ul li { padding-left: 26px; position: relative; }
.p-body ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }

.p-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.links-list { display: flex; flex-direction: column; gap: 9px; }
.linkrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 13.5px; transition: border-color .2s var(--ease), background .2s var(--ease), transform .18s var(--ease); }
.linkrow:hover { border-color: var(--accent); background: var(--accent-weak); transform: translateX(2px); }
.linkrow.disabled { opacity: .5; }
.linkrow .arrow { color: var(--accent-ink); }
.techtags { display: flex; flex-wrap: wrap; gap: 8px; }

/* device / screenshot placeholder */
.shots { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 0 6px; }
.phone {
  width: 168px; aspect-ratio: 9/19.5; border-radius: 26px; flex: none;
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
  border: 1px solid var(--border-2); padding: 8px; position: relative;
  box-shadow: 0 22px 44px -26px rgba(20,20,20,.3);
}
.phone .screen {
  height: 100%; border-radius: 19px; border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), #ffffff);
  display: grid; place-items: center; text-align: center; color: var(--ink-3); font-family: var(--mono); font-size: 11px; padding: 14px;
}
.placeholder-note { font-family: var(--mono); font-size: 12px; color: var(--ink-3); border-left: 2px solid var(--border-2); padding-left: 12px; margin: 10px 0 0; }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--border); padding: 54px 0 46px; margin-top: 30px; }
.footer .inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 46px); letter-spacing: -.02em; margin: 0 0 10px; max-width: 16ch; }
.footer .socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer .muted { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; margin-top: 26px; }

/* reveal on load / scroll — GATED on html.js so with no/broken JS
   content is visible by default (never a blank page). */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------------- responsive ---------------- */
@media (max-width: 820px) {
  .nav-links { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 24px 18px; transform: translateY(-120%); transition: transform .3s var(--ease); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-links a.cta { text-align: center; margin-top: 12px; border-bottom: 1px solid var(--border-2); }
  .nav-toggle { display: block; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .feature { grid-column: span 1; }
  .feature .inner { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 30px; }
  .p-grid { grid-template-columns: 1fr; gap: 30px; }
  .p-side { position: static; }
}
