/* Jason Flynn — personal site. Dark Matter Studio palette (Midnight + Ember). */

:root {
  --bg: #161717;
  --surface: #1f2121;
  --line: #2f3232;
  --line-soft: #242626;
  --mark: #242626;
  --text: #ece6e3;
  --muted: #b9b4b1;
  --faint: #8f9291;
  --accent: #e8765f;
  --accent-line: #5a2f27;
  --teal: #9fd2c8;
  --teal-line: #2c4a45;

  --sans: 'Archivo', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --slab: 'Zilla Slab', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 8.3vw, 120px);
  --max: 1440px;
}

*, *::before, *::after { 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(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3, p { margin: 0; }

.page { position: relative; max-width: var(--max); margin: 0 auto; overflow: hidden; }
@supports (overflow: clip) { .page { overflow: clip; } }

/* Serif accent word inside condensed caps headings */
.accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
}
.accent--plain { color: inherit; }

/* Brand mark */
.mark { display: block; fill: currentColor; }
.bg-mark {
  position: absolute;
  top: -180px;
  right: -160px;
  width: 620px;
  height: 620px;
  color: var(--mark);
  pointer-events: none;
}

/* Nav */
.nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 36px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark { width: 30px; height: 30px; }
.brand span {
  font-weight: 800;
  font-stretch: 75%;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 40px; font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }

main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 140px;
  padding: 120px var(--gutter) 0;
}

/* Hero */
.hero { display: flex; flex-direction: column; gap: 32px; max-width: 1120px; }
.hero h1 {
  font-weight: 850;
  font-stretch: 70%;
  font-size: clamp(52px, 6.7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.2;
  color: var(--accent);
}
.hero-body { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.6; color: var(--muted); max-width: 760px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid #3f4242;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.btn--primary:hover { background: #f08a75; color: var(--bg); }

/* Section heads */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 8px;
}
.section-head h2, .work-head h2 {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(32px, 2.8vw, 40px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.section-head a { font-weight: 600; font-size: 15px; white-space: nowrap; }

/* What I'm working on — stacked blocks */
.work { display: flex; flex-direction: column; }
.work-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 36px; }
.work-head p { font-size: 19px; color: var(--muted); }
.project {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  max-width: 820px;
}
.eyebrow {
  font-family: var(--slab);
  font-size: 14px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--accent);
}
.project h3 {
  font-weight: 900;
  font-stretch: 65%;
  font-size: clamp(52px, 5.6vw, 80px);
  line-height: 0.9;
  text-transform: uppercase;
}
.project p { font-size: 19px; line-height: 1.6; color: var(--muted); }
.cta {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: flex-start;
}
.cta:hover { color: var(--text); }

/* Selected works */
.works { display: flex; flex-direction: column; gap: 8px; }
.work-row {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-soft);
}
.work-row__text { display: flex; flex-direction: column; gap: 10px; }
.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.work-row__title { font-size: clamp(24px, 2.1vw, 30px); font-weight: 700; font-stretch: 85%; line-height: 1.15; }
.work-row__hook { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 820px; }
.work-row__cta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-align: right;
  padding-top: 30px;
  text-transform: uppercase;
}
.work-row:hover .work-row__title { color: var(--accent); }
.work-row:hover { color: var(--text); }

/* Changelog */
.changelog { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.log-row {
  display: grid;
  grid-template-columns: 140px 120px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.log-date { font-family: var(--mono); font-size: 14px; color: var(--faint); }
.tag {
  justify-self: start;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 4px 12px;
}
.tag--built { color: var(--teal); border-color: var(--teal-line); }
.log-text { font-size: 18px; }

/* Footer */
.footer {
  margin-top: 140px;
  padding: 100px var(--gutter) 64px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.footer-top h2 {
  font-weight: 850;
  font-stretch: 70%;
  font-size: clamp(56px, 6.1vw, 88px);
  line-height: 0.95;
  text-transform: uppercase;
}
.footer-email { font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 15px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .mark { width: 22px; height: 22px; color: var(--faint); }
.footer-brand span { font-family: var(--slab); letter-spacing: 0.35em; text-transform: uppercase; font-size: 13px; }
.social { display: flex; flex-wrap: wrap; gap: 32px; }
.social a { color: var(--muted); }
.social a:hover { color: var(--accent); }

/* Tablet */
@media (max-width: 900px) {
  main { gap: 96px; padding-top: 72px; }
  .bg-mark { width: 420px; height: 420px; top: -140px; right: -140px; }
  .work-row { grid-template-columns: 1fr; gap: 12px; }
  .work-row__cta { text-align: left; padding-top: 4px; }
  .footer { margin-top: 96px; padding-top: 72px; }
}

/* Phone */
@media (max-width: 640px) {
  .nav { padding: 24px var(--gutter); }
  .brand span { font-size: 19px; }
  .nav-links { gap: 18px; font-size: 14px; }
  .nav-links .hide-sm { display: none; }
  .bg-mark { width: 300px; height: 300px; top: -110px; right: -120px; }
  .project { padding: 44px 0; }
  .project p { font-size: 17px; }
  .eyebrow { font-size: 12px; letter-spacing: 0.35em; }
  .log-row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .log-text { grid-column: 1 / -1; font-size: 17px; }
  .section-head { flex-wrap: wrap; }
  .btn { flex: 1 1 100%; justify-content: center; }
  .footer-email { font-size: 18px; }
}
