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

:root {
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #2c2c2c;
  --color-border: #e0ddd8;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, sans-serif;
  --max-width: 860px;
  --space: clamp(1rem, 4vw, 1.5rem);
  --gap: clamp(1rem, 3vw, 2.5rem);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

/* Nav */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  padding: 1rem var(--space);
  max-width: var(--max-width);
  margin-inline: auto;
}

@media (min-width: 540px) {
  nav {
    justify-content: flex-end;
  }
}

nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav a:is(:hover, [aria-current="page"]) {
  color: var(--color-text);
}

/* Header */
header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: center;
  margin-top: clamp(1rem, 3vw, 2rem);
}

.tagline {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* Main */
main {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space);
}

section {
  padding-block: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--color-border);
}

section:last-child {
  border-bottom: none;
}

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

h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

h3 {
  font-size: 1.1rem;
  margin-block: 2rem 1rem;
}

/* Home */
.home {
  display: flex;
  justify-content: center;
  padding-block: clamp(2rem, 5vw, 3rem);
}

.hero-image {
  max-height: 70dvh;
  max-width: 100%;
  object-fit: contain;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--gap);
  align-items: start;
}

.headshot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--color-border);
}

.bio p + p {
  margin-top: 1rem;
}

/* Resume table */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 480px;
}

th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.5rem 1rem 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: clamp(0.4rem, 1.5vw, 0.75rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.gallery-grid img:hover {
  opacity: 0.85;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 1rem;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90dvh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  text-decoration: none;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 1.5rem;
}

.contact-form label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

.contact-form :is(input, textarea) {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  width: 100%;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.6rem 1.75rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  text-align: center;
  padding: clamp(1.25rem, 3vw, 2rem) var(--space);
  font-size: 0.8125rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}
