/* GRAIL — Grid Resilience and Artificial Intelligence Laboratory
   The University of Tulsa */

:root {
  --navy: #002855;          /* TU blue */
  --navy-deep: #001c3d;
  --navy-soft: #24507d;
  --accent: #7ba7d4;        /* light blue, for use on navy backgrounds only */
  --ink: #1a1a1a;
  --muted: #5c6470;
  --rule: #e3e6ea;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 940px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

a { color: var(--navy); text-decoration: none; border-bottom: 0; }
a:hover { color: var(--navy-soft); border-bottom: 1px solid var(--navy-soft); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.4rem; margin: 0 0 .3em; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 .9rem; }
h3 { font-size: 1.12rem; margin: 0 0 .35rem; }

p { margin: 0 0 1.1em; }

/* ---------- header / nav ---------- */
.site-head {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
}
.head-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: baseline; gap: 10px; border: 0; }
.brand:hover { border: 0; }
.brand .mark {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700;
  color: var(--navy); letter-spacing: .06em;
}
.brand .mark span { color: var(--navy-soft); }
.brand .sub {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); font-family: var(--sans);
}
nav.main { display: flex; flex-wrap: wrap; gap: 20px; }
nav.main a {
  font-size: .82rem; text-transform: lowercase; letter-spacing: .04em;
  color: var(--muted); border: 0; padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
nav.main a:hover { color: var(--navy); border-bottom-color: var(--navy); }
nav.main a.active { color: var(--navy); border-bottom-color: var(--navy); }

.nav-toggle { display: none; background: none; border: 1px solid var(--rule);
  border-radius: 5px; padding: 5px 9px; font-size: .9rem; color: var(--navy); cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: 62px 0 30px; }
.hero .eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--navy-soft); font-weight: 600; margin-bottom: 14px;
}
.hero h1 { font-size: 3rem; }
.hero .tagline {
  font-family: var(--serif); font-size: 1.32rem; color: var(--navy-soft);
  margin: .2em 0 1.4em; font-style: italic;
}
.lede { font-size: 1.06rem; max-width: 68ch; }

