/* ==========================================================================
   Erdem Lab — stylesheet
   Palette: deep petrol ink, teal primary (computation / data), violet accent
   (the viridis end of the scale, used sparingly), cool off-white paper.
   Decoration is kept to the network animation in the hero; everything else
   is flat: 1px borders, small radii, a 3px hover lift and a soft scroll fade.
   Type: Space Grotesk (display), IBM Plex Sans (text), IBM Plex Mono (labels).
   ========================================================================== */

:root {
  --ink: #0B1F2A;
  --text: #243540;
  --muted: #5B6B78;
  --line: #DCE5E8;
  --bg: #F6FAFA;
  --surface: #FFFFFF;
  --dark: #071A24;
  --dark-2: #0B2A3A;

  --primary: #0F7B7F;
  --primary-dark: #0A5C60;
  --primary-soft: #E1F2F1;
  --primary-bright: #2DD4BF;

  --accent: #6B3FD4;
  --accent-dark: #5531AE;
  --accent-soft: #EEE9FB;
  --accent-bright: #A78BFA;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(11, 31, 42, .05);
  --shadow-lift: 0 10px 24px -14px rgba(11, 31, 42, .28);
  --measure: 66ch;
  --container: 1140px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 6rem; } /* anchors land below the sticky header */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--primary-bright); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--primary-soft); color: var(--ink); }

/* ---- Layout helpers ---------------------------------------------------- */
.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.measure { max-width: var(--measure); }
.lead { font-size: 1.2rem; line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: .9rem;
}
.hero .eyebrow { color: var(--primary-bright); }
.section-head { margin-bottom: 2.5rem; }
.section-head p { max-width: var(--measure); color: var(--muted); margin: 0; font-size: 1.08rem; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 1rem; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn--outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.link-arrow { font-family: var(--font-display); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow::after { content: "\2192"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { text-decoration: none; }

/* ---- Header / navigation ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -16px rgba(11,31,42,.35); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; color: var(--ink); line-height: 1; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { height: 64px; width: auto; display: block; }
.site-footer .brand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand__icon { width: 44px; height: 44px; border-radius: 10px; margin-right: .75rem; flex: none; }
.brand small {
  display: block; font-family: var(--font-mono); font-weight: 500;
  font-size: .66rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: .3rem;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a {
  position: relative; display: block; padding: .55rem .85rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: .95rem; font-family: var(--font-display);
}
.nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 2px;
  background: var(--primary); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--primary-dark); background: var(--primary-soft); }
.nav a[aria-current="page"]::after { display: none; }
.nav-toggle {
  display: none; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink); place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .brand img { height: 50px; }
  .site-header .container { min-height: 70px; }
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    display: none; padding: .75rem 1.25rem 1rem; box-shadow: var(--shadow);
  }
  .nav.is-open { display: block; animation: menu-in .25s var(--ease); }
  .nav ul { flex-direction: column; gap: .15rem; }
  .nav a { padding: .75rem .9rem; font-size: 1.05rem; }
  .nav a::after { display: none; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- Hero (home) ------------------------------------------------------- */
.hero {
  position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background: var(--dark);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,26,36,.85) 0%, rgba(7,26,36,.55) 50%, rgba(7,26,36,.1) 100%);
}
.hero .container { padding-block: clamp(4.5rem, 11vw, 8.5rem); position: relative; }
.hero__inner { max-width: 46rem; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; font-size: clamp(2.5rem, 5.6vw, 4.3rem); line-height: 1.04; }
.hero h1 em { font-style: normal; color: var(--primary-bright); }
.hero p { font-size: 1.2rem; line-height: 1.6; color: rgba(255,255,255,.82); max-width: 38rem; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.9rem; }
.hero__inner > * { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
.hero__inner > :nth-child(1) { animation-delay: .05s; }
.hero__inner > :nth-child(2) { animation-delay: .18s; }
.hero__inner > :nth-child(3) { animation-delay: .32s; }
.hero__inner > :nth-child(4) { animation-delay: .46s; }
@keyframes rise { to { opacity: 1; transform: none; } }


/* ---- Interior page hero ------------------------------------------------ */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding-block: clamp(2.75rem, 6.5vw, 5rem);
}
.page-hero h1 { margin-bottom: .6rem; }
.page-hero p { max-width: var(--measure); color: var(--muted); font-size: 1.18rem; margin: 0; }

/* ---- Affiliation strip ------------------------------------------------- */
.affiliations { background: var(--surface); border-bottom: 1px solid var(--line); }
.affiliations .container { display: flex; align-items: center; gap: .75rem 2.25rem; flex-wrap: wrap; padding-block: 1.05rem; font-size: .92rem; color: var(--muted); }
.affiliations span:first-child { font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; color: var(--text); }
.affiliations a { color: var(--text); font-weight: 500; font-family: var(--font-display); }

/* ---- Mission statement ------------------------------------------------- */
.mission { padding-block: clamp(3rem, 7vw, 5.5rem); }
.mission__text {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.45rem, 2.7vw, 2.15rem); line-height: 1.35; letter-spacing: -.015em;
  color: var(--ink); max-width: 52rem; margin: 0;
}
.mission__text mark { background: none; color: var(--primary-dark); font-weight: 600; }
.mission__sub { display: block; margin-top: 1rem; font-family: var(--font-body); font-weight: 400; font-size: 1.1rem; color: var(--muted); letter-spacing: 0; }

