:root {
  --ink: #4b4b4b;
  --heading: #333333;
  --muted: #777777;
  --accent: #a5523a;
  --accent-hover: #d26b4f;
  --line: #ece7e3;
  --surface: #faf8f6;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: var(--ink);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

a:visited {
  color: var(--accent);
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

.home {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: clamp(42px, 8vh, 88px) 0 56px;
}

.home-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 46px;
}

.home-nav a {
  position: relative;
  display: inline-block;
  margin: 0 7px;
  padding: 9px 8px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.home-nav a::before,
.home-nav a::after {
  position: absolute;
  left: 8px;
  width: calc(100% - 16px);
  height: 1px;
  background: var(--accent-hover);
  content: "";
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.home-nav a::before {
  top: 4px;
  transform: translateY(-5px);
}

.home-nav a::after {
  bottom: 4px;
  transform: translateY(5px);
}

.home-nav a:hover,
.home-nav a:focus-visible {
  color: var(--accent-hover);
}

.home-nav a:hover::before,
.home-nav a:hover::after,
.home-nav a:focus-visible::before,
.home-nav a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.portrait-frame {
  display: block;
  width: 285px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  background: #e8e8e8;
  box-shadow: 0 14px 38px rgba(42, 35, 31, 0.10);
  animation: fade-in 700ms ease both;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  filter: saturate(0.94) contrast(0.98);
  opacity: 0.94;
  transition: opacity 500ms ease, transform 700ms ease;
}

.portrait-frame:hover .portrait {
  opacity: 1;
  transform: scale(1.015);
}

.intro {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.58;
  animation: fade-in 900ms 120ms ease both;
}

.intro h1 {
  margin: 2px 0 8px;
  color: var(--heading);
  font-size: clamp(2.2rem, 5vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.headline {
  margin: 0 0 26px !important;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.intro p {
  margin: 0 0 22px;
}

.intro p:last-child {
  margin-bottom: 0;
}

.intro a {
  font-weight: 400;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 780px) {
  .home {
    width: min(calc(100% - 36px), 600px);
    padding-top: 34px;
  }

  .home-nav {
    margin-bottom: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
  }

  .portrait-frame {
    width: min(280px, 78vw);
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .portrait {
    object-position: 50% 30%;
  }

  .intro {
    max-width: 560px;
    text-align: center;
    font-size: 1.08rem;
    line-height: 1.62;
  }

  .intro h1 {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .home {
    width: min(calc(100% - 28px), 600px);
    padding-top: 22px;
  }

  .home-nav {
    gap: 2px;
    margin-bottom: 28px;
  }

  .home-nav a {
    margin: 0 2px;
    padding-inline: 7px;
    font-size: 1rem;
  }

  .portrait-frame {
    width: 220px;
  }

  .intro {
    font-size: 1.02rem;
  }
}

:focus-visible {
  outline: 2px solid rgba(165, 82, 58, 0.45);
  outline-offset: 4px;
}

/* Supporting styles for CV and Publications pages included in the package. */
.page-glow {
  display: none;
}

.site-shell {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 18px;
}

.wordmark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 400;
}

.external-mark {
  margin-left: 3px;
  font-size: 0.75em;
}

.secondary-main {
  flex: 1;
  padding: 70px 0 88px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.secondary-main h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.content-card {
  margin-top: 30px;
  padding: clamp(25px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.content-card p:first-child {
  margin-top: 0;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  gap: 7px;
  margin-top: 26px;
  color: var(--muted);
  font-weight: 400;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: #8a8a8a;
  font-size: 0.86rem;
}

@media (max-width: 560px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header {
    align-items: flex-start;
    padding-top: 20px;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    padding-inline: 7px;
    font-size: 0.9rem;
  }
}
