:root {
  --paper: #f6f2eb;
  --paper-soft: #ebe5dc;
  --ink: #12151a;
  --ink-soft: #4f5965;
  --line: rgba(18, 21, 26, 0.16);
  --accent: #2f6f73;
  --accent-deep: #173f45;
  --clay: #9a6a4f;
  --white: #fffaf2;
  --header-h: 72px;
  --max: 1180px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Roboto Mono", "Cascadia Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 21, 26, 0.04) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--paper);
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 16% 12%, rgba(47, 111, 115, 0.12), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(154, 106, 79, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 250, 242, 0.72), rgba(246, 242, 235, 0.94));
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  background: rgba(246, 242, 235, 0.72);
  backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(246, 242, 235, 0.92);
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding-block: 8px;
}

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

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

main {
  overflow: clip;
}

.hero {
  display: grid;
  min-height: clamp(520px, 72svh, 720px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 110px) clamp(20px, 5vw, 72px) clamp(28px, 4vw, 54px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  transform: translate3d(0, calc(var(--parallax-y, 0) * 1px), 0);
}

.hero-intro {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: end;
  gap: 22px;
  margin: 0 auto 18px;
}

.profile-photo {
  display: block;
  width: clamp(74px, 10vw, 132px);
  height: clamp(74px, 10vw, 132px);
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  filter: saturate(0.92) contrast(1.02);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.12;
}

h1 {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 22px auto 0;
  font-family: var(--font-mono);
  font-size: clamp(3rem, 5.8vw, 5.7rem);
  font-weight: 500;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-align: center;
}

.hero-kicker {
  max-width: 760px;
  margin: 34px auto 0;
  color: var(--accent);
  font-size: clamp(1.3rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.14;
  text-align: center;
}

.hero-summary {
  max-width: 680px;
  margin: 34px auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
  line-height: 1.72;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 38px;
}

.text-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.text-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.intro-band,
.section-stack,
.projects,
.skills,
.credentials,
.contact {
  width: min(var(--max), calc(100% - clamp(40px, 9vw, 112px)));
  margin: 0 auto;
}

.intro-band {
  display: block;
  padding: clamp(66px, 10vw, 130px) 0;
  border-top: 1px solid var(--line);
}

.section-index {
  color: var(--clay);
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 0.9;
}

.section-copy {
  max-width: 1120px;
  margin: 0 auto;
}

.section-copy h2,
.section-heading h2,
.contact h2 {
  max-width: 1080px;
  margin: 0;
  font-size: clamp(1.5rem, 2.75vw, 2.75rem);
  line-height: 1.24;
}

.section-copy p:not(.eyebrow) {
  max-width: 980px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.48rem);
  line-height: 1.68;
}

.section-stack,
.projects,
.skills,
.credentials,
.contact {
  padding: clamp(64px, 10vw, 130px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 920px;
  margin-bottom: clamp(42px, 7vw, 86px);
}

.timeline-item {
  display: grid;
  padding: clamp(30px, 4vw, 54px) 0;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 76px);
}

.timeline-item:first-of-type {
  border-top-color: var(--ink);
}

.timeline-meta {
  display: grid;
  align-content: start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-meta span:last-child {
  color: var(--accent-deep);
}

.experience-visual {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 9 / 8;
  margin-top: clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  opacity: 0.94;
}

.timeline-body h3,
.project-panel h3,
.skill-columns h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.025em;
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.3;
}

.timeline-body h3 {
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent) 48%, var(--clay));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.timeline-item:nth-of-type(2) .timeline-body h3 {
  background-image: linear-gradient(90deg, #245f67, #5f7f73 52%, #9a6a4f);
}

.timeline-item:nth-of-type(3) .timeline-body h3 {
  background-image: linear-gradient(90deg, #173f45, #6a7565 45%, #8b5e73);
}

.timeline-item:nth-of-type(4) .timeline-body h3 {
  background-image: linear-gradient(90deg, #2f6f73, #7b735f 50%, #9a6a4f);
}

.timeline-body p {
  max-width: 800px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.impact-list {
  display: grid;
  max-width: 760px;
  margin: 22px 0 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.impact-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.62;
}

.impact-list li::before {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  content: "";
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.project-panel {
  min-height: 290px;
  padding: clamp(24px, 3vw, 36px);
  border-left: 1px solid var(--line);
}

.project-panel:first-child {
  border-left: 0;
}

.project-panel span {
  display: block;
  margin-bottom: 56px;
  color: var(--clay);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1;
}

.project-panel p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  line-height: 1.72;
}

.skill-columns {
  display: grid;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-columns > div {
  min-height: 280px;
  padding: clamp(26px, 4vw, 44px);
  border-left: 1px solid var(--line);
}

.skill-columns > div:first-child {
  border-left: 0;
}

.skill-columns ul,
.achievements ul {
  display: grid;
  margin: 24px 0 0;
  padding: 0;
  gap: 12px;
  color: var(--ink-soft);
  line-height: 1.64;
  list-style: none;
}

.skill-columns li,
.achievements li {
  position: relative;
  padding-left: 20px;
}

.skill-columns li::before,
.achievements li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--accent);
}

.credentials {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.55fr);
  gap: clamp(36px, 7vw, 92px);
}

.education h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
}

.education dl {
  display: grid;
  margin: 42px 0 0;
  gap: 0;
}

.education dt {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.education dd {
  margin: 8px 0 0;
  padding-bottom: 22px;
  color: var(--ink-soft);
  line-height: 1.64;
}

.achievements {
  align-self: end;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.contact {
  padding-bottom: clamp(80px, 12vw, 150px);
}

.contact-inner {
  max-width: 960px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-top: 42px;
}

.contact-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--accent-deep);
  font-weight: 500;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 680ms ease,
    transform 680ms ease;
}

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

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .project-panel:nth-child(odd) {
    border-left: 0;
  }

  .project-panel:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 66px;
  }

  .site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .site-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2px 14px;
    font-size: 0.7rem;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    margin-inline: auto;
    font-size: clamp(2.15rem, 7.2vw, 3.55rem);
    letter-spacing: 0.045em;
  }

  .intro-band,
  .timeline-item,
  .credentials {
    grid-template-columns: 1fr;
  }

  .intro-band,
  .section-stack,
  .projects,
  .skills,
  .credentials,
  .contact {
    width: min(100% - 36px, var(--max));
  }

  .timeline-meta {
    grid-template-columns: 1fr 1fr;
  }

  .experience-visual {
    grid-column: 1 / -1;
    width: min(100%, 360px);
  }

  .skill-columns {
    grid-template-columns: 1fr;
  }

  .skill-columns > div {
    min-height: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .skill-columns > div:first-child {
    border-top: 0;
  }
}

