:root {
  --ink: #16211f;
  --ink-soft: #4c5d59;
  --paper: #f6f1e8;
  --paper-deep: #ebe0ce;
  --moss: #5f7d67;
  --lime: #c7f06f;
  --terracotta: #c66b4e;
  --cyan: #86d7cd;
  --line: rgba(22, 33, 31, 0.16);
  --glass: rgba(255, 252, 246, 0.68);
  --shadow: 0 24px 80px rgba(35, 50, 46, 0.16);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(199, 240, 111, 0.34), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(134, 215, 205, 0.32), transparent 30%),
    linear-gradient(135deg, #f8f3ea 0%, #eee3d0 48%, #f5efdf 100%);
  overflow-x: hidden;
}

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

::selection {
  color: var(--ink);
  background: var(--lime);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.42;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}

.ambient-a {
  top: 10%;
  left: -12rem;
  background: rgba(198, 107, 78, 0.34);
}

.ambient-b {
  right: -12rem;
  bottom: 8%;
  background: rgba(95, 125, 103, 0.36);
  animation-delay: -5s;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(22, 33, 31, 0.12);
  border-radius: 999px;
  background: rgba(246, 241, 232, 0.76);
  box-shadow: 0 12px 48px rgba(22, 33, 31, 0.09);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff9ef;
  background: var(--ink);
}

.site-nav {
  gap: 2px;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(22, 33, 31, 0.08);
}

.section-pad {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  padding: 88px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 90px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1,
h2 {
  letter-spacing: -0.075em;
}

h1 {
  max-width: 860px;
  margin-bottom: 24px;
  font-size: clamp(3.8rem, 11vw, 8.8rem);
  line-height: 0.84;
}

h1::first-line,
h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.hero-lede {
  max-width: 740px;
  color: var(--ink-soft);
  font-size: clamp(1.12rem, 2vw, 1.36rem);
  line-height: 1.7;
}

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

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

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(22, 33, 31, 0.12);
}

.button-primary {
  border-color: var(--ink);
  color: #fff9ef;
  background: var(--ink);
}

.button-secondary {
  background: rgba(255, 252, 246, 0.56);
}

.hero-card,
.work-card,
.project-card,
.contact-card,
.timeline-item {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.hero-card::before {
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(22, 33, 31, 0.18);
  border-radius: 26px;
  content: "";
}

.portrait {
  position: relative;
  display: grid;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 8px auto 28px;
  place-items: center;
}

.portrait-ring,
.portrait-ring::before,
.portrait-ring::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.portrait-ring {
  inset: 4px;
  border: 1px solid rgba(22, 33, 31, 0.14);
  background:
    conic-gradient(from 40deg, var(--lime), var(--cyan), var(--terracotta), var(--lime));
  animation: spin 18s linear infinite;
}

.portrait-ring::before {
  inset: 14px;
  background: var(--paper);
}

.portrait-ring::after {
  inset: 42px;
  background:
    radial-gradient(circle at 35% 28%, rgba(199, 240, 111, 0.9), transparent 22%),
    radial-gradient(circle at 70% 70%, rgba(134, 215, 205, 0.8), transparent 24%),
    #20302b;
}

.portrait-core {
  position: relative;
  z-index: 1;
  color: #fff9ef;
  font-size: clamp(3.8rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.08em;
}

.metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.metric-grid div {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.62);
}

.metric-grid dt {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 7px 0 0;
  font-weight: 700;
}

.strip {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 22px 28px;
  border: 1px solid rgba(22, 33, 31, 0.12);
  border-radius: var(--radius-lg);
  color: #fff9ef;
  background:
    linear-gradient(90deg, rgba(22, 33, 31, 0.94), rgba(48, 72, 65, 0.94)),
    var(--ink);
}

.strip p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.94;
}

.section-heading p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  position: relative;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.work-card::after {
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(199, 240, 111, 0.36);
  content: "";
}

.card-index {
  color: var(--terracotta);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
}

.work-card h3,
.project-card h3,
.timeline-item h3 {
  margin-bottom: 14px;
  font-size: 1.32rem;
  letter-spacing: -0.04em;
}

.work-card p,
.project-card p,
.timeline-item p,
.contact-card p {
  color: var(--ink-soft);
  line-height: 1.65;
}

.work-card ul {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.work-card li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.work-card li::before {
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  content: "";
}

.projects-section {
  padding-top: 48px;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-card {
  display: grid;
  grid-template-columns: 0.34fr 0.34fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateX(6px);
  border-color: rgba(22, 33, 31, 0.34);
  background: rgba(255, 252, 246, 0.84);
}

.project-card span {
  color: var(--terracotta);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3,
.project-card p {
  margin: 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.timeline-item {
  min-height: 250px;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.timeline-item span {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff9ef;
  background: var(--moss);
  font-size: 0.8rem;
  font-weight: 700;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(26px, 6vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 20%, rgba(199, 240, 111, 0.32), transparent 28%),
    rgba(255, 252, 246, 0.72);
}

.contact-card h2 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.94;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(42px, -24px, 0) scale(1.08);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

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

@media (max-width: 980px) {
  .hero,
  .contact-card {
    grid-template-columns: 1fr;
  }

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

  .project-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    border-radius: 28px;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    justify-content: space-between;
  }

  .site-nav a {
    padding: 9px 8px;
    font-size: 0.86rem;
  }

  .section-pad {
    width: min(calc(100% - 28px), var(--max));
    padding: 64px 0;
  }

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

  h1 {
    font-size: clamp(3.4rem, 17vw, 6rem);
  }

  .work-grid,
  .timeline,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
    gap: 10px;
  }
}
