@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Newsreader-italic-latin-ext-903f5a.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Newsreader-italic-latin-3ac4b0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Newsreader-normal-latin-ext-945685.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/Newsreader-normal-latin-3c940d.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Newsreader-normal-latin-ext-945685.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/Newsreader-normal-latin-3c940d.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================================
   Hakan Emekci — academic site. Pure CSS, self-hosted fonts, no external requests.
   Fonts: Newsreader (Production Type), SIL Open Font License (fonts/OFL.txt).
   ===================================================================== */

:root {
  --paper:      #faf7f2;
  --paper-2:    #f3ede4;
  --card:       #fffdf9;
  --ink:        #1d1a17;
  --ink-soft:   #574f48;
  --ink-faint:  #857b72;
  --rule:       #e5ddd1;
  --rule-strong:#d3c7b7;
  --accent:     #7d1f2c;
  --accent-lit: #a12a3b;
  --accent-bg:  #f4e6e4;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  var(--serif);   /* one typeface across the site */
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 19.5rem;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #15120f;
    --paper-2:    #1d1915;
    --card:       #1a1612;
    --ink:        #ece6dc;
    --ink-soft:   #bdb3a7;
    --ink-faint:  #8f857a;
    --rule:       #2e2821;
    --rule-strong:#40372e;
    --accent:     #e39aa2;
    --accent-lit: #f0b7bd;
    --accent-bg:  #2a1a1c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--serif);
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
a:hover { color: var(--accent-lit); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }
em { font-style: italic; }
code { font-family: var(--mono); font-size: .88em; }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; padding: .5rem .9rem;
        background: var(--accent); color: var(--paper); font-family: var(--sans); }
.skip:focus { left: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =====================================================================
   Shell: fixed sidebar + reading column
   ===================================================================== */

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
  box-shadow: inset 4px 0 0 var(--accent);          /* the "spine" */
  font-family: var(--sans);
  scrollbar-width: thin;
}
.profile { padding: 2.6rem 2rem 2rem 2.4rem; }

.portrait-link { display: inline-block; }
.portrait {
  display: block; width: 7.25rem; height: 7.25rem; object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 6px 6px 0 var(--accent-bg), 0 1px 0 var(--rule-strong);
  filter: saturate(.92);
}
.identity { margin-top: 1.35rem; }
.pretitle { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.name { margin: .2rem 0 .55rem; font: 500 1.85rem/1.1 var(--serif); letter-spacing: -.01em; }
.name a { color: var(--ink); text-decoration: none; }
.role { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.role.founder { margin-top: .45rem; color: var(--ink-faint); }
.metrics-note a { color: inherit; }

.menu-toggle, .menu-button { display: none; }

.nav { display: flex; flex-direction: column; margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.nav a {
  position: relative; display: block; padding: .62rem 0 .62rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft); text-decoration: none; font-size: .92rem; letter-spacing: .01em;
  transition: color .2s, padding-left .2s;
}
.nav a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--rule-strong); transition: background .2s, transform .2s;
}
.nav a:hover { color: var(--ink); padding-left: 1.2rem; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav a[aria-current="page"]::before { background: var(--accent); transform: scale(1.6); }
.nav .nav-portal { margin-top: .9rem; border-top: 1px solid var(--rule); font-size: .82rem; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem .8rem; margin: 2rem 0 0; }
.metrics div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.metrics dt { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); line-height: 1.3; }
.metrics dd { margin: 0; font: 500 1.7rem/1 var(--serif); color: var(--accent); font-variant-numeric: lining-nums; }
.metrics-note { margin: .7rem 0 0; font-size: .7rem; color: var(--ink-faint); }

.profiles { list-style: none; margin: 1.8rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--rule);
            display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .8rem; font-size: .8rem; }
.profiles a { color: var(--ink-soft); text-decoration: none; }
.profiles a::after { content: " \2197"; font-size: .75em; color: var(--ink-faint); }
.profiles a:hover { color: var(--accent); }

