:root {
  --bg: #1a1816;
  --bg-elevated: #211f1c;
  --text: #e8e2d9;
  --text-secondary: #a89f94;
  --text-muted: #6e665c;
  --accent: #d4654a;
  --accent-light: #d4654a12;
  --rule: #2e2a27;
  --rule-strong: #3d3833;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* TABS — pill style */
.tabs input[type="radio"] {
  display: none;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.35rem;
  background: var(--bg-elevated);
  border-radius: 6px;
}

.tab-nav label {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  user-select: none;
  text-align: center;
  flex: 1;
}

.tab-nav label:hover {
  color: var(--text-secondary);
}

#tab-home:checked~.tab-nav label[for="tab-home"],
#tab-writing:checked~.tab-nav label[for="tab-writing"],
#tab-background:checked~.tab-nav label[for="tab-background"],
#tab-contact:checked~.tab-nav label[for="tab-contact"],
#tab-about:checked~.tab-nav label[for="tab-about"] {
  color: var(--text);
  background: var(--rule-strong);
  font-weight: 500;
}

.tab-panel {
  display: none;
  padding: 2rem 0 3rem;
}

#tab-home:checked~.panel-home,
#tab-writing:checked~.panel-writing,
#tab-background:checked~.panel-background,
#tab-contact:checked~.panel-contact,
#tab-about:checked~.panel-about {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* HOME */
.home-header {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.hero-intro {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.5rem;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1.05;
}

h1 em {
  font-style: italic;
}

.headshot {
  width: 160px;
  height: 160px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

.headshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.statement {
  padding: 1.75rem 0;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.statement p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  max-width: 620px;
  font-weight: 400;
}

.statement p strong {
  color: var(--accent);
}

.section-label {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.domain-desc {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 560px;
  font-weight: 300;
}

.domain-desc strong {
  color: var(--accent);
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  transition: all 0.25s;
  cursor: default;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* WRITING */
.writing-note {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.publications-list {
  list-style: none;
}

.pub-item {
  padding: 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--bg-elevated);
  border-radius: 4px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.pub-item:hover {
  border-color: var(--rule-strong);
}

.pub-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.pub-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.pub-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pub-links a {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  transition: all 0.2s;
}

.pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.writing-cta {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.writing-cta a {
  color: var(--accent);
  text-decoration: none;
}

.writing-cta a:hover {
  text-decoration: underline;
}

/* BACKGROUND */
.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-row:first-child {
  border-top: 1px solid var(--rule);
}

.timeline-years {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-muted);
  padding-top: 0.15rem;
}

.timeline-content h3 {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.timeline-role {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.timeline-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.5;
}

/* CONTACT — elevated cards */
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-card {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.25s;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-card:hover .contact-icon svg {
  fill: var(--accent);
}

.contact-card:hover .contact-name {
  color: var(--accent);
}

.contact-icon {
  margin-bottom: 0.75rem;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
  transition: fill 0.25s;
}

.contact-name {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  transition: color 0.25s;
}

.contact-use {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.45;
}

.contact-highlight {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}

/* ABOUT ME */
.about-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.about-photo {
  width: 200px;
  height: 200px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-bio {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
}

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

.about-bio em {
  font-style: italic;
  color: var(--text);
}

.about-bio a {
  color: var(--accent);
  text-decoration: none;
}

.about-bio a:hover {
  text-decoration: underline;
}

.hobbies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.hobby {
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  color: var(--text-secondary);
  transition: all 0.25s;
  cursor: default;
}

.hobby:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 680px) {
  .page {
    padding: 0 1.5rem;
  }

  .tab-nav label {
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem;
  }

  .home-header {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .headshot {
    width: 140px;
    height: 140px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .about-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-photo {
    width: 160px;
    height: 160px;
  }

  .audience-row {
    flex-direction: column;
    gap: 0.3rem;
  }
}