/* ============================================================
   Jacob Laird — Design tokens & global styles
   ============================================================ */

@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SF-Pro-Display-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SF-Pro-Display-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SF-Pro-Display-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SF-Pro-Display-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SF-Pro-Display-Heavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ---- Color ---- */
  --color-bg: #ffffff;
  --color-bg-band: #f8f8f8;
  --color-surface: #ffffff;
  --color-ink: #1a1a1a;
  --color-ink-soft: #3a3a3c;
  --color-body: #6e6e73;
  --color-body-soft: #86868b;
  --color-border: rgba(20, 20, 20, 0.07);
  --color-border-strong: rgba(20, 20, 20, 0.13);
  --color-dark-surface: #141414;
  --color-dark-ink: #f5f5f7;
  --color-dark-body: #a1a1a6;

  --color-placeholder-1: #ececec;
  --color-placeholder-2: #e0e0e0;
  --color-placeholder-border: rgba(20, 20, 20, 0.07);
  --color-placeholder-label: #9a9a9e;

  --accent-blue: #0a7cff;
  --accent-green: #2fbf5f;
  --accent-yellow: #ffc93c;
  --accent-pink: #ff4d7d;
  --accent-orange: #ff8a3d;

  --color-focus: #0a7cff;

  /* ---- Type ---- */
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "SF Pro Text", system-ui, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "SF Pro Display", system-ui, sans-serif;

  --fs-hero: clamp(2rem, 1rem + 3vw, 3.25rem);
  --fs-h1: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.8125rem;

  --lh-tight: 1.08;
  --lh-snug: 1.25;
  --lh-body: 1.6;

  --ls-tight: -0.03em;
  --ls-heading: -0.02em;
  --ls-eyebrow: 0.1em;

  /* ---- Space ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: clamp(2.5rem, 2rem + 2vw, 4rem);
  --space-2xl: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --space-3xl: clamp(4.5rem, 3rem + 6vw, 8rem);

  --gutter: max(16px, env(safe-area-inset-left, 0px) + 16px);
  --gutter-right: max(16px, env(safe-area-inset-right, 0px) + 16px);
  --content-width: 1120px;
  --content-narrow: 720px;

  /* ---- Radius & shadow ---- */
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 20px 45px -24px rgba(20, 20, 20, 0.18);
  --shadow-float: 0 30px 60px -28px rgba(20, 20, 20, 0.22);
  --shadow-sticker: 0 10px 24px -10px rgba(20, 20, 20, 0.25);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.5s;
  --dur-slow: 0.9s;
}

/* ============================================================
   Reset
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

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

::selection {
  background: var(--accent-blue);
  color: #fff;
}

/* ============================================================
   Layout helpers
   ============================================================ */

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

.wrap--narrow {
  max-width: var(--content-narrow);
}

.wrap--full {
  max-width: 1600px;
}

.band {
  background: var(--color-bg-band);
}

.band--dark {
  background: var(--color-dark-surface);
  color: var(--color-dark-ink);
}

section {
  padding-block: var(--space-3xl);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
}

.section-head h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
}

.section-head p {
  margin-top: var(--space-sm);
  color: var(--color-body);
  font-size: var(--fs-lead);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-text);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-body-soft);
  margin-bottom: var(--space-xs);
}

.center {
  text-align: center;
}

.text-body {
  color: var(--color-body);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease-out),
      transform var(--dur-slow) var(--ease-out);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Buttons & links
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.7em 1.4em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--color-ink);
  color: #fff;
}

.btn--primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sticker);
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
}

.btn--ghost:hover {
  background: var(--color-bg-band);
  border-color: var(--color-ink);
}

.btn--on-dark {
  background: #fff;
  color: var(--color-dark-surface);
}

.btn--on-dark:hover {
  background: var(--color-dark-ink);
  transform: translateY(-1px);
}

.btn--outline-on-dark {
  background: transparent;
  color: var(--color-dark-ink);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn--outline-on-dark:hover {
  background: rgba(255, 255, 255, 0.08);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: 500;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border-strong);
  padding-bottom: 0.1em;
  transition: border-color var(--dur-fast) var(--ease-out),
    gap var(--dur-fast) var(--ease-out);
}

