/* Or Tuttnauer — site styles (matches ortutt/publications) */
:root {
  --bg:        #ffffff;
  --surface:   #ffffff;
  --tint:      #f4f6fa;
  --border:    #e1e6ef;
  --text:      #0b1530;
  --muted:     #3b4664;
  --faint:     #8590ab;
  --navy:      #071334;
  --navy-2:    #0d1f4d;
  --accent:    #132d6b;
  --gold:      #f2b705;
  --gold-dark: #a67c00;
  --on-navy:   #c9d2e6;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.page-wrap {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px;
  flex: 1;
}

/* ── Header (shared with ortutt.github.io) ── */
.site-header {
  padding: 26px 0 0;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name     links"
    "subtitle subtitle"
    "nav      nav";
  column-gap: 24px;
  align-items: center;
}

.site-header .name,
.site-header h1 {
  grid-area: name;
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0;
  justify-self: start;
}
.site-header h1 a { color: inherit; text-decoration: none; }
.site-header .name:hover,
.site-header h1 a:hover { color: var(--accent); text-decoration: none; }

.site-header .subtitle {
  grid-area: subtitle;
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 14px;
}

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

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--navy);
  background: var(--surface);
  transition: all 0.15s;
}
.profile-link:hover { border-color: var(--gold); color: var(--navy); text-decoration: none; box-shadow: inset 0 -2px 0 var(--gold); }
.profile-link svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Navigation ── */
.site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.site-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav a:hover { color: var(--navy); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "subtitle" "links" "nav";
  }
  .profile-links { justify-content: flex-start; margin-bottom: 12px; }
}

/* ── Sections & text ── */
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.page-intro {
  font-size: 13px;
  color: var(--faint);
  font-style: italic;
  margin: -8px 0 20px;
}

.section { margin-bottom: 48px; }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 48px;
  height: 3px;
  background: var(--gold);
}

.prose p { margin-bottom: 1em; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }
.prose ol, .prose ul { margin: 0 0 1em 1.4em; }
.prose li { margin-bottom: 0.3em; }

.dates {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--gold-dark);
  margin-bottom: 14px !important;
}

/* ── Home: portrait + intro ── */
.intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}
.portrait {
  box-shadow: 6px 6px 0 var(--gold);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.closing-note {
  font-size: 14px;
  color: var(--muted);
}

/* ── Card list (projects, teaching, apps) ── */
.card-list { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  border-radius: 4px;
  padding: 18px 22px;
  transition: border-color 0.15s;
}
.card:hover { border-left-color: var(--gold); }

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 6px;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: 8px;
  white-space: nowrap;
}

.card p { font-size: 14px; color: var(--muted); }
.card p + p { margin-top: 8px; }

.link-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Collapsible projects (<details>) ── */
details.card { padding: 0; }
details.card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 50px 18px 22px;
  position: relative;
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  transition: color 0.15s;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  color: var(--gold-dark);
}
details.card[open] { border-left-color: var(--gold); }
details.card[open] > summary::after { content: '−'; color: var(--gold-dark); }
details.card > summary:hover { color: var(--accent); }
details.card[open] > summary { border-bottom: 1px solid var(--border); }
details.card > .prose { padding: 18px 22px 22px; font-size: 14.5px; }

/* ── Contact / CV ── */
.contact-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  width: 80px;
  flex-shrink: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid var(--navy);
  color: #ffffff;
  background: var(--navy);
  transition: all 0.15s;
}
.button:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); text-decoration: none; }

/* ── CV page ── */
.cv-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  background: var(--tint);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.cv-current p { font-size: 14px; color: var(--muted); margin: 0; flex: 1 1 320px; }
.cv-frame {
  display: block;
  width: 100%;
  height: 85vh;
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--tint);
}
.cv-fallback { padding: 24px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .cv-frame { height: 70vh; min-height: 420px; } }

/* ── Footer ── */
.page-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--faint);
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; }
  .portrait {
  box-shadow: 6px 6px 0 var(--gold); max-width: 220px; }
  .site-nav { gap: 0 18px; }
}