.side-actions { display: flex; gap: .5rem; margin: 1.6rem 0 0; }
.side-contact { margin: 1.4rem 0 0; font-style: normal; font-size: .76rem; line-height: 1.55; color: var(--ink-faint); }
.side-contact a { color: var(--ink-soft); text-decoration: none; }

.button {
  display: inline-block; padding: .5rem .95rem; border: 1px solid var(--accent); border-radius: 2px;
  background: var(--accent); color: var(--paper); font: 600 .8rem/1.2 var(--sans); letter-spacing: .03em;
  text-decoration: none; transition: background .2s, color .2s;
}
.button:hover { background: var(--accent-lit); border-color: var(--accent-lit); color: var(--paper); }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover { background: var(--accent-bg); color: var(--accent); }

/* ---------- reading column ---------- */
.content { padding: 4.6rem clamp(2rem, 6vw, 6.5rem) 3rem; max-width: 60rem; }
.content > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.content > *:nth-child(2) { animation-delay: .08s; }
.content > *:nth-child(3) { animation-delay: .16s; }
.content > *:nth-child(4) { animation-delay: .24s; }
.content > *:nth-child(n+5) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page-head { max-width: var(--measure); margin-bottom: 1rem; }
.eyebrow {
  display: flex; align-items: center; gap: .7rem; margin: 0 0 1.1rem;
  font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; flex: 0 0 2.2rem; height: 1px; background: currentColor; }
h1 { margin: 0; font: 500 clamp(2.4rem, 4.2vw, 3.4rem)/1.05 var(--serif); letter-spacing: -.02em; }
.statement { font-weight: 400; font-size: clamp(1.9rem, 3.1vw, 2.65rem); line-height: 1.18; letter-spacing: -.015em; }
.statement em { color: var(--accent); }
.lead { margin: 1.3rem 0 0; font-size: 1.22rem; line-height: 1.55; color: var(--ink-soft); }
.lead .button { display: block; width: fit-content; margin-top: 1.1rem; }

.band { margin-top: 4.2rem; padding-top: 2.4rem; border-top: 1px solid var(--rule); }
.band.first { margin-top: 2.6rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-title { position: relative; margin: 0 0 1.6rem; padding-bottom: .7rem;
                 font: 500 1.65rem/1.2 var(--serif); letter-spacing: -.01em; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.2rem; height: 2px; background: var(--accent); }
.more { font: 600 .8rem var(--sans); letter-spacing: .03em; text-decoration: none; white-space: nowrap; }
.subhead { margin: 2.2rem 0 1rem; font: 600 .76rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.content p { max-width: var(--measure); }
.content h3 { font-family: var(--serif); }

.badge {
  display: inline-block; padding: .16rem .5rem; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px; font: 600 .64rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg); white-space: nowrap; vertical-align: .15em;
}
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .9rem 0 0; }
.tags span { padding: .12rem .5rem; border: 1px solid var(--rule-strong); border-radius: 2px;
             font: .7rem/1.4 var(--sans); color: var(--ink-soft); }
.meta { font: .8rem/1.55 var(--sans); color: var(--ink-faint); }

/* =====================================================================
   Home
   ===================================================================== */

.home-head { max-width: 48rem; }
.about-band { margin-top: 2.6rem; }
.about-lead { max-width: 46rem; margin: 0 0 2rem; font-size: 1.22rem; line-height: 1.6; color: var(--ink-soft); }
.about-lead strong { color: var(--ink); font-weight: 600; }
.about-background { padding: 1.8rem 2rem 1.2rem; background: var(--card); border: 1px solid var(--rule);
                    border-top: 3px solid var(--accent); }
.about-background > .subhead:first-of-type, .about-background > .subhead:nth-of-type(3) { margin-top: 0; }

.course-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; padding: 1.2rem 1.2rem 1rem; background: var(--card);
  border: 1px solid var(--rule); border-top: 3px solid var(--accent);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px -18px rgba(60, 20, 20, .45); }
