:root {
  --ink: #1c2a28;
  --ink-soft: #3d4f4b;
  --mist: #e7efe9;
  --sage: #9fb8a8;
  --teal: #2f6b5c;
  --teal-deep: #1e4a3f;
  --foam: #f3f7f4;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --radius: 2px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  background:
    radial-gradient(120% 80% at 10% -10%, #d8e8df 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 0%, #c5ddd8 0%, transparent 50%),
    linear-gradient(165deg, var(--foam) 0%, var(--mist) 48%, #dce8e2 100%);
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.35;
  mix-blend-mode: multiply;
  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");
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--foam) 72%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--foam) 88%, transparent);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--teal-deep);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding:
    clamp(6rem, 12vh, 8rem)
    clamp(1.25rem, 4vw, 3rem)
    clamp(2.5rem, 6vh, 4rem);
}

.hero-copy {
  max-width: 34rem;
  padding-bottom: clamp(1rem, 4vh, 3rem);
}

.brand {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 12vw, 7.5rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--teal-deep);
  opacity: 0;
  transform: translateY(1.2rem);
  animation: rise 1s var(--ease) 0.1s forwards;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(1rem);
  animation: rise 0.9s var(--ease) 0.28s forwards;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 32ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(0.8rem);
  animation: rise 0.9s var(--ease) 0.42s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(0.8rem);
  animation: rise 0.9s var(--ease) 0.55s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal-deep);
  color: #f5faf7;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--teal);
}

.btn-ghost {
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink);
  background: color-mix(in srgb, white 35%, transparent);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.hero-visual {
  position: relative;
  min-height: min(62vh, 36rem);
  opacity: 0;
  animation: fade 1.2s var(--ease) 0.2s forwards;
}

.hero-panel {
  position: absolute;
  inset: 8% 6% 0 12%;
  border-radius: 0;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--sage) 55%, white) 0%,
      #6f9a8c 38%,
      #2f5c52 100%
    ),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 45%);
  background-blend-mode: soft-light, normal;
  box-shadow: 0 30px 60px rgba(28, 42, 40, 0.18);
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(20, 40, 36, 0.25) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.04) 14px 15px
    );
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: drift 10s ease-in-out infinite alternate;
}

.hero-orb-a {
  width: min(42vw, 18rem);
  height: min(42vw, 18rem);
  top: -4%;
  left: -6%;
  background: radial-gradient(circle, #b7d4c8 0%, transparent 70%);
}

.hero-orb-b {
  width: min(36vw, 14rem);
  height: min(36vw, 14rem);
  right: -2%;
  bottom: 8%;
  background: radial-gradient(circle, #8eb9ae 0%, transparent 68%);
  animation-delay: -3s;
}

.section {
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 52rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section p,
.section-lede {
  margin: 0;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.about {
  border-top: 1px solid var(--line);
}

.projects {
  max-width: none;
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.projects .section-lede {
  margin-bottom: 2rem;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 48rem;
  border-top: 1px solid var(--line);
}

.project-list li {
  border-bottom: 1px solid var(--line);
}

.project-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0.15rem;
  text-decoration: none;
  transition: padding-left 0.3s var(--ease), color 0.3s var(--ease);
}

.project-list a:hover,
.project-list a:focus-visible {
  padding-left: 0.55rem;
  color: var(--teal-deep);
}

.project-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 500;
}

.project-meta {
  flex-shrink: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.contact .btn {
  margin-top: 1.5rem;
}

.site-footer {
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

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

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(1.2rem, -1rem) scale(1.06);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding-top: 5.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: 42vh;
    margin: 0 -0.25rem;
  }

  .hero-panel {
    inset: 4% 0 0;
  }

  .brand {
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .nav {
    gap: 0.9rem;
  }

  .nav a {
    font-size: 0.85rem;
  }

  .project-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

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

  .brand,
  .hero h1,
  .lede,
  .cta-row,
  .hero-visual,
  .hero-orb,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
