/* Site design: burnt orange top bar, warm white page, black text,
   orange tagline, labels and headings. Used by _layouts/site.html and the layouts
   built on it. */

:root {
  --orange: #bf5700;       /* UT burnt orange: bars and large headings */
  --orange-text: #a84b00;  /* slightly darker for small text on eggshell (readable contrast) */
  --on-orange: #ffffff;
  --paper: #f8f3ea;        /* warm white */
  --ink: #111111;
  --ink-muted: rgba(17, 17, 17, 0.68);
  --rule: rgba(17, 17, 17, 0.2);
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Crimson Pro", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 8px 14px; font-family: var(--sans); font-size: 14px;
}
.skip:focus { left: 16px; top: 16px; }

/* Header (orange bar) */
.site-header { padding: 28px 0; background: var(--orange); color: var(--on-orange); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.name { font-family: var(--sans); font-weight: 600; font-size: 24px; text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Each menu link is an outlined box; the current page is filled white */
.site-nav a { font-size: 17px; line-height: 1.3; text-decoration: none; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.7); }
.site-nav a:hover { background: rgba(255, 255, 255, 0.15); }
.site-nav a[aria-current] { background: var(--on-orange); border-color: var(--on-orange); color: var(--orange); }

/* Home hero: photo and orange tagline */
.hero { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.arch { width: 220px; aspect-ratio: 220 / 290; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--rule); }
.arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero h1 { font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.22; letter-spacing: -0.015em; margin: 0; max-width: 20ch; color: var(--orange); }
/* Intro text lines up under the tagline (photo width + gap) */
.home-intro { margin-left: 276px; max-width: 680px; }

/* Page title (non-home pages) */
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-family: var(--sans); font-weight: 600; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 4px; color: var(--orange); }
.sub { font-family: var(--sans); font-style: italic; color: var(--orange-text); font-size: 18px; margin: 0; }

/* Labeled sections: small orange label + rule on the left, text on the right */
.section { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding: 0 0 64px; }
.label { display: flex; align-items: center; justify-content: flex-end; gap: 28px; min-height: 33px; align-self: start; }
.label::before { content: ""; width: 84px; border-top: 1px solid var(--orange); }
.label span { font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; min-width: 92px; color: var(--orange-text); }
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p { margin: 0 0 1em; }
.body ul { margin: 0; padding-left: 1.1em; }
.body li { margin: 0 0 0.35em; }

/* Research / publication list */
.items { margin-top: 8px; }
.item { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding: 32px 0; border-top: 1px solid var(--rule); }
.item h3 { font-family: var(--sans); font-weight: 600; font-size: 21px; line-height: 1.3; margin: 0 0 6px; color: var(--orange); }
.item h3 .translation { font-weight: 500; }
.item .role { font-style: italic; color: var(--orange-text); margin: 0 0 16px; font-size: 19px; }
.item .desc p { margin: 0 0 0.4em; }
.item .desc > :first-child { margin-top: 0; }
.item .desc > :last-child { margin-bottom: 0; }
.btn { display: inline-block; font-family: var(--sans); font-size: 14px; line-height: 1.4; padding: 8px 18px; border: 1px solid var(--orange-text); color: var(--orange-text); text-decoration: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

/* CV entries: date on the left, details on the right */
.entries { display: grid; gap: 20px; }
.entry { display: grid; grid-template-columns: 120px 1fr; gap: 20px; line-height: 1.5; }
.entry .when { font-family: var(--sans); font-size: 15px; color: var(--ink-muted); padding-top: 3px; }
.entry .title { font-weight: 500; }
.entry .subtitle { margin-top: 2px; }
.entry .detail { margin-top: 2px; font-size: 18px; color: var(--ink-muted); }

/* Sub-sections within a page (e.g. Projects, Presentations) */
.group { padding-bottom: 64px; }
.subhead { font-family: var(--sans); font-weight: 600; font-size: 28px; letter-spacing: -0.01em; color: var(--orange); margin: 0 0 12px; }

.page-intro { margin: 0 0 48px; }

/* Embedded videos (Personal page) */
.video-block { max-width: 760px; padding-bottom: 64px; }
.video-block .body { margin-bottom: 20px; }
.video { aspect-ratio: 16 / 9; width: 100%; background: var(--rule); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

.page-body { padding-bottom: 64px; }

/* Main grows so the footer sits at the bottom of short pages */
main { flex: 1 0 auto; }

/* Less space after the last block on a page, before the footer */
main > .wrap > :last-child { padding-bottom: 48px; }
.page-body > :last-child { padding-bottom: 0; margin-bottom: 0; }
.page-body > :last-child .item:last-child { padding-bottom: 0; }
.page-body > p { max-width: 760px; margin: 0 0 1em; }

/* Full-text articles (e.g. /writing/water/) */
.article { max-width: 760px; }
.article p { margin: 0 0 1.1em; }
.article-source { font-family: var(--sans); font-size: 15px; color: var(--ink-muted); border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 32px; }

/* Footer: copyright and profile icons */
.site-footer { padding: 0 0 40px; font-family: var(--sans); font-size: 14px; color: var(--ink-muted); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 20px; }
.icons { display: flex; gap: 16px; }
.icons a { display: inline-flex; color: var(--ink); }
.icons a:hover { color: var(--orange); }
.icons svg { width: 20px; height: 20px; }
.icons .orcid-id { fill: var(--paper); }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-nav { gap: 8px; }
  .site-nav a { font-size: 16px; padding: 5px 10px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; padding-bottom: 56px; }
  .arch { width: 180px; }
  .home-intro { margin-left: 0; }
  .page-head { padding: 32px 0 16px; }
  .section, .item { grid-template-columns: 1fr; gap: 12px; }
  .section { padding-bottom: 48px; }
  .label { justify-content: flex-start; gap: 16px; height: auto; }
  .label::before { width: 48px; }
  .label span { min-width: 0; }
  .entry { grid-template-columns: 1fr; gap: 0; }
  .entry .when { padding-top: 0; }
}
