:root {
  --ink: #082f65;
  --muted: #315f91;
  --accent: #0563b8;
  --surface: rgb(255 255 255 / 68%);
  --line: rgb(14 116 214 / 16%);
  --pointer-x: 50vw;
  --pointer-y: 30vh;
  --accent-bright: #0a8bff;
  --works-bg: #0b2b52;
  --works-ink: #eef6ff;
  --works-muted: #b7d4ee;
  --works-line: rgb(171 210 255 / 24%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(650px circle at var(--pointer-x) var(--pointer-y), rgb(255 255 255 / 70%), transparent 55%),
    radial-gradient(circle at 85% 8%, rgb(125 211 252 / 65%), transparent 32rem),
    linear-gradient(145deg, #eaf8ff 0%, #bdeaff 46%, #e4f6ff 100%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(8 125 232 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(8 125 232 / 4%) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

main,
footer {
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: 92svh;
  align-content: center;
  padding-block: 5rem;
}

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

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-size: clamp(3.25rem, 14vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-intro {
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.45rem);
}

.scroll-cue {
  width: fit-content;
  margin-top: 2.5rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

section {
  margin-bottom: 6rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: 0 1.5rem 4rem rgb(20 104 180 / 10%);
  backdrop-filter: blur(18px);
}

section > p:not(.eyebrow) {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.learning-grid,
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.card,
.project-grid article {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 60%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover,
.project-grid article:hover {
  transform: translateY(-5px);
  border-color: rgb(8 125 232 / 40%);
  box-shadow: 0 1rem 2.5rem rgb(8 85 160 / 12%);
}

.card p,
.project-grid article p {
  color: var(--muted);
}

.project-grid ul,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.project-grid li,
.project-grid article > span {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgb(8 125 232 / 9%);
  color: var(--muted);
  font-size: 0.78rem;
}

a {
  color: #046ac8;
  text-underline-offset: 0.22em;
}

.project-grid article > a {
  display: inline-flex;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid #006ed4;
  outline-offset: 4px;
}

.connect {
  text-align: center;
}

.connect > p,
.contact-links {
  justify-content: center;
  margin-inline: auto;
}

footer {
  padding-block: 0 3rem;
  color: var(--muted);
  text-align: center;
}

.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-enabled .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 48rem) {
  main,
  footer {
    width: min(100% - 5rem, 70rem);
  }

  .learning-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (pointer: coarse), (hover: none) {
  body {
    background:
      radial-gradient(circle at 75% 12%, rgb(255 255 255 / 65%), transparent 28rem),
      linear-gradient(145deg, #eaf8ff 0%, #bdeaff 46%, #e4f6ff 100%);
  }

  .card:hover,
  .project-grid article:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

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

/* ==========================================================================
   Editorial upgrade — blue take on the reference site's layout & craft.
   Added after the core tokens so these rules win on equal specificity.
   ========================================================================== */

/* Fixed top navigation with a status dot */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgb(234 245 255 / 45%);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  margin-inline: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--accent);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.status-dot::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgb(34 197 94 / 55%);
  content: "";
  animation: status-pulse 2.2s ease-out infinite;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgb(34 197 94 / 55%); }
  70% { box-shadow: 0 0 0 0.55rem rgb(34 197 94 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0%); }
}

/* Hero — asymmetric two-column (copy + scene), like the reference */
.hero {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  max-width: 42rem;
}

.hero-tagline {
  max-width: 16ch;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero-tagline .accent {
  color: var(--accent-bright);
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero-scene {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgb(158 204 255 / 90%) 0%, transparent 40%),
    radial-gradient(circle at 72% 74%, rgb(47 141 230 / 95%) 0%, transparent 52%),
    conic-gradient(from 215deg, #0a3f86, #1f6fd0, #32a0ff, #0a3f86);
  box-shadow:
    inset 0 0 6rem rgb(255 255 255 / 22%),
    0 2rem 5rem rgb(9 46 96 / 35%);
}

.hero-scene::after {
  position: absolute;
  inset: 9%;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  content: "";
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button--primary {
  background: var(--ink);
  color: white;
}

.button--primary:hover {
  background: #0a3f86;
  transform: translateY(-2px);
  box-shadow: 0 1rem 2rem rgb(8 60 130 / 25%);
}

.button--ghost {
  border-color: var(--line);
  background: rgb(255 255 255 / 40%);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Numbered eyebrow sections */
.eyebrow--num {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.eyebrow--num::before {
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  content: "";
}

/* Works — darker blue block that lifts the projects section out of the page */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.works {
  background: var(--works-bg);
  border-color: var(--works-line);
  color: var(--works-ink);
  box-shadow: 0 2rem 4.5rem rgb(4 20 46 / 35%);
}

.works .eyebrow {
  color: #6fb6ff;
}

.works > p:not(.eyebrow) {
  color: var(--works-muted);
}

.works h2 {
  color: var(--works-ink);
}

.works-count {
  margin: 0;
  color: #6fb6ff;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-align: right;
}

.works-count::after {
  display: block;
  margin-top: 0.4rem;
  color: var(--works-muted);
  content: "REPOSITORIES";
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

/* Browser-window strip on each project card (pure CSS, no DOM change) */
.project-grid article::before {
  display: block;
  height: 1.7rem;
  margin: -1.5rem -1.5rem 1.15rem;
  border-bottom: 1px solid var(--works-line);
  border-radius: 1.25rem 1.25rem 0 0;
  background:
    radial-gradient(circle 3.5px at 1.15rem 50%, #ff5f57 98%, transparent),
    radial-gradient(circle 3.5px at 2.2rem 50%, #febc2e 98%, transparent),
    radial-gradient(circle 3.5px at 3.25rem 50%, #28c840 98%, transparent),
    rgb(255 255 255 / 8%);
  content: "";
}

@media (min-width: 48rem) {
  .nav {
    width: min(100% - 5rem, 70rem);
  }
}

@media (max-width: 47.99rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-scene {
    width: min(82%, 20rem);
  }

  .works-count {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot::before {
    animation: none;
  }
}

/* ==========================================================================
   Interaction upgrade — hero scene spin, cursor ring, magnetic buttons.
   Reduced-motion / coarse-pointer guards are handled below & in JS.
   ========================================================================== */

.hero-scene::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgb(50 150 255 / 0%) 0deg,
    rgb(120 200 255 / 55%) 90deg,
    rgb(50 150 255 / 0%) 200deg,
    rgb(20 80 180 / 50%) 300deg,
    rgb(50 150 255 / 0%) 360deg
  );
  content: "";
  mix-blend-mode: screen;
  animation: scene-spin 28s linear infinite;
}

@keyframes scene-spin {
  to {
    transform: rotate(1turn);
  }
}

.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 1.5px solid rgb(6 99 184 / 45%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 40;
  will-change: transform;
}

.button {
  will-change: transform;
}

/* Goal statement — the section that replaced the learning cards */
.goal-statement {
  max-width: 40rem;
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Section subtitle — small label that introduces a card row */
.section-subtitle {
  margin: 2.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ==========================================================================
   Project carousel — one large showcase at a time, info left / mock right.
   ========================================================================== */

.carousel {
  margin-top: 2.5rem;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 1.75rem;
}

.carousel-track {
  display: flex;
  transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.project-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--works-line);
  border-radius: 1.75rem;
  background: rgb(255 255 255 / 6%);
}

.project-info {
  min-width: 0;
}

.project-index {
  margin: 0 0 1rem;
  color: #7fb7f5;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-title {
  margin: 0 0 1.1rem;
  color: var(--works-ink);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.project-desc {
  max-width: 42rem;
  margin: 0 0 1.5rem;
  color: var(--works-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.project-tags li {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--works-line);
  border-radius: 999px;
  color: var(--works-muted);
  font-size: 0.78rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-actions .button--primary {
  background: #2f7de6;
  color: #06254a;
}

.project-action.is-soon {
  display: inline-flex;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--works-line);
  border-radius: 999px;
  color: var(--works-muted);
  font-weight: 700;
}

/* Browser mock covering the right side */
.project-shot {
  min-width: 0;
}

.browser-mock {
  overflow: hidden;
  border-radius: 1.1rem;
  background: #eef5ff;
  box-shadow: 0 2rem 4rem rgb(4 16 34 / 45%);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #dfe9f6;
}

.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.browser-url {
  margin-left: 0.6rem;
  color: #5a7fae;
  font-size: 0.74rem;
  font-style: normal;
  letter-spacing: 0.02em;
}

.shot-page {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background:
    radial-gradient(circle at 80% 20%, rgb(255 255 255 / 35%), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--shot-accent) 88%, #ffffff), color-mix(in srgb, var(--shot-accent) 55%, #06213f));
  color: #f5faff;
}

.shot-kicker {
  margin: 0 0 1.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.85;
}

.shot-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.shot-sub {
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.shot-cta {
  display: inline-flex;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 20%);
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--works-muted);
}

.carousel-prev,
.carousel-next {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--works-line);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: var(--works-ink);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgb(255 255 255 / 14%);
  transform: translateY(-2px);
}

.carousel-count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.carousel-current {
  color: var(--works-ink);
  font-weight: 800;
}

@media (max-width: 47.99rem) {
  .project-slide {
    grid-template-columns: 1fr;
  }

  .project-shot {
    order: -1;
  }
}
