/* ============================================================
   Wyatt Kirk personal site
   WK brand system: off-white base, blue structure, Night Rise
   hero, accents used sparingly. Type is Inter 400/700/900.
   ============================================================ */

:root {
  --off-white: #FDFBF7;
  --frost: #DDEEFF;
  --mist: #B3D4FF;
  --primary-blue: #89BFFF;
  --blue: #5A9FEF;
  --deep-blue: #2A74CC;
  --navy: #1A3A5C;
  --mint: #89FFD4;
  --honey: #FFD489;
  --ember: #E05C2A;
  --voltage: #8A4FFF;
  --ink: #111214;

  --grad-night-rise: radial-gradient(140% 150% at 50% -20%, #111214 0%, #1A3A5C 58%, #89BFFF 120%);
  --grad-blue-voltage: linear-gradient(90deg, #89BFFF, #8A4FFF);
  --grad-sky-depth: linear-gradient(160deg, #DDEEFF, #89BFFF 55%, #2A74CC);
  --grad-navy-ink: linear-gradient(170deg, #1A3A5C 0%, #111214 90%);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1120px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.narrow { max-width: 840px; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--off-white);
  padding: 0.6rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--deep-blue);
  outline-offset: 2px;
}
.section-dark :focus-visible,
.hero :focus-visible,
.site-header :focus-visible {
  outline-color: var(--mist);
}

/* ---------- Type ---------- */
.section-title {
  font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.section-label {
  margin-bottom: 0.8rem;
  color: var(--deep-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Small gradient rule under section titles. Accent use only. */
.rule {
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-blue-voltage);
  margin: 0.9rem 0 1.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--ink);
}
.btn-primary:hover { background: var(--blue); }

.btn-ghost {
  background: transparent;
  color: var(--off-white);
  border-color: var(--mist);
}
.btn-ghost:hover {
  background: var(--frost);
  border-color: var(--frost);
  color: var(--navy);
}

.btn-honey {
  background: var(--honey);
  color: var(--ink);
}
.btn-honey:hover { background: #FFC966; }

.btn-lg {
  font-size: 1.02rem;
  padding: 0.9rem 1.7rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 29, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: rgba(179, 212, 255, 0.18);
  box-shadow: 0 4px 24px rgba(17, 18, 20, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--off-white);
}

.logo-crop {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 24px;
  overflow: hidden;
}

.logo-crop img {
  position: absolute;
  width: 62px;
  max-width: none;
  height: 62px;
  left: -8px;
  top: -20px;
}

.wordmark-copy {
  display: grid;
  gap: 0;
  white-space: nowrap;
}

.wordmark-copy strong {
  color: var(--off-white);
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.wordmark-copy small {
  color: var(--mist);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 2rem;
}
.site-nav a {
  color: var(--mist);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--off-white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--off-white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(810px, calc(100svh + 20px));
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(137, 191, 255, 0.2), transparent 25%),
    radial-gradient(circle at 10% 100%, rgba(42, 116, 204, 0.42), transparent 38%),
    linear-gradient(125deg, #0A1018 0%, #10263A 55%, #183F64 100%);
  color: var(--off-white);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(4rem, 8vw, 6.5rem);
  /* Pull the hero up behind the translucent header. */
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(clamp(4rem, 8vw, 7rem) + var(--header-h));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(179, 212, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(179, 212, 255, 0.15) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 24%, black 75%, transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.hero-kicker {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 1.4rem;
}
.hero-kicker span { color: var(--honey); margin-inline: 0.45rem; }

.hero-title {
  font-weight: 900;
  font-size: clamp(3.5rem, 7.4vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
  margin-bottom: 1.8rem;
}
.hero-title span { color: var(--mist); }

.hero-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: var(--frost);
  max-width: 45ch;
  margin-bottom: 2.2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 0.6rem;
  color: var(--off-white);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration-color: rgba(221, 238, 255, 0.45);
  text-underline-offset: 5px;
}
.text-link:hover { color: var(--primary-blue); }

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  margin-top: 2.1rem;
  list-style: none;
  color: var(--mist);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-notes li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.hero-notes li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--honey);
}

.hero-visual {
  position: relative;
  width: min(100%, 430px);
  margin-left: auto;
}

.portrait-card {
  position: relative;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 28px;
  background: rgba(253, 251, 247, 0.94);
  color: var(--ink);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}

.portrait-topline,
.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.portrait-topline {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 0.4rem 0.7rem;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.portrait-brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.logo-crop-card { width: 37px; height: 20px; }
.logo-crop-card img { width: 50px; height: 50px; left: -6.5px; top: -16px; }

.portrait-window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 4.65;
  border-radius: 20px;
  background: var(--primary-blue);
}
.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
}
.headshot-fallback {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--navy);
  color: var(--mist);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 4.5rem);
  align-items: center;
  justify-content: center;
}
.portrait-window.headshot-missing .headshot { visibility: hidden; }
.portrait-window.headshot-missing .headshot-fallback { display: flex; }

.portrait-caption {
  padding: 0.9rem 0.45rem 0.25rem;
  font-size: 0.72rem;
  color: var(--deep-blue);
}
.portrait-caption strong { color: var(--ink); font-size: 0.82rem; }

.view-badge {
  position: absolute;
  left: -3.6rem;
  bottom: 4.8rem;
  display: grid;
  min-width: 145px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(179, 212, 255, 0.35);
  border-radius: 16px;
  background: rgba(10, 16, 24, 0.9);
  backdrop-filter: blur(10px);
  color: var(--mist);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
}
.view-badge strong {
  color: var(--off-white);
  font-size: 1.5rem;
  line-height: 1;
}
.view-badge span {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.section-frost {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #EAF4FF 0%, var(--frost) 100%);
}

.section-dark {
  background: var(--grad-navy-ink);
  color: var(--frost);
}
.section-dark .section-title { color: var(--off-white); }

/* ---------- About + stats ---------- */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: stretch;
}

.about-mark {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  overflow: hidden;
  padding: 1.8rem;
  border: 1px solid rgba(42, 116, 204, 0.16);
  border-radius: 24px;
  background-color: var(--frost);
  background-image:
    linear-gradient(color-mix(in srgb, var(--deep-blue) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--deep-blue) 8%, transparent) 1px, transparent 1px),
    linear-gradient(145deg, #FFFFFF, transparent 70%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
.about-mark::before,
.about-mark::after {
  position: absolute;
  content: "";
}
.about-mark::before {
  top: 1.3rem;
  right: 1.3rem;
  width: 64px;
  height: 64px;
  border-top: 2px solid var(--deep-blue);
  border-right: 2px solid var(--deep-blue);
}
.about-mark::after {
  right: 1.3rem;
  bottom: 1.3rem;
  width: 14px;
  height: 14px;
  background: var(--honey);
}
.about-mark span {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.about-body {
  color: #3B4048;
  max-width: 62ch;
  font-size: 1.1rem;
}
.about-body p + p { margin-top: 1rem; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-top: 2.5rem;
}

.stat-card {
  background: #FFFFFF;
  border: 1.5px solid var(--frost);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-card dd {
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--deep-blue);
  order: -1;
}
.stat-card dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Recent uploads ---------- */
.videos-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.videos-intro {
  max-width: 34ch;
  margin-bottom: 1.7rem;
  color: var(--navy);
}

.video-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid rgba(42, 116, 204, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}
.video-card:hover {
  background: var(--off-white);
  border-color: var(--deep-blue);
}

.video-thumb-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  width: 100%;
  background: var(--navy);
}

.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.6);
}

.video-meta {
  padding: 0.95rem 1.1rem 1.1rem;
}
.video-meta h3 {
  font-size: 0.98rem;
  line-height: 1.4;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta time {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--deep-blue);
}

.videos-more {
  margin-top: 1.8rem;
}
.videos-more a {
  color: var(--navy);
  font-weight: 700;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.videos-more a:hover { color: var(--ink); }

/* ---------- Ethics ---------- */
.ethics-lead {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: var(--navy);
  max-width: 32ch;
  margin-bottom: 2rem;
}

.ethics-block {
  border-left: 3px solid var(--mist);
  padding-left: 1.3rem;
  margin-bottom: 1.8rem;
  max-width: 66ch;
}
.ethics-block h3 {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--deep-blue);
  margin-bottom: 0.45rem;
}
.ethics-block p { color: #3B4048; }

/* ---------- Work with me ---------- */
.work-band { text-align: center; }
.work-band .section-title { margin-bottom: 1rem; }

.work-lede {
  max-width: 54ch;
  margin: 0 auto 2rem;
  color: var(--mist);
}

.work-cta { margin-bottom: 2.2rem; }

.social-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 2rem;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--frost);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.social-row a:hover { color: var(--primary-blue); }
.social-row .icon { color: var(--primary-blue); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--mist);
  padding: 1.8rem 0;
  font-size: 0.9rem;
}
.footer-inner { text-align: center; }
.footer-inner a {
  color: var(--off-white);
  font-weight: 700;
  text-underline-offset: 3px;
}
.footer-inner a:hover { color: var(--primary-blue); }

/* ---------- Reveal animation ----------
   Hidden state is gated behind html.js so the page stays fully
   visible when JavaScript is unavailable. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .video-card { transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr); gap: 3rem; }
  .view-badge { left: -2rem; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .hero { min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { width: min(100%, 390px); margin: 0 auto; }
  .about-layout { grid-template-columns: 1fr; }
  .about-mark { min-height: 230px; }
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: 4.5rem;
    background:
      radial-gradient(circle at 100% 28%, rgba(137, 191, 255, 0.2), transparent 30%),
      linear-gradient(155deg, #0A1018 0%, #12304A 100%);
  }
  .hero-title { font-size: clamp(3.2rem, 16vw, 4.7rem); }
  .hero-lede { max-width: 34ch; }
  .hero-notes { gap: 0.65rem 1rem; }
  .view-badge { left: auto; right: -0.6rem; bottom: 3.5rem; }
  .videos-header { display: block; }
  .videos-intro { margin: -0.5rem 0 1.8rem; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(179, 212, 255, 0.18);
    box-shadow: 0 24px 40px rgba(17, 18, 20, 0.5);
    padding: 0.5rem 0 0.8rem;
    display: none;
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a {
    padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
    font-size: 1rem;
  }

  .nav-toggle { display: flex; }

  .video-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .stat-card { padding: 1.05rem 1rem; }
}

@media (max-width: 480px) {
  .wordmark-copy small { display: none; }
  .portrait-caption { align-items: flex-start; flex-direction: column; gap: 0.15rem; }
  .view-badge { min-width: 126px; padding: 0.85rem 1rem; }
  .view-badge strong { font-size: 1.3rem; }
  .about-mark { min-height: 200px; }

  .work-cta .btn {
    font-size: 0.88rem;
    padding: 0.8rem 1rem;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .stats-strip { grid-template-columns: 1fr; }
}
