:root {
  color-scheme: light;
  --ink: #132029;
  --muted: #4a5d6a;
  --wash: #dce7ee;
  --wash-deep: #b7c9d6;
  --paper: #f4f8fb;
  --accent: #0f6e6a;
  --accent-deep: #0a4f4c;
  --flare: #e8a14a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Figtree, "Avenir Next", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 18%, rgba(15, 110, 106, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 88% 12%, rgba(232, 161, 74, 0.18), transparent 52%),
    radial-gradient(ellipse 60% 50% at 70% 90%, rgba(74, 93, 106, 0.16), transparent 55%),
    linear-gradient(165deg, #eaf2f7 0%, var(--wash) 42%, var(--wash-deep) 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(19, 32, 41, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 32, 41, 0.035) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: radial-gradient(ellipse 75% 65% at 40% 35%, #000 20%, transparent 75%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.stage {
  position: relative;
  z-index: 2;
  width: min(42rem, calc(100% - 2.5rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(4.5rem, 18vh, 9rem) 0 4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.brand {
  margin: 0 0 1.1rem;
  font-family: Syne, sans-serif;
  font-weight: 800;
  font-size: clamp(3.1rem, 9vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lede {
  margin: 0 0 2.75rem;
  max-width: 22rem;
  font-family: Figtree, sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 400;
  color: var(--muted);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.project {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(19, 32, 41, 0.14);
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.project:first-child {
  border-top: 1px solid rgba(19, 32, 41, 0.14);
}

.project-name {
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
  letter-spacing: -0.02em;
}

.project-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.project::after {
  content: "";
  grid-column: 1 / -1;
  width: 0;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, var(--accent), var(--flare));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.project:hover,
.project:focus-visible {
  color: var(--accent-deep);
  padding-left: 0.35rem;
  outline: none;
}

.project:hover::after,
.project:focus-visible::after {
  width: 100%;
}

.project:hover .project-meta,
.project:focus-visible .project-meta {
  color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(8deg) saturate(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .brand,
  .lede,
  .projects {
    animation: none;
  }

  .project,
  .project::after {
    transition: none;
  }
}

@media (max-width: 540px) {
  .project {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
