:root {
  --bg: #08111f;
  --bg-soft: #0f1a2e;
  --panel: rgba(10, 20, 36, 0.72);
  --panel-strong: rgba(9, 17, 31, 0.92);
  --text: #edf3ff;
  --muted: #a5b4d2;
  --line: rgba(173, 195, 235, 0.16);
  --accent: #7de2d1;
  --accent-strong: #a4ff8b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --max-width: 1180px;
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(125, 226, 209, 0.2), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(164, 255, 139, 0.14), transparent 18%),
    linear-gradient(180deg, #08111f 0%, #091523 48%, #07111b 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 90%);
}

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

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

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  backdrop-filter: blur(16px);
}

.brand {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(7, 13, 23, 0.7);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.menu-toggle,
.menu-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 13, 23, 0.78);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.main-nav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.main-nav a.is-active {
  color: var(--text);
  border-color: rgba(125, 226, 209, 0.32);
  background: rgba(125, 226, 209, 0.1);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(4, 10, 18, 0.58);
  backdrop-filter: blur(10px);
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 25;
  width: min(84vw, 340px);
  height: 100vh;
  padding: 18px;
  background: rgba(8, 17, 31, 0.96);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.32);
  transform: translateX(100%);
  transition: transform 240ms ease;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-header span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
}

.menu-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 1.8rem;
  line-height: 1;
}

.mobile-nav-links {
  display: grid;
  gap: 10px;
}

.mobile-nav-links a {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.05rem;
  font-weight: 700;
}

.section {
  padding: 72px 0;
  position: relative;
}

.scroll-rail {
  position: fixed;
  top: 110px;
  left: max(10px, calc(50% - var(--max-width) / 2 - 34px));
  width: 22px;
  height: calc(100vh - 160px);
  z-index: 12;
  pointer-events: none;
}

.scroll-rail-line,
.scroll-rail-progress {
  position: absolute;
  top: 0;
  left: 10px;
  width: 2px;
  height: 100%;
  border-radius: 999px;
}

.scroll-rail-line {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.22) 0 12px,
      transparent 12px 24px
    );
}

.scroll-rail-progress {
  height: var(--scroll-progress, 0%);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 0 28px rgba(125, 226, 209, 0.45);
}

.scroll-rail-orb {
  position: absolute;
  left: 1px;
  top: calc(var(--scroll-progress, 0%) - 11px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--accent) 38%, #4cb8b1 100%);
  box-shadow:
    0 0 0 8px rgba(125, 226, 209, 0.08),
    0 0 30px rgba(125, 226, 209, 0.45);
  transition: top 140ms linear;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: 40px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 7vw, 6.8rem);
  line-height: 0.94;
}

h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.1;
}

.lead,
.section-heading p,
.manifesto-grid p,
.project-card p,
.timeline p,
.skill-column li,
.method-grid p,
.contact p,
.site-footer p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.lead {
  max-width: 62ch;
  margin: 24px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #061018;
  border: none;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.hero-card,
.project-card,
.skill-column,
.contact-panel,
.method-grid article,
.timeline article,
.manifesto-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
}

.card-label,
.project-type,
.timeline-role,
.timeline-meta,
.project-note,
.method-grid span {
  display: block;
}

.card-label,
.project-type,
.project-note,
.timeline-meta {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-value {
  margin: 8px 0 22px;
  font-size: 1.12rem;
  line-height: 1.5;
  font-weight: 700;
}

.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.section-heading p {
  max-width: 70ch;
  margin: 0;
}

.manifesto-grid,
.skills-grid,
.method-grid {
  display: grid;
  gap: 20px;
}

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

.manifesto-grid article,
.skill-column,
.method-grid article,
.timeline article {
  padding: 26px;
}

.manifesto-grid h3,
.skill-column h3,
.project-card h3,
.method-grid h3 {
  margin-bottom: 14px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  padding: 28px;
}

.project-visual {
  margin: -8px -8px 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.project-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 260ms ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.02);
}

[data-reveal] {
  opacity: 0;
  filter: blur(10px);
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    filter 700ms ease;
  will-change: opacity, transform, filter;
}

[data-reveal="fade-up"] {
  transform: translate3d(0, 34px, 0);
}

[data-reveal="fade-left"] {
  transform: translate3d(-42px, 0, 0);
}

[data-reveal="fade-right"] {
  transform: translate3d(42px, 0, 0);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.section::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(125, 226, 209, 0.16);
  border: 1px solid rgba(125, 226, 209, 0.36);
  box-shadow: 0 0 0 8px rgba(125, 226, 209, 0.03);
}

.project-card a {
  margin-top: auto;
  font-weight: 800;
  color: var(--text);
}

.project-card a::after {
  content: " ↗";
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-role {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
}

.timeline-meta {
  margin-bottom: 12px;
}

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

.skill-column ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.skill-column li + li {
  margin-top: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.chips span {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  line-height: 1.45;
}

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

.method-grid span {
  margin-bottom: 18px;
}

.contact-panel {
  display: grid;
  gap: 12px;
  padding: 28px;
}

.contact-panel a {
  width: fit-content;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 0 54px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero,
  .manifesto-grid,
  .projects-grid,
  .skills-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    max-width: 11ch;
  }

  .scroll-rail {
    left: 10px;
  }

  .section::before {
    left: -10px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-header {
    position: sticky;
    top: 0;
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-right: -12px;
    padding: 14px 12px;
    align-items: center;
    transition: transform 220ms ease, opacity 220ms ease;
  }

  .site-header.is-hidden {
    transform: translateY(calc(-100% - 12px));
    opacity: 0.12;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .section {
    padding: 56px 0;
  }

  .scroll-rail {
    display: none;
  }

  .section::before {
    display: none;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .button,
  .contact-panel a {
    width: 100%;
  }
}
