:root {
  --ink: #17191f;
  --paper: #f7f3ea;
  --white: #fffdf8;
  --muted: #6f736f;
  --line: rgba(23, 25, 31, 0.16);
  --navy: #17263d;
  --sage: #5d756d;
  --oxblood: #8e2430;
  --shadow: 0 24px 70px rgba(23, 25, 31, 0.14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 25, 31, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 25, 31, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 14% 10%, rgba(142, 36, 48, 0.12), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(93, 117, 109, 0.16), transparent 28rem),
    linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(247, 243, 234, 0.74));
}

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

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

.cursor-light {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  pointer-events: none;
  background: radial-gradient(circle, rgba(142, 36, 48, 0.16), transparent 64%);
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 180ms ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 1rem 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.site-nav {
  justify-self: center;
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.65rem);
  align-items: center;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.74);
}

.site-nav a,
.nav-action {
  position: relative;
  color: rgba(23, 25, 31, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-nav a::after,
.site-footer a::after {
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after,
.site-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-action {
  justify-self: end;
  padding: 0.78rem 1rem;
  border: 1px solid var(--ink);
  background: rgba(255, 253, 248, 0.72);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100svh - 5rem);
  padding: clamp(3rem, 7vw, 7rem) 0 clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--oxblood);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1.3rem;
  font-size: clamp(4.6rem, 12vw, 10.5rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
}

h3 {
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.12;
}

.hero-statement {
  max-width: 38rem;
  color: rgba(23, 25, 31, 0.76);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.24;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 220ms ease, background 220ms ease, color 220ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button.primary {
  background: var(--ink);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 253, 248, 0.58);
}

.portrait-panel {
  position: relative;
  justify-self: end;
  width: min(100%, 480px);
}

.portrait-frame {
  aspect-ratio: 4 / 5.15;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  filter: saturate(0.94) contrast(1.03);
  transform: scale(1.02);
}

.caption-card {
  position: absolute;
  right: clamp(-1rem, -3vw, -2.25rem);
  bottom: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  width: min(20rem, 78%);
  padding: 1rem;
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 12px 12px 0 var(--navy);
}

.caption-number {
  color: var(--oxblood);
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
}

.caption-card p {
  margin: 0;
  color: rgba(23, 25, 31, 0.72);
  font-size: 0.9rem;
  line-height: 1.45;
}

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee span {
  padding: 1rem 1.6rem;
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.55rem);
  white-space: nowrap;
}

.profile,
.contact {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.section-kicker {
  align-self: start;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.section-kicker span {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--oxblood);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-kicker p {
  max-width: 20rem;
  color: rgba(23, 25, 31, 0.72);
}

.profile-copy {
  display: grid;
  gap: 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  line-height: 1.18;
}

.profile-copy p {
  margin-bottom: 0;
}

.resume-block {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7.5rem) 0;
  border-top: 1px solid var(--ink);
}

.block-heading {
  display: grid;
  grid-template-columns: minmax(12rem, 0.35fr) 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(16rem, 0.95fr) 1.4fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--line);
}

.timeline-item ul {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(23, 25, 31, 0.74);
}

.timeline-item li + li {
  margin-top: 0.5rem;
}

.date {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-item p,
.feature-card p,
.project-card p {
  color: rgba(23, 25, 31, 0.72);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card,
.project-card,
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: rgba(255, 253, 248, 0.82);
  transition: transform 240ms ease, box-shadow 240ms ease, background 240ms ease;
}

.feature-card::before,
.project-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(142, 36, 48, 0.12), transparent 12rem);
  opacity: 0;
  transition: opacity 220ms ease;
}

.feature-card {
  min-height: 25rem;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.feature-card:hover,
.project-card:hover {
  background: var(--white);
  box-shadow: 12px 12px 0 rgba(23, 38, 61, 0.9);
  transform: translate(-4px, -4px);
}

.feature-card:hover::before,
.project-card:hover::before {
  opacity: 1;
}

.role {
  color: var(--oxblood);
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  min-height: 23rem;
  padding: clamp(1.25rem, 2.4vw, 1.8rem);
}

.project-card span {
  display: inline-block;
  margin-bottom: 4rem;
  color: var(--sage);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skills-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 clamp(4rem, 7vw, 6rem);
}

.skills-strip span {
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.66);
  color: rgba(23, 25, 31, 0.78);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.contact-card h2 {
  margin-bottom: 1rem;
}

.contact-card p {
  max-width: 42rem;
  color: rgba(23, 25, 31, 0.72);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--ink);
  color: rgba(23, 25, 31, 0.72);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  position: relative;
  font-weight: 800;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
    overflow-x: auto;
  }

  .section-grid,
  .block-heading,
  .timeline-item,
  .feature-list,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .portrait-panel {
    justify-self: stretch;
    width: 100%;
  }

  .caption-card {
    right: 1rem;
  }

  .feature-card,
  .project-card {
    min-height: auto;
  }

  .project-card span {
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 600px) {
  body {
    background-size: 48px 48px;
  }

  .site-header {
    width: min(100% - 24px, 1180px);
  }

  .site-nav {
    gap: 1rem;
    padding: 0.7rem;
  }

  .site-nav a,
  .nav-action {
    font-size: 0.7rem;
  }

  .section-grid,
  .resume-block,
  .skills-strip,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: clamp(4.1rem, 24vw, 6.5rem);
  }

  .hero-actions,
  .contact-actions,
  .site-footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .caption-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% - 1.2rem);
    margin: -2.25rem 0 0 0.6rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .cursor-light {
    display: none;
  }
}