.tile .code { margin: 0; font: 600 .7rem var(--sans); letter-spacing: .14em; color: var(--accent); }
.tile h3 { margin: .35rem 0 0; font-size: 1.12rem; font-weight: 500; line-height: 1.28; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a:hover { color: var(--accent); }
.tile-links { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: auto 0 0; padding-top: 1rem; font: .78rem var(--sans); }
.tile-links a { text-decoration: none; }
.content p.projects-strip { max-width: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.8rem; margin: 1.4rem 0 0;
                  padding-top: 1rem; border-top: 1px dotted var(--rule-strong); font: .9rem var(--sans); color: var(--ink-soft); }
.strip-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }


.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; max-width: var(--measure); }
.contact-grid .subhead { margin-top: 1.2rem; }
.contact-grid p { margin: 0; }

.note { max-width: var(--measure); margin-top: 2.2rem; padding: 1.1rem 1.3rem; background: var(--paper-2); border-left: 3px solid var(--accent); }
.note p { margin: 0; }

/* ---------- press ---------- */
.press { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.press li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: .2rem 1.2rem; align-items: baseline;
            padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.press .outlet { font: 600 .74rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.press .date { font: .78rem var(--sans); color: var(--ink-faint); white-space: nowrap; }

/* =====================================================================
   Publications
   ===================================================================== */

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.8rem; }
.chip { padding: .38rem .85rem; border: 1px solid var(--rule-strong); border-radius: 999px;
        font: 600 .78rem/1.2 var(--sans); color: var(--ink-soft); text-decoration: none; transition: all .2s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.pub-group { margin-top: 3.2rem; }
.pub-group:first-of-type { margin-top: 2.6rem; }

ol.pubs { list-style: none; margin: 0; padding: 0; max-width: 50rem; }
.pubs li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); column-gap: 1.2rem;
           padding: 1.05rem 0; border-bottom: 1px solid var(--rule); }
.pubs li:first-child { border-top: 1px solid var(--rule); }
.pubs .year { grid-row: 1 / span 4; font: 400 1.5rem/1.2 var(--serif); color: var(--accent);
              font-variant-numeric: oldstyle-nums; }
.pubs .authors, .pubs .ptitle, .pubs .venue, .pubs .meta { grid-column: 2; display: block; }
.pubs .authors { font: .82rem/1.5 var(--sans); color: var(--ink-soft); }
.pubs .authors strong { color: var(--ink); }
.pubs .ptitle { margin: .15rem 0 .2rem; font: 500 1.14rem/1.35 var(--serif); color: var(--ink); }
.pubs .venue { font-size: .98rem; color: var(--ink-soft); }
.pubs .meta { margin-top: .35rem; }
.pubs .idx { display: inline-block; margin-right: .4rem; padding: .08rem .45rem; border-radius: 2px;
             background: var(--accent-bg); color: var(--accent); font-weight: 600; font-size: .7rem; letter-spacing: .04em; }
.cites { color: var(--accent); font-weight: 600; }

/* =====================================================================
   Research: cards, projects, figures, repos
   ===================================================================== */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.card { padding: 1.4rem 1.4rem 1.2rem; background: var(--card); border: 1px solid var(--rule); border-top: 2px solid var(--accent); }
.card h3 { margin: 0 0 .6rem; font-size: 1.2rem; font-weight: 500; line-height: 1.25; }
.card p { margin: 0; font-size: .98rem; line-height: 1.55; color: var(--ink-soft); }
.card .tags { margin-top: 1rem; }

.proj { max-width: 50rem; padding: 1.5rem 0 1.4rem; border-bottom: 1px solid var(--rule); }
.proj-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.proj-head h3 { margin: 0; font-size: 1.22rem; font-weight: 500; line-height: 1.3; }
.proj p { margin: .6rem 0 0; }

.figure { max-width: 50rem; margin: 2.4rem 0 0; padding: 1.6rem 1.4rem 1.2rem; background: var(--card); border: 1px solid var(--rule); }
.figure-inset { margin-top: 1.4rem; }
.figure figcaption { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--rule);
                     font: .82rem/1.55 var(--sans); color: var(--ink-soft); }