/* ---------- banner (navy block, white text) ---------- */
.banner {
  background: var(--navy);
  color: #fff;
  padding: 22px 26px; margin: 34px 0 8px; border-radius: 6px;
}
.banner .kicker {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.banner p { margin: .35em 0 0; font-size: .96rem; color: rgba(255,255,255,.92); }
.banner a { color: #fff; border-bottom-color: rgba(255,255,255,.5); }
.banner a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- sections ---------- */
.section { padding: 22px 0 8px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin: 2.8rem 0 1.4rem;
}
.section-head h2 { margin: 0; font-size: 1.35rem; }
/* first section under a hero needs less breathing room above it */
.hero + .section .section-head { margin-top: 1.2rem; }
.section-head .more { font-size: .8rem; color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.card {
  border: 1px solid var(--rule); border-radius: 7px; padding: 20px 22px;
  background: #fff; transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--navy-soft); transform: translateY(-2px); }
.card .tag {
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-soft); font-weight: 700; display: block; margin-bottom: 7px;
}
.card p { font-size: .93rem; color: var(--muted); margin: 0; }
.card p + p { margin-top: .7em; }

/* ---------- news table ---------- */
table.news { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.news td { padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.news td.date {
  width: 118px; white-space: nowrap; color: var(--muted);
  font-family: var(--mono); font-size: .78rem; padding-top: 15px;
}
table.news tr:last-child td { border-bottom: 0; }

/* ---------- photo frame (shared by every headshot) ---------- */
.photo {
  aspect-ratio: 1 / 1; overflow: hidden; flex: none;
  background: var(--bg-alt); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* geometric monogram, shown until a photo arrives */
.photo.mono {
  background:
    linear-gradient(135deg, rgba(0,40,85,.10) 0%, rgba(0,40,85,.10) 50%,
                            rgba(0,40,85,.05) 50%, rgba(0,40,85,.05) 100%),
    var(--bg-alt);
  position: relative;
}
.photo.mono::after {              /* thin concentric ring */
  content: ""; position: absolute; inset: 11%;
  border: 1px solid rgba(0,40,85,.16); border-radius: inherit;
}
.photo .initials {
  font-family: var(--serif); font-size: 1.75rem; font-weight: 600;
  color: var(--navy); letter-spacing: .08em; text-indent: .08em;
  position: relative; z-index: 1; line-height: 1;
}
.advisor .photo .initials, .director .photo .initials { font-size: 1.5rem; }

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
.person { text-align: center; }
.person .photo { width: 100%; max-width: 145px; border-radius: 50%; margin: 0 auto 11px; }
.person .name { font-weight: 600; font-size: .95rem; color: var(--navy); display: block; }
.person .role { font-size: .8rem; color: var(--muted); display: block; margin-top: 2px; }
.person .note { font-size: .78rem; color: var(--muted); display: block; margin-top: 5px; line-height: 1.45; }

.director { display: grid; grid-template-columns: 190px 1fr; gap: 34px; align-items: start; margin-bottom: 12px; }
.director .photo { width: 190px; border-radius: 6px; }
.director .role {
  font-size: .78rem; color: var(--navy-soft); text-transform: uppercase;
  letter-spacing: .09em; font-weight: 700; display: block; margin-bottom: 1rem;
}

/* ---------- core faculty ---------- */
.core-faculty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.faculty .photo { width: 100%; max-width: 190px; border-radius: 6px; margin-bottom: 14px; }
.faculty h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.faculty .role {
  font-size: .74rem; color: var(--navy-soft); text-transform: uppercase;
  letter-spacing: .09em; font-weight: 700; display: block; margin-bottom: .25rem;
}
.faculty .rank {
  font-size: .82rem; color: var(--muted); display: block; margin-bottom: .8rem;
  line-height: 1.4;
}
.faculty p { font-size: .88rem; color: var(--muted); margin: 0 0 .8em; line-height: 1.6; }
.faculty .foot-links { font-size: .8rem; gap: 10px 14px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .core-faculty { grid-template-columns: 1fr; gap: 34px; }
  .faculty .photo { max-width: 160px; }
}

/* ---------- advisors ---------- */
.advisors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.advisor { display: grid; grid-template-columns: 145px 1fr; gap: 20px; align-items: start; }
.advisor .photo { width: 145px; border-radius: 6px; }
.advisor .photo .initials { font-size: 1.4rem; }
.advisor h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.advisor .role {
  font-size: .78rem; color: var(--navy-soft); text-transform: uppercase;
  letter-spacing: .09em; font-weight: 700; display: block; margin-bottom: .6rem;
}
.advisor p { font-size: .9rem; color: var(--muted); margin: 0 0 .7em; }
.advisor .foot-links { font-size: .8rem; }

/* ---------- figures ---------- */
figure.fig { margin: 26px 0 8px; }
figure.fig img {
  width: 100%; display: block; border-radius: 6px; border: 1px solid var(--rule);
  background: var(--bg-alt);
}
figure.fig figcaption {
  font-size: .82rem; color: var(--muted); margin-top: 9px; line-height: 1.5;
}
.fig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0 8px; }
.fig-row figure.fig { margin: 0; }
figure.fig.lead img { max-height: 460px; object-fit: cover; object-position: center 42%; }

/* ---------- alumni ---------- */
.alum-list { list-style: none; padding: 0; margin: 0; }
.alum-list li {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.alum-list li:last-child { border-bottom: 0; }
.alum-list .photo { width: 46px; border-radius: 50%; }
.alum-list .photo .initials { font-size: .82rem; letter-spacing: .06em; }
.alum-list .photo.mono::after { inset: 14%; }
.alum-list .meta { display: flex; flex-direction: column; gap: 1px; }
.alum-list .who { font-weight: 600; color: var(--navy); font-size: .95rem; }
.alum-list .then { color: var(--muted); font-size: .84rem; }
.alum-list .now {
  margin-left: auto; font-size: .86rem; color: var(--navy-soft); white-space: nowrap;
}
@media (max-width: 620px) {
  .alum-list .now { margin-left: 62px; width: 100%; }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- publications ---------- */
.pub-list { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pub-list li {
  padding: 13px 0 13px 0; border-bottom: 1px solid var(--rule); font-size: .93rem; line-height: 1.6;
}
.pub-list li:last-child { border-bottom: 0; }
.pub-list .venue { color: var(--navy-soft); font-style: italic; }
.pub-list .yr { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.badge {
  display: inline-block; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--bg-alt); color: var(--navy-soft); border: 1px solid var(--rule);
  padding: 1px 7px; border-radius: 3px; font-weight: 700; margin-left: 6px; vertical-align: 1px;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 26px 0 6px; }
.stat { border-top: 2px solid var(--navy); padding-top: 12px; }
.stat .n { font-family: var(--serif); font-size: 1.85rem; color: var(--navy); line-height: 1.1; }
.stat .l { font-size: .78rem; color: var(--muted); margin-top: 3px; }

/* ---------- course ---------- */
.course { border: 1px solid var(--rule); border-radius: 7px; padding: 22px 24px; margin-bottom: 18px; }
.course .code { font-family: var(--mono); font-size: .78rem; color: var(--navy-soft); letter-spacing: .06em; }
.course ul { margin: .6em 0 0; padding-left: 1.15em; font-size: .93rem; color: var(--muted); }
.course li { margin-bottom: .35em; }

/* ---------- misc ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; padding: 0; list-style: none; }
.chips li {
  font-size: .8rem; color: var(--navy-soft); background: var(--bg-alt);
  border: 1px solid var(--rule); border-radius: 40px; padding: 4px 13px;
}
.note-muted { font-size: .86rem; color: var(--muted); font-style: italic; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 34px 0; }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 72px; background: var(--navy); color: rgba(255,255,255,.8);
  padding: 34px 0 40px; font-size: .84rem;
}
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot .foot-links a { color: rgba(255,255,255,.8); border: 0; }
.site-foot .foot-links a:hover { color: #fff; }

/* inline link rows on white (director / advisor cards) */
.foot-links a { color: var(--muted); border: 0; }
.foot-links a:hover { color: var(--navy); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
  .advisors { grid-template-columns: 1fr; gap: 24px; }
  .fig-row { grid-template-columns: 1fr; }
  figure.fig.lead img { max-height: 300px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .director { grid-template-columns: 1fr; }
  .director .photo { width: 150px; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 40px 0 20px; }
  .nav-toggle { display: block; }
  nav.main { display: none; width: 100%; flex-direction: column; gap: 12px; padding-top: 14px; }
  nav.main.open { display: flex; }
  .head-inner { flex-wrap: wrap; }
  table.news td.date { width: 88px; font-size: .72rem; }
}