/* ---- Stats strip ------------------------------------------------------- */
.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat { background: var(--surface); padding: 1.5rem 1.5rem 1.35rem; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.8rem); color: var(--ink); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__num small { font-size: .5em; color: var(--primary); font-weight: 600; margin-left: .1em; }
.stat__label { margin-top: .5rem; font-size: .9rem; color: var(--muted); }

/* ---- Approach: four numbered steps -------------------------------------- */
.approach { display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(4, 1fr); margin-top: 1rem; }
.step { border-top: 2px solid var(--line); padding-top: 1.1rem; }
.step__n { display: block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; color: var(--primary); margin-bottom: .7rem; }
.step:nth-child(even) .step__n { color: var(--accent); }
.step h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.step p { font-size: .95rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .approach { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .approach { grid-template-columns: 1fr; } }

/* ---- Cards & grids ----------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .2s, transform .3s var(--ease), box-shadow .3s;
}
.card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card h3 { margin-top: .25rem; }
.card p:last-of-type { margin-bottom: 0; }
.card .link-arrow { margin-top: auto; padding-top: 1.1rem; }

/* Card with an image on top */
.card--media { padding: 0; }
.card--media .card__media {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top;
  border-bottom: 1px solid var(--line); background: #fff;
}
.card--media .card__media-wrap { overflow: hidden; }
.card--media .card__body { padding: 1.5rem 1.75rem 1.75rem; display: flex; flex-direction: column; flex: 1; }

/* About illustration */
.about-art { margin: 0; }
.about-art img, .about-art svg { width: 100%; height: auto; }
.about-art figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; text-align: center; }
.about-facts { margin-top: 1.75rem; padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- People ------------------------------------------------------------ */
.people-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .3s var(--ease), box-shadow .3s;
}
.person:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.person__media { position: relative; overflow: hidden; }
.person__photo { aspect-ratio: 169 / 200; width: 100%; object-fit: cover; background: #e6eef0; }
.person__body { padding: 1.2rem 1.3rem 1.35rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.person__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.person__role { color: var(--primary-dark); font-family: var(--font-display); font-weight: 600; font-size: .86rem; letter-spacing: .03em; text-transform: uppercase; }
.person__email { margin: .3rem 0 0; font-family: var(--font-mono); font-size: .8rem; }
.person__email a { color: var(--primary-dark); overflow-wrap: anywhere; }
.person__edu { list-style: none; margin: .35rem 0 0; padding: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.person__edu li + li { margin-top: .15rem; }
.person__links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .95rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; padding: .32rem .7rem; font-family: var(--font-display);
  border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--text); background: var(--bg);
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); text-decoration: none; }
.person--join { border-style: dashed; border-color: #c9d6da; background: var(--primary-soft); }
.person__media--initials { aspect-ratio: 169 / 200; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; letter-spacing: .02em; }
.person--alumni .person__media--initials { background: #E8EEF0; color: var(--muted); }
.person--join .person__photo { filter: grayscale(1); opacity: .55; mix-blend-mode: multiply; }

.people-grid--alumni { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.person--alumni .person__photo { filter: saturate(.6); }
.person--alumni .person__name { font-size: 1.1rem; }
.person__now { font-size: .9rem; color: var(--text); margin: .4rem 0 0; }

/* ---- Projects ---------------------------------------------------------- */
.project { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); padding-block: clamp(2.25rem, 5vw, 4rem); }
.project + .project { border-top: 1px solid var(--line); }
.project h2 { margin-top: 0; }
.project h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.project__facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; align-self: start; position: sticky; top: 6.5rem; }
.project__facts dl.facts { grid-template-columns: 1fr; gap: .15rem 0; }
.project__facts dt { margin-top: .7rem; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.project__facts dt:first-child { margin-top: 0; }
.project__facts dd { font-size: .95rem; }
.project__facts .link-arrow { margin-top: 1rem; font-size: .95rem; }
@media (max-width: 860px) { .project { grid-template-columns: 1fr; } .project__facts { position: static; order: -1; } }

/* ---- Research ---------------------------------------------------------- */
.research-item {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  padding-block: clamp(2.25rem, 5vw, 4rem);
}
.research-item + .research-item { border-top: 1px solid var(--line); }
.research-item figure {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem;
}
.research-item figure img { width: 100%; border-radius: var(--radius-sm); }
.research-item figcaption { font-size: .85rem; color: var(--muted); margin-top: .7rem; }
.research-item:nth-child(even) figure { order: 2; }
@media (max-width: 760px) { .research-item:nth-child(even) figure { order: 0; } }
.research-item h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.research-item ul { padding-left: 1.2em; }
.research-item li { margin-bottom: .35rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 1.1rem; padding: 0; list-style: none; }
.tags li { font-family: var(--font-display); font-size: .8rem; font-weight: 600; letter-spacing: .02em; background: var(--primary-soft); color: var(--primary-dark); padding: .28rem .65rem; border-radius: var(--radius-sm); }

.software { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.software a.card { color: inherit; }
.software a.card:hover { text-decoration: none; color: inherit; }
.software code { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }

/* ---- Publications ------------------------------------------------------ */
.pub-legend { font-size: .9rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; display: inline-block; margin-bottom: 2rem; }
.pub-year { margin-top: 2.75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); font-size: 1.5rem; display: flex; align-items: baseline; gap: .75rem; }
.pub-year:first-of-type { margin-top: 0; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1.5rem; align-items: start;
  padding: 1.2rem .75rem; margin: 0 -.75rem; border-bottom: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: background .25s;
}
.pub:hover { background: var(--surface); }
.pub__title { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.08rem; line-height: 1.35; margin: 0 0 .35rem; letter-spacing: -.01em; }
.pub__title a { color: inherit; }
.pub__title a:hover { color: var(--primary-dark); text-decoration: none; }
.pub__authors { color: var(--text); font-size: .95rem; margin: 0 0 .25rem; }
.member { color: var(--accent-dark); font-weight: 600; }
.pub__venue { color: var(--muted); font-size: .9rem; margin: 0; }
.pub__venue em { color: var(--text); font-style: italic; }
.pub__badge { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: #fff; padding: .32rem .6rem; border-radius: 6px; white-space: nowrap; margin-top: .25rem; }
.pub__badge--preprint { background: var(--accent-soft); color: var(--accent-dark); }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; } .pub__badge { justify-self: start; } }

.pub-compact { list-style: none; margin: 0; padding: 0; }
.pub-compact li { padding: 1rem 0; border-top: 1px solid var(--line); }
.pub-compact li:last-child { border-bottom: 1px solid var(--line); }
.pub-compact .pub__title { font-size: 1rem; }

/* ---- News -------------------------------------------------------------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.news-list time { color: var(--primary-dark); font-family: var(--font-display); font-size: .88rem; font-weight: 600; padding-top: .2rem; }
.news-list p { margin: 0; }
@media (max-width: 540px) { .news-list li { grid-template-columns: 1fr; gap: .25rem; } }

/* ---- Join / Contact ---------------------------------------------------- */
.callout {
  background: var(--dark);
  color: #fff; border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid; gap: 1.25rem; grid-template-columns: 1fr auto; align-items: center;
  position: relative; overflow: hidden; isolation: isolate;
}
.callout h2 { color: #fff; margin-bottom: .35rem; }
.callout p { color: rgba(255,255,255,.8); margin: 0; max-width: 40rem; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; } }

.positions { display: grid; gap: 1rem; }
.position { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; }
.position--closed { border-left-color: var(--line); opacity: .8; }
.position h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.position .meta { font-size: .82rem; color: var(--muted); font-family: var(--font-mono); }

.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.contact-grid address { font-style: normal; line-height: 1.7; }
.contact-grid h3 { font-size: 1.1rem; }
.email { font-weight: 600; font-size: 1.05rem; font-family: var(--font-display); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; font-weight: 500; padding-top: .1rem; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  dl.facts { grid-template-columns: 1fr; gap: .1rem 0; }
  dl.facts dd { margin-bottom: .7rem; }
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); margin-top: clamp(3rem, 7vw, 5rem); font-size: .92rem; position: relative; overflow: hidden; }
.site-footer .container { padding-block: 3.25rem 2rem; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h4 { color: #fff; font-family: var(--font-mono); font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .85rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.site-footer .brand small { color: rgba(255,255,255,.55); }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: rgba(255,255,255,.5); }
@media (max-width: 760px) { .site-footer .container { grid-template-columns: 1fr; } }

/* ---- Scroll reveal (soft: fade + 12px rise) ---------------------------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .hero__inner > * { opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
