@font-face {
  font-family: "Fraunces Variable";
  src: local("Fraunces");
  font-weight: 100 900;
}

:root {
  --bg: #f6f6f3;
  --bg-raised: #ffffff;
  --ink: #1a1a18;
  --ink-muted: #55554f;
  --ink-faint: #9c9c96;
  --line: #deded8;
  --accent: #355c7d;
  --accent-hover: #2a4a64;
  --ember: #b8622f;
  --ember-soft: #e9d9cd;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f10;
    --bg-raised: #17191a;
    --ink: #e8e6df;
    --ink-muted: #8f8d85;
    --ink-faint: #55534c;
    --line: #26282a;
    --accent: #7fa3bd;
    --accent-hover: #95b8d0;
    --ember: #e0955e;
    --ember-soft: #2a2118;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f10;
  --bg-raised: #17191a;
  --ink: #e8e6df;
  --ink-muted: #8f8d85;
  --ink-faint: #55534c;
  --line: #26282a;
  --accent: #7fa3bd;
  --accent-hover: #95b8d0;
  --ember: #e0955e;
  --ember-soft: #2a2118;
  --shadow: none;
}
:root[data-theme="light"] {
  --bg: #f6f6f3;
  --bg-raised: #ffffff;
  --ink: #1a1a18;
  --ink-muted: #55554f;
  --ink-faint: #9c9c96;
  --line: #deded8;
  --accent: #355c7d;
  --accent-hover: #2a4a64;
  --ember: #b8622f;
  --ember-soft: #e9d9cd;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  padding: 0 6vw;
  gap: 0;
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ember);
}

.hero h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-wrap: balance;
  display: flex;
  flex-direction: column;
}

.hero h1 .h1-line {
  display: block;
}

.hero h1 em {
  font-style: italic;
  color: var(--ember);
}

.hero .role {
  margin: 1.5rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ink-muted);
  max-width: 34ch;
  text-wrap: balance;
}

.hero .role strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-portrait {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  margin-left: -3vw;
}

.hero-portrait img {
  width: min(28vw, 400px);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.25));
}

.hero-portrait .ring {
  position: absolute;
  width: min(32vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  z-index: -1;
}

.hero-portrait .ring::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 6vw;
  height: 1px;
  background: linear-gradient(to left, var(--line), transparent);
}

.hero-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hero-links a:hover {
  border-color: var(--accent);
  background: var(--bg-raised);
  transform: translateY(-1px);
}

.hero-links a.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

@media (prefers-color-scheme: dark) {
  .hero-links a.primary { background: var(--ink); color: var(--bg); }
}
:root[data-theme="dark"] .hero-links a.primary { background: var(--ink); color: var(--bg); }
:root[data-theme="light"] .hero-links a.primary { background: var(--ink); color: var(--bg); }

.hero-links a.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 6vw;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 2;
}

.scroll-cue .bar {
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--ink-faint), transparent);
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 6vw 6rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type { border-bottom: none; }

.section-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 1.25rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.about-grid h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

.about-grid p {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-muted);
  margin: 0;
}

.about-grid a {
  color: var(--accent);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.skills-ledger {
  display: flex;
  flex-direction: column;
}

.skill-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.skill-row:first-child { border-top: none; }

.skill-row dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.skill-row dd {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.work-grid {
  display: grid;
  gap: 0;
}

.work-entry {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.work-entry:first-child { border-top: none; }

.work-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--ember);
  padding-top: 0.3rem;
}

.work-entry h3 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.work-entry p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 58ch;
  line-height: 1.6;
}

.work-entry a {
  color: var(--accent);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.work-entry a:hover { text-decoration: underline; }

footer {
  padding: 3rem 6vw 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

footer nav {
  display: flex;
  gap: 1.5rem;
}

footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

footer a:hover { color: var(--accent); }

/* Contact reveal — obfuscated to deter scraping, no backend needed */
#reveal-email {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
#reveal-email:hover { color: var(--accent); }

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 8rem;
    min-height: auto;
    gap: 0;
  }
  .hero-portrait {
    order: -1;
    margin-bottom: 1rem;
  }
  .hero-portrait img { width: 44vw; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .work-entry { grid-template-columns: 40px 1fr; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-portrait { animation: rise 900ms ease both; }
  .hero-portrait { animation-delay: 120ms; }
  .hero-links { animation: rise 900ms ease both; animation-delay: 240ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
