/* ==========================================================================
   Sallam Research Lab — site styles
   Colors and spacing are defined once here; change the tokens to re-theme.
   ========================================================================== */

:root {
  --ink: #1f2933;          /* body text */
  --ink-soft: #52606d;     /* secondary text */
  --ink-faint: #9aa5b1;    /* captions, meta */
  --navy: #14293d;         /* header / dark panels */
  --navy-2: #1d3a55;
  --accent: #d9541e;       /* OSU-orange accent, slightly tempered */
  --accent-soft: #fbe9df;
  --paper: #fbfaf7;        /* page background */
  --card: #ffffff;
  --line: #e4e7eb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 41, 61, .06), 0 8px 24px -12px rgba(20, 41, 61, .18);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 68ch;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header & navigation ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--accent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 10px 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: conic-gradient(from 210deg, var(--accent) 0 35%, #f08a5a 35% 60%, #ffd3bd 60% 100%); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.brand-tagline { font-size: .78rem; color: #c3cfdb; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: #e6edf3; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  display: block; width: 22px; height: 2px; background: #fff; position: relative; transition: transform .2s; content: ""; }
.nav-toggle-label span::before { position: absolute; top: -7px; }
.nav-toggle-label span::after { position: absolute; top: 7px; }
@media (max-width: 860px) {
  .nav-toggle-label { display: flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-2); flex-direction: column; padding: 8px; gap: 2px; box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle-label span::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span::after { transform: translateY(-7px) rotate(-45deg); }
  .brand-tagline { display: none; }
}

/* ---------- Page header & sections ---------- */
.page-hero { background: var(--navy-2); color: #fff; padding: clamp(36px, 6vw, 64px) 0; }
.page-hero h1 { color: #fff; margin-bottom: .25em; }
.page-hero p { color: #d5dee7; max-width: var(--measure); margin: 0; font-size: 1.1rem; }
.section { padding: clamp(36px, 6vw, 64px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: #f3f1ec; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; display: block; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 2px solid transparent; transition: background .15s, color .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #bf4716; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Home hero ---------- */
.home-hero { position: relative; color: #fff; isolation: isolate; min-height: clamp(420px, 60vh, 620px); display: flex; align-items: center; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../img/1865748567.jpg") center 60% / cover no-repeat; }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(14,30,46,.92) 0%, rgba(14,30,46,.78) 45%, rgba(14,30,46,.45) 100%); }
.home-hero .container { padding: clamp(48px, 8vw, 96px) 0; }
.home-hero h1 { color: #fff; max-width: 22ch; }
.home-hero .lede { color: #dbe4ec; }
.home-hero .eyebrow { color: #ffb48f; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-body { padding: 18px 20px 20px; }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #e9ecef; }
.card-img.contain { object-fit: contain; background: #fff; padding: 10px; }
.feature { display: grid; gap: 32px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.feature img { border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-row { display: flex; flex-wrap: wrap; gap: 20px 40px; margin-top: 28px; }
.stat { display: flex; flex-direction: column; }
.stat b { font-family: var(--serif); font-size: 2rem; color: var(--navy); line-height: 1; }
.stat span { color: var(--ink-soft); font-size: .9rem; }

/* ---------- People ---------- */
.people { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.person { text-align: center; }
.person img, .person .placeholder { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: center 25%; margin: 0 auto 12px; border: 4px solid #fff; box-shadow: var(--shadow); background: #dfe3e8; }
.person .placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 2.2rem; color: var(--navy); font-weight: 600; }
.person h3 { font-size: 1.05rem; margin-bottom: 2px; font-family: var(--sans); font-weight: 600; }
.person p { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.alumni { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.alum { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.alum img, .alum .placeholder { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: #dfe3e8; }
.alum .placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 1.3rem; color: var(--navy); font-weight: 600; }
.alum-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.alum-head strong { font-size: 1.05rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: #9a3a0f; }
.badge-grad { background: #e1ecf7; color: #1f4b78; }
.badge-ug { background: #e6f2e8; color: #1f6b3a; }
.alum .thesis { font-style: italic; color: var(--ink); margin: 2px 0 0; }
.alum .meta { color: var(--ink-faint); font-size: .9rem; margin: 2px 0 0; }
.simple-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.simple-list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.simple-list li span { display: block; color: var(--ink-soft); font-size: .9rem; }

/* ---------- Galleries ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; transition: transform .25s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: .85rem; color: var(--ink-soft); padding: 8px 10px 10px; line-height: 1.4; }
.gallery.portraits img { aspect-ratio: 1 / 1; }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gallery.contain img { object-fit: contain; background: #f3f1ec; }

/* ---------- Publications ---------- */
.pub-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 0; list-style: none; }
.pub-nav a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .9rem; color: var(--navy); }
.pub-nav a:hover { border-color: var(--accent); text-decoration: none; }
.pubs { padding-left: 2.6em; margin: 0; }
.pubs li { margin-bottom: .85em; padding-left: .3em; }
.pubs li::marker { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.pubs u { text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.pubs a { word-break: break-word; }
.pub-note { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Teaching ---------- */
.course { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.course-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.course-code { font-family: var(--sans); font-weight: 600; color: var(--accent); font-size: .95rem; letter-spacing: .02em; }
.course h3 { margin: 0; }
.course .prereq { color: var(--ink-soft); font-size: .92rem; margin: 8px 0 0; }
.course .resources { margin: 10px 0 0; padding-left: 1.1em; font-size: .95rem; }
details.videos { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.videos summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
details.videos summary::-webkit-details-marker { display: none; }
details.videos summary::before { content: "▸"; color: var(--accent); transition: transform .2s; }
details.videos[open] summary::before { transform: rotate(90deg); }
.video-group h4 { font-family: var(--sans); font-size: .95rem; color: var(--ink-soft); margin: 16px 0 10px; font-weight: 600; }
.video-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.video { background: #14293d; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.video .frame { position: relative; aspect-ratio: 16 / 9; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #111 center / cover no-repeat; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video .yt::after { content: ""; width: 60px; height: 42px; border-radius: 12px; background: rgba(217,84,30,.95) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M8 5v14l11-7z'/></svg>") center / 26px no-repeat; }
.video .yt:hover::after { background-color: #bf4716; }
.video figcaption { color: #cfd6dd; font-size: .85rem; padding: 8px 10px; background: #14293d; flex: 1; }

/* ---------- News ---------- */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.news-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; gap: 16px; grid-template-columns: 1fr; }
.news-item .date { color: var(--accent); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; display: block; }
.news-item h3 { margin-bottom: .4em; }
.news-item .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.news-item .gallery img { aspect-ratio: 4 / 3; object-fit: contain; background: #f3f1ec; }
.year-heading { font-family: var(--sans); font-size: .9rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .12em; margin: 36px 0 14px; display: flex; align-items: center; gap: 12px; }
.year-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.news-teaser { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.news-teaser .card-body .date { color: var(--accent); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-list li { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.link-list a { font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d3dd; margin-top: 48px; padding: 40px 0 24px; font-size: .95rem; }
.footer-inner { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.footer-title { color: #fff; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 6px; }
.site-footer a { color: #ffb48f; }
.footer-meta { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; color: #8d9bab; font-size: .85rem; }
.footer-meta p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10, 20, 30, .92); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: 82vh; max-width: 100%; width: auto; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #dbe4ec; margin-top: 12px; text-align: center; font-size: .95rem; }
.lightbox-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1; }

/* ---------- Utilities ---------- */
.two-col { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 0 10px 10px 0; }
.callout p:last-child { margin: 0; }
.book { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; }
.book img { border-radius: 6px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .book { grid-template-columns: 1fr; } .alum { grid-template-columns: 1fr; } .alum img, .alum .placeholder { display: none; } }
@media print { .site-header, .site-footer, .btn-row, .lightbox { display: none !important; } body { background: #fff; } }
