/* ==========================================================================
   Gokce Lab, site.css
   ONE stylesheet. All design decisions live in the variables below.
   Change the look by editing tokens, not rules.

   Direction B (warm / off-white) is the chosen look and is what every page
   uses. The [data-theme="a"] block below is the editorial/white alternative,
   kept in case it is ever wanted; nothing references it today.
   ========================================================================== */

/* --- Tokens: direction A (default) ---------------------------------------- */
:root,
[data-theme="a"] {
  --bg:            #ffffff;
  --surface:       #ffffff;
  --surface-alt:   #f4f6f6;
  --text:          #14171a;
  --muted:         #5b656b;
  --line:          #dfe4e5;
  --accent:        #0f766e;
  --accent-soft:   #e6f2f0;
  --on-accent:     #ffffff;

  --font-display:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display-weight: 640;
  --display-tracking: -0.022em;

  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.36vw, 1.42rem);
  --step-2:  clamp(1.48rem, 1.32rem + 0.78vw, 1.95rem);
  --step-3:  clamp(1.85rem, 1.53rem + 1.55vw, 2.80rem);
  --step-4:  clamp(2.25rem, 1.63rem + 3.00vw, 4.05rem);

  --space:      1rem;
  --space-lg:   clamp(2.5rem, 1.8rem + 3.2vw, 5rem);
  --maxw:       74rem;
  --maxw-prose: 40rem;
  --radius:     3px;
  --radius-lg:  4px;
  --portrait:   1 / 1.25;
  --shadow:     none;
  --band-tint:  var(--surface-alt);
}

/* --- Tokens: direction B --------------------------------------------------- */
[data-theme="b"] {
  --bg:            #faf7f2;
  --surface:       #ffffff;
  --surface-alt:   #f2ece3;
  --text:          #1c1815;
  --muted:         #6a615a;
  --line:          #e2d9cd;
  --accent:        #0f766e;
  --accent-soft:   #e4efec;
  --on-accent:     #ffffff;

  --display-weight: 700;
  --display-tracking: -0.028em;

  --radius:     10px;
  --radius-lg:  16px;
  --portrait:   1 / 1.15;
  --shadow:     0 1px 2px rgba(28,24,21,.05), 0 8px 24px -12px rgba(28,24,21,.18);
  --band-tint:  var(--surface-alt);
}