.link-arrow:hover {
  border-color: var(--color-ink);
  gap: 0.55em;
}

.link-underline {
  color: var(--accent-blue);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(10, 124, 255, 0.38);
  transition: text-decoration-color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.link-underline:hover {
  text-decoration-color: currentColor;
}

.link-underline--strong {
  font-weight: 500;
}

/* ============================================================
   Placeholder media block
   ============================================================ */

.placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    155deg,
    var(--color-placeholder-1),
    var(--color-placeholder-2)
  );
  overflow: hidden;
}

.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--color-placeholder-border);
}

.placeholder__label {
  position: relative;
  margin: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-placeholder-label);
  letter-spacing: 0.01em;
}

.cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ============================================================
   Nav
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: var(--ls-heading);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-ink-soft);
}

.nav__links a {
  padding: 0.4em 0.1em;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--color-ink);
}

.nav__links a[aria-current="page"] {
  font-weight: 600;
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
}

.nav__toggle:hover {
  background: var(--color-bg-band);
}

.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.nav__toggle-icon {
  position: relative;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav__toggle-icon::before {
  top: -6px;
}

.nav__toggle-icon::after {
  top: 6px;
}

.site-header.is-open .nav__toggle-icon {
  background: transparent;
}

.site-header.is-open .nav__toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-open .nav__toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav__mobile {
  display: none;
}

@media (max-width: 767px) {
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--gutter) var(--space-lg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-out),
      transform var(--dur-fast) var(--ease-out);
  }

  .nav__links a {
    padding: 0.9em 0.1em;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.05rem;
  }

  .site-header.is-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav__toggle {
    display: inline-flex;
  }
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--color-bg-band);
}

.footer-cta {
  text-align: center;
  padding-block: var(--space-2xl) var(--space-xl);
}

.footer-cta__icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.footer-cta p {
  font-size: var(--fs-lead);
  font-family: var(--font-text);
  font-weight: 500;
  color: var(--color-ink-soft);
  max-width: 38ch;
  margin-inline: auto;
}

.footer-cta__links {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.footer-bar {
  padding-block: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-body);
  flex-wrap: wrap;
}

.footer-bar__social {
  display: flex;
  gap: var(--space-lg);
}

.footer-bar__social a:hover {
  color: var(--color-ink);
}

/* ============================================================
   Photo collage & stickers (shared: home, education)
   ============================================================ */

.collage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.1;
}

.collage__photo {
  position: absolute;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  border: 4px solid var(--color-surface);
  overflow: hidden;
  background: var(--color-surface);
  transition: transform var(--dur-med) var(--ease-out);
}

.collage:hover .collage__photo {
  transform: translateY(-4px) rotate(var(--rot, 0deg)) !important;
}

.collage__photo .placeholder {
  border-radius: calc(var(--radius-lg) - 4px);
}

.sticker {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.5em 0.9em;
  box-shadow: var(--shadow-sticker);
  white-space: nowrap;
}

.sticker--dark {
  background: var(--color-ink);
  color: #fff;
}

.sticker--blue {
  background: var(--accent-blue);
  color: #fff;
}

.sticker-chip {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: var(--shadow-sticker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.sticker-chip--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.sticker-chip--blue {
  background: var(--accent-blue);
}
.sticker-chip--green {
  background: var(--accent-green);
}
.sticker-chip--yellow {
  background: var(--accent-yellow);
}
.sticker-chip--pink {
  background: var(--accent-pink);
}
.sticker-chip--orange {
  background: var(--accent-orange);
}

.sticker-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  text-align: center;
  line-height: 1.15;
}

.sticker-badge__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sticker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.speech-bubble {
  position: absolute;
  z-index: 4;
  background: var(--color-surface);
  color: var(--color-ink);
  border-radius: var(--radius-md);
  padding: 0.7em 1.1em;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-sticker);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 24px;
  width: 14px;
  height: 14px;
  background: var(--color-surface);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  border-radius: 0 0 0 4px;
}

/* ============================================================
   Responsive base
   ============================================================ */

@media (max-width: 767px) {
  :root {
    --content-width: 100%;
  }
}
