@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/InstrumentSerif-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --ink: #18362a;
  --muted: #4b5750;
  --line: #d5d7cc;
  --forest: #132f25;
  --light: #f7f5ee;
  --gold: #dec68e;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --page-gutter: clamp(1.125rem, 4.5vw, 4.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

#about, #projects { scroll-margin-top: 1.25rem; }

.shell {
  width: min(calc(100% - var(--page-gutter) * 2), 77.5rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  background: var(--paper);
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }

.header-inner, .wordmark, .site-nav, .site-footer {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 5.125rem;
  justify-content: space-between;
  gap: 0.85rem;
  padding-block: 0.85rem;
}

.wordmark {
  flex: none;
  gap: 0.7rem;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.monogram {
  display: grid;
  width: 2.375rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--paper);
  border-radius: 50%;
  background: var(--ink);
  font: italic 400 1.65rem/1 var(--serif);
}

.site-nav {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(0.65rem, 3vw, 2.375rem);
  font-size: 0.875rem;
  font-weight: 550;
}

.site-nav a {
  padding-block: 0.5rem;
  text-decoration: none;
}

.site-nav a:hover, .site-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.27em;
}

.site-nav .nav-profile {
  padding-inline: 1rem;
  border: 1px solid #a9b2a6;
  border-radius: 0.25rem;
}

.hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(1.75rem, 4.5vw, 4.75rem);
  padding-block: clamp(2rem, 4vw, 4rem) clamp(3.5rem, 6vw, 5.75rem);
}

.hero-copy { padding-block: 0.75rem; }

.greeting {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.greeting::before {
  width: 1.55rem;
  height: 1px;
  background: #8b774e;
  content: '';
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  margin-top: 0.95rem;
  font-size: clamp(4.25rem, 8.8vw, 9.05rem);
  line-height: 0.82;
  letter-spacing: -0.025em;
}

h1 em {
  display: block;
  padding-bottom: 0.12em;
  color: #3e5b48;
}

.hero-intro {
  max-width: 27ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  margin-top: 1.65rem;
  padding: 0.6rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.button:hover { background: #2d503d; }
.button:focus-visible { outline-color: var(--ink); }

.hero-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.08;
  border-radius: 0.25rem;
  background: var(--forest);
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-art::after {
  position: absolute;
  inset: 0.8rem;
  border: 1px solid rgb(222 198 142 / 38%);
  pointer-events: none;
  content: '';
}

h2 {
  font-size: clamp(2.75rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  gap: clamp(1.5rem, 4.5vw, 4.75rem);
  padding-block: clamp(2.25rem, 5.25vw, 5rem);
  border-top: 1px solid var(--line);
}

.about-content {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  line-height: 1.65;
}

.portrait {
  display: block;
  flex: none;
  width: clamp(5.5rem, 10vw, 8.5rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e8e9dd;
  object-fit: cover;
}

.projects {
  background: var(--forest);
  color: var(--light);
}

.projects-inner { padding-block: clamp(3rem, 6vw, 5.5rem); }

.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.85rem 1.5rem;
}

.text-link {
  font-size: 0.875rem;
  font-weight: 600;
  text-underline-offset: 0.24em;
  text-decoration-color: currentColor;
}

.text-link:hover { text-decoration-thickness: 2px; }

.projects .text-link { color: var(--gold); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin-top: clamp(1.75rem, 4vw, 3rem);
}

.project {
  position: relative;
  padding-block: 1.3rem 0.4rem;
  border-top: 1px solid #587064;
}

.project-language {
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
}

.project h3 {
  margin-top: 0.45rem;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  line-height: 1.14;
}

.project h3 a { text-decoration: none; }

.project h3 a::after {
  position: absolute;
  inset: 0;
  content: '';
}

.project h3 a:is(:hover, :focus-visible) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.project-description {
  max-width: 42ch;
  margin-top: 0.7rem;
  color: #d6e0d8;
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding-block: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 760px) {
  .header-inner { min-height: 4.4rem; }
  .hero, .about { grid-template-columns: 1fr; }
  .hero { gap: 2rem; }
  .hero-copy { padding-block: 0.5rem 0; }
  h1 { font-size: clamp(4.3rem, 14vw, 7.5rem); }
  .hero-intro { margin-top: 1rem; }
  .button { margin-top: 1.35rem; }
  .hero-art { aspect-ratio: 1.15; }
}

@media (max-width: 480px) {
  .wordmark > span:last-child { display: none; }
  .site-nav .nav-profile { padding-inline: 0.65rem; }
  .project-grid { grid-template-columns: 1fr; }
  .about-content { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
