:root {
  --bg: #f4f1e9;
  --fg: #0b1220;
  --muted: rgba(11, 18, 32, 0.68);
  --line: rgba(11, 18, 32, 0.18);
  --accent: #ff715b;
  --panel-bg: #0b1220;
  --panel-fg: #f4f1e9;
  --card-fg: #0b1220;
  --grain-opacity: 0.035;
  --mark-tint: rgba(255, 113, 91, 0.08);
  --gif-blend: multiply;
  --gif-invert: 0;

  --c-sky: #8dc8ff;
  --c-blush: #ffb3c6;
  --c-sun: #ffd166;
  --c-mint: #a8e6cf;
  --c-aqua: #9fdfe3;

  --sans: "DM Sans", Arial, sans-serif;
  --display: "Manrope", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0f1a;
  --fg: #eceff6;
  --muted: rgba(236, 239, 246, 0.66);
  --line: rgba(236, 239, 246, 0.17);
  --accent: #ff7d67;
  --panel-bg: #111a2b;
  --panel-fg: #eceff6;
  --card-fg: #f2f5fb;
  --grain-opacity: 0.05;
  --mark-tint: rgba(255, 125, 103, 0.09);
  --gif-blend: screen;
  --gif-invert: 1;

  --c-sky: #1d4666;
  --c-blush: #6d2b40;
  --c-sun: #61491b;
  --c-mint: #1d4f43;
  --c-aqua: #1b4a52;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 300ms ease, color 300ms ease;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.art-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.grain {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

/* header */

.site-header {
  height: 92px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
}

.brand-accent {
  color: var(--accent);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease;
}

.theme-toggle:hover {
  border-color: currentColor;
  transform: rotate(-12deg);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* hero */

main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

main::before {
  content: "";
  position: absolute;
  width: 44vw;
  height: 44vw;
  top: -23vw;
  left: -18vw;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero {
  width: min(100% - 48px, 1280px);
  min-height: 640px;
  margin: 0 auto;
  padding: 70px 0 90px;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(45px, 8vw, 120px);
}

.portrait {
  --portrait-color: var(--c-sky);
  width: min(100%, 480px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  position: relative;
  color: var(--card-fg);
  background: var(--portrait-color);
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: float 7s ease-in-out infinite;
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.portrait::before {
  inset: -7%;
  border: 1px solid var(--line);
}

.portrait::after {
  width: 22px;
  height: 22px;
  top: -4%;
  right: 17%;
  background: var(--accent);
}

.portrait img {
  width: auto;
  height: 62%;
  mix-blend-mode: var(--gif-blend);
  filter: invert(var(--gif-invert));
}

.portrait svg {
  width: auto;
  height: 66%;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

h1,
h2 {
  font-family: var(--display);
}

h1 {
  margin: 0;
  font-size: clamp(72px, 10vw, 150px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.lede {
  max-width: 680px;
  margin: 34px 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.5;
}

.facts {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.facts li {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* links */

.links {
  width: min(100% - 48px, 1280px);
  margin: 0 auto 130px;
}

.links h2 {
  margin: 0 0 40px;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.link-card {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.link-card:nth-child(even) {
  border-right: 0;
}

.link-card:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.link-card span {
  display: grid;
  gap: 8px;
}

.link-card strong {
  font-family: var(--display);
  font-size: clamp(21px, 2vw, 30px);
  letter-spacing: -0.04em;
}

.link-card small {
  color: var(--muted);
  font-size: 14px;
}

.link-card b {
  font-size: 25px;
  transition: transform 180ms ease;
}

.link-card:hover b {
  transform: translate(4px, -4px);
}

/* footer */

footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px clamp(24px, 5vw, 76px);
  color: var(--panel-fg);
  background: var(--panel-bg);
  font-size: 12px;
}

footer p {
  margin: 0;
}

/* motion */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    padding: 50px 0 70px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portrait {
    width: min(76vw, 360px);
  }

  .lede {
    margin-inline: auto;
  }

  .facts {
    justify-content: center;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 76px;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