@media (max-width: 620px) {
  body {
    background:
      linear-gradient(90deg, rgba(18, 21, 26, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
      var(--paper);
  }

  .site-header {
    display: grid;
    position: relative;
    width: 100%;
    max-width: 100vw;
    grid-template-columns: 1fr;
    justify-items: start;
    overflow: hidden;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .site-nav {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    gap: 2px 11px;
    font-size: 0.66rem;
  }

  h1 {
    margin-inline: 0;
    margin-top: 0;
    font-size: clamp(2.08rem, 10.2vw, 2.95rem);
    letter-spacing: 0.035em;
    line-height: 1.18;
    max-width: 9ch;
    text-align: center;
  }

  .hero-intro {
    align-items: center;
    gap: 14px;
    margin: 0 auto 20px;
  }

  .profile-photo {
    width: 68px;
    height: 68px;
  }

  .hero-kicker {
    max-width: 18ch;
    font-size: clamp(1.02rem, 4.9vw, 1.28rem);
    line-height: 1.35;
  }

  .hero-summary {
    font-size: 0.92rem;
    line-height: 1.68;
  }

  .hero {
    width: min(100%, 390px);
    margin: 0;
    padding-inline: 18px;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero-summary {
    max-width: 100%;
  }

  .hero-actions,
  .contact-links {
    gap: 12px 22px;
  }

  .section-copy h2,
  .section-heading h2,
  .contact h2 {
    font-size: clamp(1.45rem, 7.2vw, 2.3rem);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-panel {
    min-height: 230px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .project-panel:first-child {
    border-top: 0;
  }

  .project-panel span {
    margin-bottom: 38px;
  }

  .timeline-meta {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  .hero-copy,
  .reveal {
    opacity: 1;
    transform: none !important;
  }
}
