/* ═══════════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════════ */
:root {
  --ink: #1a1a1a;
  --paper: #faf9f7;
  --mid: #636360;
  --light: #d4d4cf;
  --rule: #c8c8c2;

  --accent: #b35a3a;
  --accent-hover: #994d32;
  --teal: #3b6a77;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'DM Sans', 'Helvetica Neue', sans-serif;
  --max-w: 840px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background: #faf9f7;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #faf9f7;
  line-height: 1.7;
}

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

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

/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
  background: var(--paper);
}

.nav-inner {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.nav-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  align-items: baseline;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.35rem 0.9rem !important;
  font-size: 0.78rem !important;
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--paper) !important;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.header {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 4.5rem var(--gutter) 3rem;
}

.header-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.header-text { flex: 1; }

.header-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.tagline {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 560px;
}

.tagline a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.2s;
}

.tagline a:hover { text-decoration-color: var(--accent); }

.header-photo {
  flex-shrink: 0;
  width: 180px;
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--mid);
  font-style: italic;
}

.contact-row {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-row a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.contact-row a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0 2.5rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.7;
  max-width: 600px;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.section p { font-size: 0.95rem; line-height: 1.8; }
.section p + p { margin-top: 1rem; }

/* ═══════════════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════════════ */
.project-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem 2.2rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  background: transparent;
  position: relative;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(179, 90, 58, 0.08);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-overline {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.card-role {
  font-size: 0.75rem;
  color: var(--mid);
  font-style: italic;
}

.project-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.75;
}

.card-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.card-details ul {
  list-style: none;
  padding: 0;
}

.card-details li {
  font-size: 0.85rem;
  color: var(--mid);
  padding: 0.2rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.card-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

.card-link {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: letter-spacing 0.2s;
}

.project-card:hover .card-link {
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   MENTORING
   ═══════════════════════════════════════════ */

.mentoring-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mentoring-list li {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--mid);
  padding: 0.6rem 0;
  padding-left: 0;
  margin-left: 0;
  border-bottom: 1px solid var(--rule);
  list-style: none;
}
 
.mentoring-list li:last-child { border-bottom: none; }
 
.mentoring-list strong {
  color: var(--ink);
  font-weight: 500;
}
 
.mentoring-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
}
 
.mentoring-list a:hover { text-decoration-color: var(--accent); }
 
.mentoring-also {
  font-size: 0.85rem;
  color: var(--mid);
  margin-top: 0.8rem;
  line-height: 1.7;
}

.mentoring-also a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
}

.mentoring-also a:hover { text-decoration-color: var(--accent); }

/* ═══════════════════════════════════════════
   RESEARCH
   ═══════════════════════════════════════════ */
.research-grid {
  margin-bottom: 2.5rem;
}

.research-featured {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 1.8rem 2rem;
  background: var(--paper);
  border-radius: 0 6px 6px 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.research-featured:hover {
  border-color: var(--rule);
  border-left-color: var(--accent);
  box-shadow: 0 2px 16px rgba(179, 90, 58, 0.08);
}

.research-featured .card-overline {
  color: var(--accent);
}

.research-featured h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0.6rem 0;
}

.research-featured p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.7;
}

.research-featured .card-link {
  color: var(--accent);
}

.pub-section-title {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-top: 1rem;
  margin-bottom: 0.8rem;
}

.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.pub-list li:last-child { border-bottom: none; }

.pub-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.45;
}

.pub-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.pub-title a:hover { border-color: var(--ink); }

.pub-meta {
  font-size: 0.82rem;
  color: var(--mid);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.pub-venue { font-style: italic; }

.pub-link-inline { color: var(--accent); }

/* ═══════════════════════════════════════════
   THINKING TEASER (index page)
   ═══════════════════════════════════════════ */
.thinking-teaser {
  max-width: 620px;
  margin-top: 0.5rem;
}

.thinking-teaser p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.8;
  color: #2a2a2a;
  margin-bottom: 1.2rem;
}

.thinking-cta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

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

/* ═══════════════════════════════════════════
   ORIGIN STORY (bottom of index)
   ═══════════════════════════════════════════ */
.origin-section {
  /* inherits all layout from .section */
}

.origin-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  padding: 2.2rem 2.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.origin-card:hover {
  border-color: var(--rule);
  border-left-color: var(--teal);
  box-shadow: 0 4px 20px rgba(59, 106, 119, 0.1);
}

.origin-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 0.7rem;
  display: block;
}

.origin-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.origin-card-inner::after {
  content: '';
  display: table;
  clear: both;
}

.origin-card-photo {
  float: right;
  width: 220px;
  height: 240px;
  margin-left: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.origin-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.origin-card-inner p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.75;
}

.origin-card .card-link {
  color: var(--teal);
}

@media (max-width: 700px) {
  .origin-card-photo {
    float: none;
    width: 100%;
    height: 200px;
    margin-left: 0;
    margin-bottom: 1rem;
  }
}

/* ═══════════════════════════════════════════
   SUBPAGE LAYOUT (narrative, project pages)
   ═══════════════════════════════════════════ */
.page-header {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 4rem var(--gutter) 2rem;
  border-bottom: 1px solid var(--rule);
}

.page-header .breadcrumb {
  font-size: 0.78rem;
  color: var(--mid);
  margin-bottom: 1rem;
}

.page-header .breadcrumb a {
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.page-header .breadcrumb a:hover { color: var(--ink); }

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 640px;
}

.page-header .page-subtitle {
  font-size: 1rem;
  color: var(--mid);
  margin-top: 0.8rem;
  line-height: 1.7;
  max-width: 560px;
}

.page-body {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
}

.prose {
  max-width: 640px;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.prose p {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.85;
  color: #2a2a2a;
}

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

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
}

.prose a:hover { text-decoration-color: var(--accent); }

.prose .aside-note {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--mid);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin: 2rem 0;
  line-height: 1.65;
}

.prose .highlight-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
}

.footer-inner {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p { font-size: 0.8rem; color: var(--mid); }

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--ink); }

/* ═══════════════════════════════════════════
   FADE-IN
   ═══════════════════════════════════════════ */
.fade-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 700px) {
  html { font-size: 16px; }

  .header { padding-top: 3rem; }

  .header-content {
    flex-direction: column-reverse;
    gap: 1.5rem;
  }

  .header-photo {
    width: 120px;
    height: 150px;
  }

  .project-card { padding: 1.5rem; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    padding: 1rem var(--gutter) 1.5rem;
    gap: 0.8rem;
  }

  .nav-links.open { display: flex; }

  .card-top { flex-direction: column; gap: 0.2rem; }
}
