:root {
  /* Warm, taverna-evening palette */
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #211d18;
  --muted: #7a7161;
  --border: #e9e1d3;
  --accent: #c8752b;        /* warm amber */
  --accent-2: #4f7a52;      /* greenery */
  --accent-soft: #f6ebdd;
  --shadow: 0 1px 2px rgba(60, 40, 15, 0.05), 0 18px 40px rgba(80, 55, 20, 0.10);
  --radius: 16px;
  --maxw: 62rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--sans);
}

:root[data-theme="dark"] {
  --bg: #16130e;
  --surface: #1f1a13;
  --text: #f3ede1;
  --muted: #a2967f;
  --border: #2e271c;
  --accent: #e2954a;
  --accent-2: #86b083;
  --accent-soft: #251d12;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Ambient glow drawn from the photo's warm light */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42rem 32rem at 78% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(38rem 30rem at 12% 92%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%);
  pointer-events: none;
}

/* Top bar */
.topbar {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monogram {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--accent);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.theme-toggle {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.theme-toggle:hover { transform: rotate(-20deg) scale(1.05); }

/* Layout */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* Portrait */
.portrait {
  position: relative;
  margin: 0;
  justify-self: center;
  max-width: 420px;
  width: 100%;
}
.portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.portrait::before {
  content: "";
  position: absolute;
  inset: -0.9rem;
  border-radius: calc(var(--radius) + 0.6rem);
  border: 1px solid var(--accent);
  opacity: 0.35;
  pointer-events: none;
}
.portrait__cap {
  margin-top: 0.85rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Intro column */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.name {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.tagline {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}
.bio {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 1.05rem;
  line-height: 1.72;
  max-width: 34rem;
}

/* Links */
.links {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 26rem;
}
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.link__arrow { color: var(--accent); transition: transform 0.18s ease; }
.link:hover .link__arrow { transform: translateX(4px); }

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.intro .reveal:nth-child(1) { animation-delay: 0.05s; }
.intro .reveal:nth-child(2) { animation-delay: 0.12s; }
.intro .reveal:nth-child(3) { animation-delay: 0.19s; }
.intro .reveal:nth-child(4) { animation-delay: 0.26s; }
.intro .reveal:nth-child(5) { animation-delay: 0.33s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Responsive: stack on narrow screens, photo first */
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .portrait { order: -1; max-width: 320px; }
  .bio { margin-left: auto; margin-right: auto; }
  .links { margin-left: auto; margin-right: auto; }
  .eyebrow { margin-top: 0.5rem; }
}
