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

:root {
  --accent: #1a3fff;
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.65);
  --surface: #0e0e14;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-family: system-ui, -apple-system, sans-serif;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav a.brand {
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
}

.nav ul {
  display: none;
  gap: 1.5rem;
  list-style: none;
}

.nav ul a {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav ul a:hover {
  color: var(--text);
}

@media (min-width: 768px) {
  .nav ul {
    display: flex;
  }
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.8s ease;
}

#loading.fade-out {
  opacity: 0;
}

#loading-brand {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
}

#loading-percent {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

#loading-bar-track {
  width: 200px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

#loading-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

#hero {
  position: relative;
  height: 600vh;
  background: var(--bg);
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#brand {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  z-index: 10;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: #fff;
  font-weight: 300;
  opacity: 0.9;
}

#copy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  transition: opacity 0.3s ease;
  pointer-events: none;
  width: min(90%, 58rem);
}

#copy h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  line-height: 1.15;
}

#copy p {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
}

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  pointer-events: auto;
}

#scroll-indicator {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.4s ease;
}

#scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

#scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.5);
}

#scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

#progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 10;
}

#progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.section {
  padding: 7rem 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
}

.section-eyebrow {
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: #4f6bff;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-top: 0.75rem;
  color: var(--text);
}

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.75rem;
}

.card h3 {
  color: var(--text);
  font-size: 1.1rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

#works {
  background: #07070b;
}

.timeline {
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 3rem;
  padding-left: 1.5rem;
  list-style: none;
}

.timeline li {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.96rem;
  top: 0.4rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 9999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px #000;
}

.timeline .period {
  font-family: ui-monospace, monospace;
  color: #4f6bff;
  font-size: 0.85rem;
}

.timeline h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.timeline p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.7;
}

.note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.about-list {
  list-style: none;
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
}

.about-list li {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  gap: 0.75rem;
}

.about-list li::before {
  content: "▹";
  color: var(--accent);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.stack span {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

#contact {
  background: #07070b;
}

.form {
  max-width: 40rem;
  margin-top: 2.5rem;
  display: grid;
  gap: 1.25rem;
}

.form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form input,
.form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form button {
  border: none;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.form button:disabled {
  opacity: 0.5;
}

.form .hp {
  display: none;
}

.form-status {
  font-size: 0.9rem;
}

.contact-meta {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-meta a {
  color: #4f6bff;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  #brand {
    left: 1.25rem;
  }

  #copy h1 {
    font-size: 2rem;
  }

  .section {
    padding: 5rem 1rem;
  }
}