/* Accent overrides set by the demo bar (delete with the demo bar) */
[data-accent="ink"]   { --accent: #1f3a5f; --accent-soft: #e8edf4; }
[data-accent="rust"]  { --accent: #a8442a; --accent-soft: #f7eae6; }
[data-accent="plum"]  { --accent: #6b3f6e; --accent-soft: #f1eaf2; }

/* --- Reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: .75rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Layout ---------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.prose { max-width: var(--maxw-prose); }
/* When .prose sits ON the .wrap element, keep the outer column width and
   constrain the children instead, so the text still starts at the left margin. */
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: var(--maxw-prose); }
.section { padding-block: var(--space-lg); }
.section + .section { border-top: 1px solid var(--line); }
.band { background: var(--band-tint); }
.band + .section { border-top: 0; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-size: var(--step--1);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .9rem;
}

.lede { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }

/* --- Header / nav ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; font-family: var(--font-display);
  font-weight: var(--display-weight); letter-spacing: -.02em;
  margin-right: auto; padding: .35rem 0;
}
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand__name { font-size: 1.06rem; }
.brand__sub { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; font: inherit; font-size: var(--step--1);
  padding: .5rem .75rem; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .25rem;
}
.site-nav a {
  display: block; text-decoration: none; padding: .6rem .25rem;
  font-size: var(--step--1); letter-spacing: .01em; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

@media (max-width: 63.99em) {
  .site-nav {
    display: none;
    padding-bottom: 1rem;
  }
  .site-nav.is-open { display: block; }
}
@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 1.6rem; }
  .site-nav a { border-bottom: 0; padding: .35rem 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
}

/* --- Hero ------------------------------------------------------------------ */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) var(--space-lg); }
.hero h1 { max-width: 18ch; margin-bottom: .35em; }
.hero__lede { font-size: var(--step-1); color: var(--muted); max-width: 52ch; }
.hero__affiliation {
  font-size: var(--step-0); font-weight: 600; color: var(--text);
  max-width: 46ch; margin: -.2em 0 1.1em;
}
.hero__meta {
  margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font-size: var(--step--1); color: var(--muted);
}
.hero__figure {
  margin-top: 2.5rem; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
[data-theme="b"] .hero { padding-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
[data-theme="b"] .hero__figure { margin-top: 2rem; }

@media (min-width: 64em) {
  .hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
  .hero__figure { margin-top: 0; }
}

/* --- Buttons / links ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; font-weight: 600; font-size: var(--step--1);
  padding: .7rem 1.15rem; border-radius: var(--radius); border: 1px solid var(--accent);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, black); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent); font-weight: 600; font-size: var(--step--1);
  text-decoration: none;
}
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrow-link::after { content: "→"; transition: transform .15s ease; }
.arrow-link:hover::after { transform: translateX(2px); }

/* --- Grids ----------------------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 40em)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48em)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 40em)  { .grid--people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56em)  { .grid--people { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 75em)  { .grid--people { grid-template-columns: repeat(4, 1fr); } }

.section__head {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline;
  justify-content: space-between; margin-bottom: 2rem;
}
.section__head h2 { margin: 0; }

/* --- Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: var(--step--1); }

/* Research theme card */
.theme { display: flex; flex-direction: column; }
.theme__q { font-size: var(--step-1); color: var(--text); font-family: var(--font-display); line-height: 1.25; letter-spacing: -.015em; }
.theme__why { color: var(--muted); }
.theme__figure { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; margin: -1.5rem -1.5rem 1.25rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0 0; }
.tag {
  font-size: .74rem; letter-spacing: .02em; padding: .28rem .6rem;
  border-radius: 999px; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 80%, black);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.tag--muted { background: var(--surface-alt); color: var(--muted); border-color: var(--line); }

/* Person card */
.person { text-align: left; }
.person__photo {
  aspect-ratio: var(--portrait); width: 100%; object-fit: cover;
  background: var(--surface-alt); border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.person__name { font-size: var(--step-1); margin: .9rem 0 .15rem; }
.person__role { color: var(--muted); font-size: var(--step--1); margin: 0; }
.person__bio { font-size: var(--step--1); color: var(--muted); margin-top: .6rem; }
.person__bio--filler { font-style: italic; opacity: .55; }
.person__pending {
  font-size: .74rem; color: var(--muted); margin-top: .6rem;
  border-left: 2px solid var(--line); padding-left: .6rem;
}
.person__links { display: flex; gap: .75rem; margin-top: .7rem; }
.person__links a { font-size: .74rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.person__links a:hover { text-decoration: underline; }

/* News */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item__meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.news-item__date { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.news-item h3 { margin: 0 0 .35rem; font-size: var(--step-1); }
.news-item p { color: var(--muted); margin: 0; max-width: 62ch; }
.news-item .arrow-link { margin-top: .6rem; }
@media (min-width: 56em) {
  .news-item { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; }
  .news-item__meta { flex-direction: column; align-items: flex-start; gap: .4rem; margin: 0; }
}

/* Publications */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub {
  padding-block: 1.1rem; border-top: 1px solid var(--line);
  display: grid; gap: .2rem;
}
.pub:first-child { border-top: 0; }
.pub__title { font-weight: 600; line-height: 1.35; }
.pub__authors, .pub__venue { font-size: var(--step--1); color: var(--muted); }
.pub__venue em { font-style: normal; color: var(--text); }
.pub mark { background: var(--accent-soft); color: inherit; padding: 0 .15em; border-radius: 2px; }
.pub__links { margin-top: .25rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter-row button {
  font: inherit; font-size: var(--step--1); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: .4rem .8rem; border-radius: 999px;
}
.filter-row button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Resources */
.res-group + .res-group { margin-top: var(--space-lg); }
.res-group > .lede { margin-bottom: 1.5rem; font-size: var(--step-0); }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 52em) { .res-list { grid-template-columns: repeat(2, 1fr); } }
.res {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
}
.res h3 { font-size: var(--step-0); margin: 0 0 .3rem; }
.res h3 a { color: var(--accent); text-decoration: none; }
.res h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.res__meta { font-size: .74rem; color: var(--muted); margin: 0 0 .5rem; letter-spacing: .01em; }
.res__desc { font-size: var(--step--1); color: var(--muted); margin: 0; }
.res--todo { border-style: dashed; background: transparent; box-shadow: none; }
.res--todo h3 { color: var(--muted); }

/* Definition rows (contact, impressum) */
.dl { display: grid; gap: .35rem 1.5rem; margin: 0; }
@media (min-width: 40em) { .dl { grid-template-columns: 10rem 1fr; } }
.dl dt { font-weight: 600; }
.dl dd { margin: 0; color: var(--muted); }

/* Notices */
.notice {
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  border-radius: var(--radius); padding: 1rem 1.15rem;
  font-size: var(--step--1);
}
.notice strong { color: color-mix(in srgb, var(--accent) 80%, black); }

/* --- Figures: science images and photo strips ------------------------------ */
.media { margin: 0; }
.media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--surface-alt);
}
.media figcaption {
  margin-top: .7rem; font-size: var(--step--1); color: var(--muted); max-width: 42ch;
}
.media--cover img { object-fit: contain; background: var(--surface-alt); padding: .75rem; }

.photo-strip { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.photo-strip img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
@media (min-width: 64em) { .photo-strip { grid-template-columns: repeat(4, 1fr); } }

.hero__figure img { width: 100%; display: block; }

/* Placeholder imagery, replaced by real photographs */
.ph {
  display: grid; place-items: center; text-align: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface-alt)), var(--surface-alt));
  color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  aspect-ratio: 16 / 10; border: 1px solid var(--line);
}
.ph--portrait { aspect-ratio: var(--portrait); border-radius: var(--radius-lg); }
.ph--mark { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.ph--mark svg { width: 3.25rem; height: 3.25rem; opacity: .5; margin: 0; }
.ph--wide { aspect-ratio: 21 / 8; }
.ph svg { width: 2.5rem; height: 2.5rem; opacity: .28; margin-bottom: .5rem; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface-alt);
  padding-block: 3rem 2.5rem; margin-top: var(--space-lg);
  font-size: var(--step--1);
}
.site-footer h2 { font-size: var(--step-0); margin-bottom: .6rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--muted); display: grid; gap: .4rem;
}
.footer-logos { display: flex; flex-wrap: wrap; gap: 1.15rem 1.45rem; align-items: center; margin-top: 1.25rem; }
.footer-logo { display: inline-flex; align-items: center; opacity: .82; transition: opacity .15s ease; }
.footer-logo:hover, .footer-logo:focus-visible { opacity: 1; }
/* Sized by eye, not by a single number: a solid block reads heavier than a
   wordmark at the same height. Official colors, never stretched. */
.footer-logo img { display: block; width: auto; }
.footer-logo--ukb  img { height: 1.7rem; }
.footer-logo--bonn img { height: 2.3rem; }
.footer-logo--is   img { height: 1.75rem; }
.footer-logo--dzne img { height: 2.4rem; }
/* On a phone the four logos wrap 3 + 1, which looks like a mistake.
   Force a tidy 2 x 2 instead. */
@media (max-width: 30em) {
  .footer-logos {
    display: grid; grid-template-columns: repeat(2, auto);
    justify-content: start; align-items: center; gap: 1.25rem 1.5rem;
  }
}