.diagram { display: block; width: 100%; height: auto; overflow: visible; }
.diagram .box        { fill: none; stroke: var(--rule-strong); stroke-width: 1.25; }
.diagram .box.accent { stroke: var(--accent); stroke-width: 1.75; fill: var(--accent-bg); }
.diagram text        { font-family: var(--sans); font-size: 14px; fill: var(--ink); }
.diagram .lab.strong { fill: var(--accent); font-weight: 600; }
.diagram .cap        { font-size: 11.5px; letter-spacing: .06em; fill: var(--ink-faint); }
.diagram .cap.accent-t   { fill: var(--accent); }
.diagram .cap.boundary-t { fill: var(--ink-faint); }
.diagram .arrow          { fill: none; stroke: var(--ink-faint); stroke-width: 1.25; }
.diagram .arrow.accent-s { stroke: var(--accent); stroke-width: 1.75; }
.diagram .head           { fill: var(--ink-faint); }
.diagram .boundary       { stroke: var(--accent); stroke-width: 1.25; stroke-dasharray: 5 5; opacity: .75; }

.repos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.repos li { padding: 1.1rem 1.2rem; background: var(--card); border: 1px solid var(--rule); }
.repos a { text-decoration: none; }
.repos code { font-size: .86rem; font-weight: 600; }
.repos .lang { float: right; font: .7rem var(--sans); color: var(--ink-faint); }
.repos p { margin: .45rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }

/* =====================================================================
   Teaching
   ===================================================================== */

.courses-now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; max-width: 50rem; }
.course { padding: 1.5rem 1.5rem 1.3rem; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--accent); }
.course .code { margin: 0; font: 600 .74rem var(--sans); letter-spacing: .14em; color: var(--accent); }
.course h3 { margin: .3rem 0 .2rem; font-size: 1.4rem; font-weight: 500; line-height: 1.2; }
.course .level { margin: 0; font: .8rem var(--sans); color: var(--ink-faint); }
.course-links { display: flex; gap: .5rem; margin: 1.2rem 0 0; }
.course-list { list-style: none; margin: 0; padding: 0; max-width: 50rem; }
.course-list li { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--rule); }
.course-list .code { font: 600 .78rem var(--sans); letter-spacing: .06em; color: var(--ink-soft); }
.course-list .level { font: .78rem var(--sans); color: var(--ink-faint); }

table.courses { width: 100%; max-width: 50rem; border-collapse: collapse; font-family: var(--sans); font-size: .88rem; }
.courses th { padding: .5rem .6rem .5rem 0; text-align: left; font-size: .68rem; font-weight: 600; letter-spacing: .12em;
              text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--rule-strong); }
.courses td { padding: .6rem .6rem .6rem 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.courses td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }

ol.theses { list-style: none; margin: 1.2rem 0 0; padding: 0; max-width: 50rem; counter-reset: th; }
.theses li { position: relative; padding: 1rem 0 1rem 2.6rem; border-bottom: 1px solid var(--rule); counter-increment: th; }
.theses li::before { content: counter(th, decimal-leading-zero); position: absolute; left: 0; top: 1.05rem;
                     font: .8rem var(--sans); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.theses .student { display: block; font: 600 .86rem var(--sans); color: var(--ink); }
.theses .thesis { display: block; margin: .15rem 0; font-size: 1.05rem; line-height: 1.4; }
.theses .tmeta { display: block; font: .78rem var(--sans); color: var(--ink-faint); }
.theses .ongoing { display: inline-block; padding: .05rem .45rem; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 600; }

/* =====================================================================
   CV: timelines
   ===================================================================== */

ol.timeline { list-style: none; margin: 0; padding: 0; max-width: 50rem; }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 1.4rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.timeline .when { grid-row: 1 / span 3; font: 600 .78rem/1.8 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline .what, .timeline .detail { grid-column: 2; display: block; }
.timeline .what { font-size: 1.05rem; line-height: 1.4; }
.timeline .detail { margin-top: .2rem; font-size: .95rem; color: var(--ink-soft); }
.timeline .srcs { display: block; margin-top: .35rem; font: .78rem var(--sans); color: var(--ink-faint); }

.cv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.6rem; }
.cv-two > .subhead:first-of-type { grid-column: 1; grid-row: 1; margin-top: 0; }
.cv-two > .timeline:first-of-type { grid-column: 1; grid-row: 2; }
/* left: academic, then professional appointments; right: education */
.cv-two > .subhead:nth-of-type(2) { grid-column: 1; grid-row: 3; }
.cv-two > .timeline:nth-of-type(2) { grid-column: 1; grid-row: 4; }
.cv-two > .subhead:nth-of-type(3) { grid-column: 2; grid-row: 1; margin-top: 0; }
.cv-two > .timeline:nth-of-type(3) { grid-column: 2; grid-row: 2 / span 3; align-self: start; }
.cv-two .timeline li { grid-template-columns: 6.3rem minmax(0, 1fr); column-gap: 1rem; }

.cv-timeline .proj { position: relative; padding-left: 1.6rem; border-bottom: 0; border-left: 1px solid var(--rule-strong); }
.cv-timeline .proj::before { content: ""; position: absolute; left: -5px; top: 1.95rem; width: 9px; height: 9px;
                             border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.cv-timeline > p.lead { margin-top: 0; margin-bottom: 1rem; font-size: 1.08rem; }

ul.plain { max-width: var(--measure); margin: 0; padding-left: 1.1rem; }
ul.plain li { margin: .45rem 0; }

/* =====================================================================
   Submission portal
   ===================================================================== */

.portal { max-width: 40rem; margin-top: 2.4rem; font-family: var(--sans); }
.step { margin: 0 0 1.2rem; padding: 1.4rem 1.5rem 1rem; background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--accent); }
.step[aria-disabled="true"] { opacity: .45; pointer-events: none; border-left-color: var(--rule-strong); }
.step h2 { margin: 0 0 .9rem; font: 500 1.2rem/1.2 var(--serif); color: var(--ink); }
.portal label { display: block; margin: .8rem 0 .3rem; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-soft); }
.portal input, .portal select {
  width: 100%; padding: .6rem .7rem; font: .95rem var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 2px;
}
.portal input:focus, .portal select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.portal button {
  margin: 1rem 0 .4rem; padding: .6rem 1.2rem; border: 0; border-radius: 2px; cursor: pointer;
  background: var(--accent); color: var(--paper); font: 600 .85rem var(--sans); letter-spacing: .03em;
}
.portal button:hover { background: var(--accent-lit); }
.portal button:disabled { opacity: .5; cursor: default; }
.msg { min-height: 1.2em; margin: .3rem 0; font-size: .86rem; }
.msg.error { color: #b3261e; }
.msg.ok { color: #1b7f3b; }
@media (prefers-color-scheme: dark) { .msg.error { color: #ff8a80; } .msg.ok { color: #7fd99a; } }
progress { width: 100%; height: .6rem; accent-color: var(--accent); }
.receipt { font: .82rem/1.6 var(--mono); white-space: pre-wrap; background: var(--paper-2); padding: .9rem 1rem; }
.fine { font-size: .78rem; color: var(--ink-faint); }

/* =====================================================================
   Footer
   ===================================================================== */

.footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 5rem; padding-top: 1.3rem;
          border-top: 1px solid var(--rule); font: .76rem var(--sans); color: var(--ink-faint); }
.footer p { margin: 0; }

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 1180px) {
  :root { --side-w: 17rem; }
  .profile { padding: 2.2rem 1.5rem 1.8rem 1.9rem; }
  .course-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; overflow: visible; border-right: 0;
             border-bottom: 1px solid var(--rule); box-shadow: inset 0 3px 0 var(--accent); }
  .profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .9rem; padding: .8rem 1.2rem; }
  .portrait { width: 2.9rem; height: 2.9rem; border-width: 2px; box-shadow: 3px 3px 0 var(--accent-bg); }
  .identity { margin: 0; }
  .pretitle { font-size: .6rem; }
  .name { margin: 0; font-size: 1.25rem; }
  .role { display: none; }
  .menu-button { display: block; width: 2.4rem; height: 2.4rem; cursor: pointer; position: relative; }
  .menu-button span, .menu-button span::before, .menu-button span::after {
    position: absolute; left: .55rem; right: .55rem; height: 2px; background: var(--ink); content: ""; transition: transform .25s, top .25s; }
  .menu-button span { top: 50%; }
  .menu-button span::before { left: 0; right: 0; top: -6px; }
  .menu-button span::after { left: 0; right: 0; top: 6px; }
  .menu-toggle { display: block; position: absolute; opacity: 0; width: 2.4rem; height: 2.4rem; right: 1.2rem; }
  .menu-toggle:checked ~ .menu-button span { background: transparent; }
  .menu-toggle:checked ~ .menu-button span::before { top: 0; transform: rotate(45deg); }
  .menu-toggle:checked ~ .menu-button span::after { top: 0; transform: rotate(-45deg); }
  .side-body { display: none; grid-column: 1 / -1; padding: .6rem 0 1rem; }
  .menu-toggle:checked ~ .side-body { display: block; }
  .menu-toggle:focus-visible ~ .menu-button { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav { margin-top: .6rem; }
  .content { padding: 2.6rem 1.4rem 2rem; }
  .cards, .repos, .courses-now, .cv-two { grid-template-columns: minmax(0, 1fr); }
  .cv-two > * { grid-column: 1 !important; grid-row: auto !important; }
  .cv-two > .subhead:nth-of-type(n+2) { margin-top: 2rem; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .press li { grid-template-columns: minmax(0, 1fr) auto; }
  .press .outlet { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .course-tiles { grid-template-columns: minmax(0, 1fr); }
  .about-background { padding: 1.3rem 1.1rem .8rem; }
  .about-lead { font-size: 1.1rem; }
  .pubs li { grid-template-columns: minmax(0, 1fr); }
  .pubs .year { grid-row: auto; font-size: 1.1rem; }
  .pubs .authors, .pubs .ptitle, .pubs .venue, .pubs .meta { grid-column: 1; }
  .timeline li, .cv-two .timeline li { grid-template-columns: minmax(0, 1fr); }
  .timeline .when { grid-row: auto; }
  .timeline .what, .timeline .detail { grid-column: 1; }
  .course-list li { grid-template-columns: 5rem minmax(0, 1fr); }
  .course-list .level { display: none; }
  .proj-head { flex-direction: column; gap: .35rem; }
  .footer { flex-direction: column; gap: .3rem; }
  .diagram text { font-size: 16px; }
  .diagram .cap { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .skip, .chips, .portal { display: none; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .band { break-inside: avoid-page; }
}

/* =====================================================================
   Refinements after review on a 1545x784 screen
   ===================================================================== */

/* sidebar: no visible scrollbar, compact on short screens */
.sidebar { scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
@media (min-width: 901px) and (max-height: 900px) {
  .profile { padding-top: 1.8rem; padding-bottom: 1.4rem; }
  .portrait { width: 5.4rem; height: 5.4rem; }
  .identity { margin-top: 1rem; }
  .name { font-size: 1.6rem; }
  .nav { margin-top: 1.3rem; }
  .nav a { padding-top: .42rem; padding-bottom: .42rem; }
  .nav .nav-portal { margin-top: .5rem; }
  .metrics { margin-top: 1.3rem; gap: .8rem .8rem; }
  .metrics dd { font-size: 1.4rem; }
  .metrics-note { display: none; }
  .profiles { margin-top: 1.2rem; padding-top: .9rem; }
  .side-actions { margin-top: 1.1rem; }
  .side-contact { display: none; }            /* contact details are on the Home page */
}

/* content: centred in the space next to the sidebar, and wider */
.content { max-width: 74rem; margin: 0 auto; padding-left: clamp(2rem, 5vw, 5rem); padding-right: clamp(2rem, 5vw, 5rem); }
.pubs, ol.pubs, .proj, .figure, .courses-now, table.courses, ol.theses, ol.timeline, .course-list { max-width: none; }
.content p, .page-head, .contact-grid, .note, .press { max-width: 46rem; }

/* headline: a statement, not a poster */
.home-head { max-width: 50rem; }
.statement { font-size: clamp(1.6rem, 2.3vw, 2.05rem); line-height: 1.3; font-weight: 400; }
h1 { font-size: clamp(2.2rem, 3.4vw, 2.9rem); }
.content { padding-top: 3.6rem; }

/* home header: one clear sentence + topic line (replaces eyebrow + long statement) */
.home-head { max-width: 46rem; }
.home-head .statement { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.22; font-weight: 450; letter-spacing: -.015em; }
.topics { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 0;
  font: 500 .86rem/1.5 var(--sans); color: var(--ink-soft); }
.topics li + li::before { content: "·"; margin: 0 .6rem; color: var(--accent); }

/* =====================================================================
   Course pages (aie683.html, aie640.html)
   ===================================================================== */

.eyebrow a { color: inherit; text-decoration: none; }
.course-code { display: block; margin-bottom: .35rem; font: 600 .95rem/1 var(--sans); letter-spacing: .16em; color: var(--accent); }
.course-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 2rem; max-width: 46rem;
                margin: 1.8rem 0 0; padding: 1.1rem 1.3rem; background: var(--paper-2); border-left: 3px solid var(--accent); }
.course-facts dt { font: 600 .66rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.course-facts dd { margin: .2rem 0 0; font-size: .98rem; line-height: 1.4; }
.course-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.course h3 a { color: inherit; text-decoration: none; }
.course h3 a:hover { color: var(--accent); }

ol.outcomes, ul.outcomes { max-width: 50rem; margin: 0; padding-left: 1.3rem; }
.outcomes li { margin: .45rem 0; padding-left: .3rem; }
.outcomes li::marker { color: var(--accent); font-family: var(--sans); font-size: .85em; font-weight: 600; }

.table-wrap { overflow-x: auto; }
table.schedule { width: 100%; border-collapse: collapse; font-size: .98rem; }
.schedule th { padding: .5rem .8rem .5rem 0; text-align: left; font: 600 .66rem/1.3 var(--sans); letter-spacing: .12em;
               text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--rule-strong); }
.schedule td { padding: .75rem .8rem .75rem 0; vertical-align: top; border-bottom: 1px solid var(--rule); line-height: 1.45; }
.schedule .wk { width: 3.6rem; font: 400 1.35rem/1.1 var(--serif); color: var(--accent); font-variant-numeric: oldstyle-nums; }
.schedule .reading { display: block; margin-top: .3rem; font: .76rem/1.5 var(--sans); color: var(--ink-faint); }
.schedule .reading a { color: var(--ink-soft); }
.schedule .mat { white-space: nowrap; font: .82rem var(--sans); }
.schedule .due { min-width: 9rem; font: .8rem/1.45 var(--sans); color: var(--ink-soft); }
.schedule td:nth-child(3):not(.mat) { font: .85rem/1.45 var(--sans); color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
@media (max-width: 900px) {
  .course-facts, .two-col { grid-template-columns: minmax(0, 1fr); }
  .schedule .due { min-width: 6rem; }
}
@media (max-width: 560px) { .courses td:first-child { white-space: normal; } }

/* home header: the two roles above one short positioning line */
.roles { display: grid; gap: .3rem; margin: 0 0 1.2rem; padding-left: .9rem; border-left: 2px solid var(--accent);
  font: 600 .74rem/1.45 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.roles span:last-child { color: var(--accent); }
.home-head .statement { font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.15; max-width: 22ch; }

/* home header: name first, then roles, then the research statement */
.home-name { margin: 0 0 .9rem; font-size: clamp(2.6rem, 4.4vw, 3.6rem); line-height: 1.05; font-weight: 450; letter-spacing: -.02em; }
.home-head .roles { margin-bottom: 1.4rem; }
.home-head .statement { margin: 0; max-width: 30ch; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.3;
  font-weight: 400; font-style: italic; color: var(--ink-soft); }

/* single typeface: the home header titles in normal case, no tracking */
.home-head .roles { font: 400 1.05rem/1.5 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.home-head .roles span:last-child { color: var(--accent); }
