/* tyekbryant.com
   One stylesheet, no framework. Dark by default, light when the OS asks for it.
   Contrast for every text/background pair below is WCAG AA or better.

   Layout rule: FULL WIDTH. No max-width wrapper and no centred column. Content runs
   edge to edge with a small gutter, grids stretch to fill, and the root font size grows
   with the viewport so line lengths stay readable on big screens. */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark light;

  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1d212a;
  --border: #2a2f3a;
  --text: #ece9e2;
  --muted: #a2a7b2;
  --faint: #7b818e;
  --accent: #f2b630;        /* a nod to the old site's gold */
  --accent-ink: #0e1014;    /* text on an accent fill */
  --accent-soft: rgb(242 182 48 / 0.14);
  --cyan: #7cc8f8;
  --cyan-soft: rgb(124 200 248 / 0.16);
  --foe: #f0786a;
  --glow: rgb(242 182 48 / 0.10);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(1rem, 2.4vw, 3rem);
  --header-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f4ee;
    --surface: #ffffff;
    --surface-2: #f0ece4;
    --border: #e1dcd2;
    --text: #1a1c21;
    --muted: #575d69;
    --faint: #646a77;
    --accent: #8a5800;
    --accent-ink: #ffffff;
    --accent-soft: rgb(138 88 0 / 0.10);
    --cyan: #0b6aa2;
    --cyan-soft: rgb(11 106 162 / 0.12);
    --foe: #b8402f;
    --glow: rgb(214 150 20 / 0.14);
  }
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* 16px on phones, about 17px at 1440, 19px at 1920, 21px at 2560 */
  font-size: clamp(100%, 0.72rem + 0.38vw, 137.5%);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  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 var(--border);
}
.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
  font-weight: 650; letter-spacing: -0.01em; text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 7px; }

