/* Faraon Lab — site stylesheet
   One stylesheet for every page. Colors and spacing are defined once below.
   Deliberately plain: square corners, no shadows, thin rules between sections. */

:root {
  --orange: #ff6c0c;        /* Caltech orange */
  --orange-dark: #c94f00;
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --muted: #6a6a6a;
  --line: #dcdcdc;
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --navy: #0f1b2d;
  --max: 1080px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.2rem; margin: 0 0 .4rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 .9rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #c9d1dc; font-size: .82rem; }
.topbar .container { display: flex; align-items: center; gap: 14px; min-height: 34px; flex-wrap: wrap; }
.topbar a { color: #c9d1dc; }
.topbar a:hover { color: #fff; }
.topbar .caltech { font-weight: 700; color: #fff; }
.topbar .sep { opacity: .35; }

/* ---------- Header / navigation ---------- */
.site-header { position: relative; background: #fff; border-bottom: 3px solid var(--orange); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
.brand-name span { color: var(--orange); }
.brand-sub { font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--muted); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a { display: block; padding: 6px 11px; color: var(--ink); font-size: .98rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--orange-dark); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--orange-dark); border-bottom-color: var(--orange); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); padding: 7px 9px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { display: block; }

@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); display: none; z-index: 50; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 6px 20px 12px; }
  .nav a { padding: 9px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
}

/* ---------- Page header ---------- */
.page-head { padding: 36px 0 0; }
.page-head h1 { margin: 0; }
.page-head p { color: var(--muted); margin: .35rem 0 0; max-width: 720px; font-size: 1.05rem; }
.eyebrow { display: none; }

main { padding-bottom: 56px; }
.section { padding-top: 4px; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-soft); }
.lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Home intro ---------- */
.hero { padding: 36px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: center; }
.hero h1 { font-size: 2.4rem; }
.hero p { color: var(--ink-soft); font-size: 1.08rem; }
.btn-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.btn { display: inline-block; font-weight: 600; }
.btn-primary { background: var(--orange-dark); color: #fff; padding: 8px 16px; }
.btn-primary:hover { background: #a84200; text-decoration: none; }
.btn-ghost { color: var(--orange-dark); }
.btn-ghost::after { content: " \2192"; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Carousel ---------- */
.carousel { position: relative; overflow: hidden; background: #000; }
.carousel .slide { display: none; margin: 0; }
.carousel .slide.active { display: block; }
.carousel img { width: 100%; aspect-ratio: var(--ratio, 960 / 303); object-fit: cover; }
.carousel figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 12px; font-size: .85rem; color: #fff; background: rgba(0, 0, 0, .6); }
.carousel figcaption a { color: #ffd2b3; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.carousel-btn:hover { background: rgba(0, 0, 0, .75); }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-dots { position: absolute; top: 8px; right: 10px; display: flex; gap: 5px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: #fff; }

/* ---------- Layout helpers ---------- */
.two-col { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 0; } }

.card { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card h3 { margin-top: 0; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-top: 8px; }
.topic-grid .card { border-bottom: 0; }
.topic { display: block; color: inherit; }
.topic:hover { text-decoration: none; }
.topic:hover h3 { color: var(--orange-dark); text-decoration: underline; }
.topic img { aspect-ratio: 16 / 7; object-fit: cover; width: 100%; margin-bottom: 12px; }
.topic h3 { margin: 0 0 .3rem; }
.topic p { color: var(--ink-soft); margin: 0; }
.topic .more { display: inline-block; margin-top: 8px; color: var(--orange-dark); }

figure.wide { margin: 1.5rem 0; }
figure.wide figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; font-style: italic; }

/* ---------- News ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid #eee; }
.news-list li:last-child { border-bottom: 0; }
.news-list time, .news-list .nodate { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.news-list .text { color: var(--ink-soft); }
@media (max-width: 560px) { .news-list li { grid-template-columns: 1fr; gap: 0; } }

.year-nav { margin: 18px 0 6px; font-size: .95rem; color: var(--muted); }
.year-nav a { display: inline-block; margin-right: 10px; }

/* ---------- Publications ---------- */
.pub-year h2 { margin: 2.2rem 0 .6rem; }
.pub-list { margin: 0; padding: 0 0 0 1.6rem; }
.pub-year .pub-list, .pub-list { list-style: none; padding-left: 0; }
.pub-list li { margin: 0 0 14px; }
.pub-title { font-weight: 600; color: var(--ink); }
.pub-title:hover { color: var(--orange-dark); }
.pub-authors { display: block; color: var(--ink-soft); font-size: .95rem; }
.pub-venue { display: block; color: var(--muted); font-size: .93rem; }
.pub-venue i { color: var(--ink-soft); }
.pub-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.pub-tools input { flex: 0 1 380px; padding: 7px 10px; border: 1px solid #bbb; border-radius: 0; font: inherit; font-size: .95rem; }
.pub-count { font-size: .9rem; color: var(--muted); }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 20px; margin-top: 8px; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 0 0 8px; background: var(--bg-soft); }
.person .name { font-weight: 600; display: block; line-height: 1.3; }
.person .role { font-size: .9rem; color: var(--muted); display: block; }
.person.pi { display: flex; align-items: flex-start; gap: 24px; }
.person.pi img { width: 170px; margin: 0; }
.person.pi .name { font-family: var(--serif); font-size: 1.3rem; }
@media (max-width: 560px) { .person.pi { flex-direction: column; } .people-grid { grid-template-columns: repeat(2, 1fr); } }

.staff-list { list-style: none; padding: 0; margin: 0; }
.staff-list li { padding: 4px 0; }
.staff-list .role { color: var(--muted); }
.staff-list .role::after { content: ": "; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid #eee; vertical-align: top; }
table.data th { font-weight: 600; border-bottom: 1px solid var(--ink); }
table.data td:nth-child(2) { white-space: nowrap; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: 4px; }

/* ---------- Theses ---------- */
.thesis-list { list-style: none; padding: 0; margin: 0; }
.thesis-list li { padding: 5px 0; }
.thesis-list .who { font-weight: 600; }
.thesis-list .who::after { content: ". "; }

/* ---------- Video grid ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 8px; }
.contact-grid .card { border-bottom: 0; }
.contact-grid .card p { margin-bottom: .3rem; color: var(--ink-soft); }
.label { font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aab4c3; font-size: .92rem; padding: 32px 0 22px; }
.site-footer a { color: #dfe5ee; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-family: var(--serif); font-size: 1rem; margin: 0 0 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 3px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 14px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.notice { color: var(--ink-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }

@media (max-width: 560px) {
  h1, .hero h1 { font-size: 1.8rem; }
  .carousel figcaption { font-size: .75rem; padding: 4px 34px; }
  .topbar .container { gap: 2px 10px; padding-top: 5px; padding-bottom: 5px; }
}