.nav { display: flex; gap: clamp(0rem, 1.6vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 0.35rem 0.4rem;
  color: var(--muted); font-size: 0.95rem; text-decoration: none;
}
.nav a:hover { color: var(--text); }

@media (max-width: 640px) { .brand span { display: none; } }
@media (max-width: 430px) {
  .nav a { padding-inline: 0.28rem; font-size: 0.875rem; }
}
/* Very small phones: five links only fit if the logo gives up its spot */
@media (max-width: 380px) {
  .brand { display: none; }
  .site-header__inner { justify-content: center; }
  .nav a { padding-inline: 0.2rem; font-size: 0.8125rem; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto;
  width: min(1100px, 120vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: 2rem; align-items: center; }

.eyebrow, .section__label, .project__meta, .card__role, .contact__label, .skills dt, .education h3, .job__dates {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.eyebrow { color: var(--accent); margin-bottom: 1.1rem; }

.hero h1 { font-size: clamp(2.9rem, 7.5vw, 9rem); font-weight: 750; letter-spacing: -0.035em; }
.tagline {
  margin: 0.6rem 0 1.5rem;
  font-size: clamp(1.35rem, 2.8vw, 3rem); line-height: 1.22; font-weight: 500;
  color: var(--muted); letter-spacing: -0.015em;
}
.lede { font-size: 1.125rem; color: var(--muted); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.25rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.button:hover { color: var(--accent-ink); transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button--ghost:hover { color: var(--text); border-color: var(--accent); }

/* Decorative scan grid, shown once there's room beside the text */
.hero__board { display: none; }
@media (min-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 5rem); }
  .hero__board {
    --tile: clamp(3rem, 5vw, 7rem);
    justify-self: center;
    display: grid; grid-template-columns: repeat(6, var(--tile)); gap: calc(var(--tile) * 0.13);
    transform: perspective(1100px) rotateX(22deg) rotateZ(-9deg);
    -webkit-mask-image: radial-gradient(130% 110% at 30% 35%, #000 55%, transparent 100%);
    mask-image: radial-gradient(130% 110% at 30% 35%, #000 55%, transparent 100%);
  }
  .hero__board span {
    width: var(--tile); height: var(--tile); border-radius: calc(var(--tile) * 0.17);
    display: grid; place-items: center;
    font: 700 calc(var(--tile) * 0.4)/1 var(--font-mono); color: var(--cyan);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    box-shadow: 0 4px 0 -1px var(--border);
  }
  .hero__board .r { background: transparent; box-shadow: none; border-style: dashed; }
  .hero__board .z::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
  .hero__board .hi { color: var(--accent); }
  .hero__board .f::before {
    content: ""; width: calc(var(--tile) * 0.3); height: calc(var(--tile) * 0.3); border-radius: 3px;
    background: var(--accent); transform: rotate(45deg);
  }
  .hero__board .c { outline: 2px solid var(--accent); outline-offset: 3px; }
}

/* ── Sections ───────────────────────────────────────────────────────── */
.section { padding-block: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid var(--border); }

.section__head { margin-bottom: clamp(1.75rem, 3.5vw, 3rem); }
.section__label { color: var(--accent); margin-bottom: 0.4rem; }
.section__head h2 { font-size: clamp(1.9rem, 3.6vw, 3.5rem); font-weight: 700; }
.section__intro { margin-top: 0.9rem; color: var(--muted); }

/* Shared diamond-bullet list */
.points { margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.points li { position: relative; padding-left: 1.4rem; }
.points li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.62em;
  width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--accent);
  transform: rotate(45deg);
}

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 0.22rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font: 500 0.78rem/1.4 var(--font-mono); color: var(--muted);
}

/* ── Experience ─────────────────────────────────────────────────────── */
.jobs { display: grid; gap: clamp(2.5rem, 4vw, 4rem); }
@media (min-width: 1000px) {
  .jobs { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .job + .job { padding-left: clamp(2rem, 3vw, 4rem); border-left: 1px solid var(--border); }
}
.job h3 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 700; }
.job__org { margin: 0.35rem 0 1rem; color: var(--muted); }
.job__roles { list-style: none; margin: 0; padding: 0 0 1rem; display: grid; gap: 0.3rem; border-bottom: 1px solid var(--border); }
.job__roles li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; align-items: baseline; }
.job__role { font-weight: 600; }
.job__roles li:first-child .job__role { color: var(--accent); }
.job__dates { color: var(--faint); white-space: nowrap; }

/* Recommendations */
.quotes__title {
  margin: clamp(2.5rem, 4vw, 4rem) 0 1rem;
  font: 400 0.8rem/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint);
}
.quotes { display: grid; gap: clamp(1rem, 1.6vw, 1.75rem); }
@media (min-width: 1000px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quote {
  margin: 0; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.quote blockquote { margin: 0; flex: 1; }
.quote strong { display: block; font-weight: 600; }
.quote figcaption span { color: var(--muted); font-size: 0.9rem; }

/* ── Projects ───────────────────────────────────────────────────────── */
.project {
  display: grid; gap: clamp(1.5rem, 3vw, 3.5rem); align-items: center;
  grid-template-columns: 1fr;
}
.project + .project { margin-top: clamp(3rem, 6vw, 5.5rem); }

@media (min-width: 900px) {
  .project { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project--flip .project__media { order: 2; }
}

.project__meta { color: var(--faint); margin-bottom: 0.5rem; }
.project__body h3 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 700; margin-bottom: 1rem; }
.project__body > p { color: var(--muted); }

.project__media { margin: 0; }
.project__media figcaption { margin-top: 0.7rem; font-size: 0.85rem; color: var(--faint); }

/* Hull Breach: three phone screens fanned out, the gameplay shot in front */
.project__media--phones {
  display: flex; justify-content: center; align-items: center;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(0.5rem, 2vw, 1.5rem);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--cyan-soft), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.project__media--phones img {
  width: 36%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 12px; border: 1px solid rgb(255 255 255 / 0.10);
  box-shadow: 0 22px 44px -20px rgb(0 0 0 / 0.65);
  background: #0b0f16;
}
.project__media--phones img:nth-child(1) { transform: translateX(16%) rotate(-7deg) scale(0.88); }
.project__media--phones img:nth-child(2) { width: 42%; position: relative; z-index: 1; }
.project__media--phones img:nth-child(3) { transform: translateX(-16%) rotate(7deg) scale(0.88); }

/* Image and diagram panels fill their column; the diagram is capped so it doesn't balloon */
.project__media--art img, .project__media--art svg {
  width: 100%;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.project__media--art .relay-art { max-height: 30rem; }

/* Relay diagram */
.relay-art { font-family: var(--font-sans); }
.relay-art__box { fill: var(--surface-2); stroke: var(--border); stroke-width: 1.5; }
.relay-art__box--cloud { stroke: var(--accent); }
.relay-art__title { fill: var(--text); font-size: 16px; font-weight: 650; text-anchor: middle; }
.relay-art__sub { fill: var(--muted); font-size: 12.5px; text-anchor: middle; font-family: var(--font-mono); }
.relay-art__note { fill: var(--faint); font-size: 12.5px; font-family: var(--font-mono); }
.relay-art__note--accent { fill: var(--accent); }
.relay-art__line { fill: none; stroke: var(--muted); stroke-width: 2; }
.relay-art__line--tunnel { stroke: var(--accent); stroke-dasharray: 6 5; }
.relay-art__arrowhead { fill: var(--muted); }
.relay-art__arrowhead--accent { fill: var(--accent); }

/* ── Earlier games ──────────────────────────────────────────────────── */
.cards {
  display: grid; gap: clamp(1rem, 1.6vw, 1.75rem); grid-template-columns: 1fr;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover, .card:focus-within { transform: translateY(-3px); border-color: var(--accent); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.card__body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { font-size: 1.15rem; font-weight: 650; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.card__role { color: var(--accent); margin: 0.3rem 0 0.7rem; font-size: 0.72rem; }
.card__body > p:last-child { color: var(--muted); font-size: 0.95rem; }

.also { margin-top: 2rem; color: var(--muted); }

/* ── About ──────────────────────────────────────────────────────────── */
.about { display: grid; gap: clamp(2rem, 3.5vw, 4rem); }
@media (min-width: 800px) {
  .about { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about__text { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .about { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
  .about__text { grid-column: auto; }
}
.about__text { font-size: 1.125rem; }
.about__text p { color: var(--muted); }
.about__text p:first-child { color: var(--text); }

.skills { margin: 0; display: grid; gap: 1.1rem; align-content: start; }
.skills > div { padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.skills > div:last-child { border-bottom: 0; padding-bottom: 0; }
.skills dt { color: var(--faint); margin-bottom: 0.35rem; }
.skills dd { margin: 0; }

.education h3 { color: var(--faint); font-weight: 400; margin-bottom: 0.8rem; letter-spacing: 0.06em; line-height: 1.6; }
.education ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.education li { padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.education li:last-child { border-bottom: 0; padding-bottom: 0; }
.education strong { display: block; font-weight: 600; }
.education span { color: var(--muted); }

/* ── Contact ────────────────────────────────────────────────────────── */
.contact { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.contact li { flex: 1 1 14rem; }
.contact a {
  display: flex; flex-direction: column; gap: 0.25rem; height: 100%;
  padding: 1.1rem 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.contact__label { color: var(--faint); }
.contact__value { font-weight: 600; overflow-wrap: anywhere; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { padding-block: 2rem; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.9rem; }

/* ── 404 ────────────────────────────────────────────────────────────── */
.notfound { min-height: calc(100vh - var(--header-h) - 7rem); display: grid; align-content: center; }
.notfound h1 { font-size: clamp(2.4rem, 7vw, 6rem); font-weight: 750; margin-bottom: 1rem; }
.notfound p:not(.eyebrow) { color: var(--muted); }

/* ── Motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .card:focus-within, .contact a:hover, .button:hover { transform: none; }
}
