/* ==========================================================================
   Forest / Sage design system — Ful Belin Korukoglu
   Dark botanical academia x contemporary AI research.
   All colour, type and spacing decisions live here as tokens.
   ========================================================================== */

:root {
  /* Palette */
  --bg-primary: #15251E;
  --bg-secondary: #24392E;
  --bg-elevated: #2A4234;

  --text-primary: #F4F1E8;
  --text-secondary: #B5C4B7;

  --accent-primary: #A7C5A3;
  --accent-secondary: #D0B981;

  --border-color: #3A5144;
  --border-soft: rgba(167, 197, 163, 0.16);

  /* Type */
  /* one typeface across the whole page */
  --font-heading: 'NTR', sans-serif;
  --font-body: 'NTR', sans-serif;
  --font-mono: 'NTR', sans-serif;

  /* Rhythm */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-gap: clamp(5rem, 11vw, 9.5rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 240ms var(--ease);
  --t-slow: 320ms var(--ease);

  --radius: 6px;
  --radius-lg: 10px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

[id] { scroll-margin-top: 80px; }

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.375rem); /* up to 22px, as on the reference site */
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover { color: var(--text-primary); }

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

::selection {
  background: rgba(167, 197, 163, 0.26);
  color: var(--text-primary);
}

h1, h2, h3, h4 {
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }

hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 3rem 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius);
}

.skip-link:focus { left: 1rem; top: 1rem; }

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

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-gap); }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-head__label {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  white-space: nowrap;
}

.section-head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color), rgba(58, 81, 68, 0.15));
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.lede {
  color: var(--text-secondary);
  max-width: 62ch;
  font-size: 1.05em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  transition: border-color var(--t-base), background-color var(--t-base);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.nav__brand:hover { color: var(--accent-primary); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding-block: 0.4rem;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav__link:hover,
.nav__link[aria-current="true"] { color: var(--text-primary); }

.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); }

.nav__item--cv { display: none; }

.nav__cv {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  transition: border-color var(--t-base), color var(--t-base), background-color var(--t-base);
}

.nav__cv:hover {
  border-color: var(--accent-primary);
  background: rgba(167, 197, 163, 0.08);
  color: var(--text-primary);
}

/* EN / DE switch, sitting beside the CV button */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}

.lang-switch__option {
  color: var(--text-secondary);
  padding: 0.3rem 0.2rem;
  transition: color var(--t-fast);
}

.lang-switch__option:hover { color: var(--text-primary); }
.lang-switch__option[aria-current="true"] { color: var(--accent-primary); }
.lang-switch__sep { color: var(--border-color); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  line-height: 0;
}

.nav__toggle svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

/* The hero visual already carries the breathing room, so the first
   section sits closer to the name than a standard section break. */
.hero + .section { padding-top: clamp(1.5rem, 4vw, 3rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(2.9rem, 1.6rem + 5.6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}

.hero__intro {
  max-width: 54ch;
  font-size: 1.08em;
}

.hero__statement {
  max-width: 54ch;
  color: var(--text-secondary);
  border-left: 1px solid var(--border-color);
  padding-left: 1.25rem;
  margin-top: 1.5rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  color: var(--text-secondary);
  padding-block: 0.25rem;
  position: relative;
}

.hero__link svg {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
  transition: color var(--t-fast);
}

.hero__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.hero__link:hover { color: var(--text-primary); }
.hero__link:hover::after { transform: scaleX(1); }
.hero__link:hover svg { color: var(--text-primary); }

.hero__visual {
  position: relative;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
  /* sits a little above the optical centre of the text column */
  transform: translateY(-2.25rem);
}

/* Interactive proximity graph in the About column */
.aside-sim {
  display: flex;
  justify-content: center;
}

.simulation-container {
  width: 320px;
  aspect-ratio: 1 / 1;   /* stay square when max-width kicks in */
  height: auto;
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
  display: block;
}

/* the portrait simulation sits where the photograph did */
.hero__visual .simulation-container { margin-inline: auto; }
.hero__visual noscript img { width: 100%; height: auto; display: block; }

.aside-sim svg { width: 100%; height: auto; overflow: visible; display: block; }

.graph-edge {
  stroke: var(--accent-primary);
  stroke-width: 1;
  opacity: 0.3;
}

.graph-node {
  fill: var(--accent-primary);
  opacity: 0.85;
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 7s var(--ease) infinite;
}

.graph-node--gold { fill: var(--accent-secondary); opacity: 1; }
.graph-node--ring {
  fill: none;
  stroke: var(--accent-secondary);
  stroke-width: 1;
  opacity: 0.45;
  animation: ring-breathe 7s var(--ease) infinite;
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes ring-breathe {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.35); }
}

.hero__scroll {
  margin-top: clamp(3rem, 7vw, 5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero__scroll span { display: block; width: 3rem; height: 1px; background: var(--border-color); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about__aside {
  position: sticky;
  top: 7rem;
  display: grid;
  gap: 1.5rem;
}

.portrait {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  background: var(--bg-secondary);
}

.portrait img {
  border-radius: calc(var(--radius-lg) - 3px);
  width: 100%;
  filter: saturate(0.85) contrast(1.02);
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border-radius: calc(var(--radius-lg) - 3px);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, 0.07);
  pointer-events: none;
}


/* Markdown rendered from index.md / page content */

.prose h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  line-height: 1.2;
  margin: 2.75rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3 {
  font-size: 1.28rem;
  font-weight: 500;
  margin: 2rem 0 0.5rem;
}

.prose p { color: var(--text-secondary); }
.prose p strong { color: var(--text-primary); font-weight: 500; }

.prose > p:first-of-type {
  font-size: 1.1em;
  color: var(--text-primary);
}

.prose a {
  color: var(--text-primary);
  background-image: linear-gradient(var(--accent-primary), var(--accent-primary));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--t-base), color var(--t-fast);
}

.prose a:hover {
  color: var(--accent-primary);
  background-size: 0% 1px;
}

.prose ul { color: var(--text-secondary); }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent-primary); }

.prose em { color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Research panels
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Current-work carousel
   One card at a time, moved by the chevrons, the dots or a swipe. Before the
   script marks it ready the track is a plain stack, so both cards are
   readable without JavaScript.
   -------------------------------------------------------------------------- */

.carousel__frame { position: relative; }

.carousel__viewport { overflow: hidden; border-radius: var(--radius-lg); }

.carousel__track { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }

.carousel[data-ready="true"] .carousel__frame {
  padding-inline: 3.75rem;   /* gutters for the chevrons, clear of the card */
}

.carousel[data-ready="true"] .carousel__track {
  display: flex;
  gap: 0;
  align-items: stretch;
  transition: transform 420ms var(--ease);
}

.carousel[data-ready="true"] .carousel__slide {
  flex: 0 0 100%;
  max-width: 100%;
}

/* the lift would be clipped by the viewport, and the card no longer
   competes for attention with its neighbour */
.carousel .panel:hover { transform: none; }

.carousel__nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 2;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}

.carousel[data-ready="true"] .carousel__nav { display: grid; place-items: center; }

.carousel__nav svg { width: 1.4rem; height: 1.4rem; display: block; }
.carousel__nav:hover { color: var(--text-primary); border-color: rgba(167, 197, 163, 0.45); }
.carousel__nav--prev { left: 0; }
.carousel__nav--next { right: 0; }

.carousel__dots {
  display: none;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.carousel[data-ready="true"] .carousel__dots { display: flex; }

.carousel__dot {
  width: 2.5rem;
  height: 1.5rem;          /* a comfortable target around a thin bar */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  align-items: center;
}

.carousel__dot::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--border-color);
  transition: background-color var(--t-base);
}

.carousel__dot:hover::before { background: var(--text-secondary); }
.carousel__dot[aria-current="true"]::before { background: var(--accent-primary); }


.panel {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3.6vw, 2.75rem);
  transition: border-color var(--t-base), transform var(--t-base), background-color var(--t-base);
}

.panel:hover {
  border-color: rgba(167, 197, 163, 0.45);
  transform: translateY(-2px);
}

.panel__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.panel__period {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.panel__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.panel__tagline {
  color: var(--text-secondary);
  font-size: 1.02em;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.panel__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.panel__text p { color: var(--text-secondary); }

.panel__figure {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(21, 37, 30, 0.45);
  padding: 1.25rem;
}

.panel__figure svg { width: 100%; height: auto; display: block; }

/* a photograph or exported plot standing in for the drawn diagram */
.panel__image {
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
  /* the exported charts are drawn on white; a light plate keeps their colours
     true instead of letting a white rectangle glare out of the dark card */
  background: #fdfdfb;
  padding: 0.6rem;
}

/* captions are sentences now, not institution labels, so they read as
   sentences: no uppercase, no wide tracking */
.panel__figcaption {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  text-align: left;
  margin-top: 0.9rem;
  opacity: 0.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
}

.tag {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.panel:hover .tag { border-color: rgba(167, 197, 163, 0.32); }

.panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

/* inline, not inline-flex, so the arrow follows the last word when a long
   link wraps instead of being pushed to the end of the line */
.link-arrow { display: inline; }

.link-arrow::after {
  content: "\00a0↗";
  font-size: 0.85em;
  display: inline-block;
  transition: transform var(--t-base);
}

.link-arrow:hover::after { transform: translate(2px, -2px); }

/* --------------------------------------------------------------------------
   Publications
   -------------------------------------------------------------------------- */

.pubs { list-style: none; margin: 0; padding: 0; }

.pub {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--border-color);
  transition: background-color var(--t-base);
}

.pub:last-child { border-bottom: 1px solid var(--border-color); }

.pub__year {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-secondary);
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
}

.pub__type {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.pub__title {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.pub__authors { color: var(--text-secondary); font-size: 1.2rem; margin-bottom: 0.2rem; }
.pub__authors strong { color: var(--accent-primary); font-weight: 500; }

.pub__venue {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.pub__links {
  display: flex;
  gap: 1.1rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Experience — tabs + timeline
   -------------------------------------------------------------------------- */

.xp {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.xp__tabs {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  list-style: none;
  margin: 0;
  padding: 0;
}

.xp__tab {
  position: relative;
  appearance: none;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  margin-left: -1px;
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
  width: 100%;
}

.xp__tab:hover { color: var(--text-primary); background: rgba(167, 197, 163, 0.05); }

.xp__tab[aria-selected="true"] {
  color: var(--accent-primary);
  border-left-color: var(--accent-primary);
  background: rgba(167, 197, 163, 0.07);
}

.xp__panel { display: none; }
.xp__panel[data-active="true"] { display: block; animation: fade-in var(--t-slow) both; }

.xp__role {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.xp__institution { color: var(--accent-primary); font-size: 1.3rem; margin-bottom: 0.2rem; }

.xp__dates {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.xp__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }

.xp__points li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text-secondary);
}

.xp__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.6rem;
  height: 1px;
  background: var(--accent-primary);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  transition: border-color var(--t-base), transform var(--t-base);
}

.project:hover {
  border-color: rgba(167, 197, 163, 0.45);
  transform: translateY(-3px);
}

.project__category {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 0.85rem;
}

.project__title {
  font-size: clamp(1.6rem, 1.3rem + 0.8vw, 2rem);
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.project__description { color: var(--text-secondary); font-size: 1em; flex: 1; }

.project .tags { margin-top: 1.25rem; }
.project__link { margin-top: 1.25rem; font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.skill__group {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 1rem + 0.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.skill__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  color: var(--text-secondary);
  font-size: 1em;
}

/* --------------------------------------------------------------------------
   Community
   -------------------------------------------------------------------------- */

.community {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.community__body { color: var(--text-secondary); }
.community__body strong { color: var(--text-primary); font-weight: 500; }

/* --------------------------------------------------------------------------
   Contact + footer
   -------------------------------------------------------------------------- */

.contact { text-align: left; }

.contact__title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 4.75rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.contact__body { color: var(--text-secondary); max-width: 52ch; margin-bottom: 2.25rem; }

.contact__mail {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.1rem);
  color: var(--accent-primary);
  border-bottom: 1px solid rgba(167, 197, 163, 0.35);
  padding-bottom: 0.25rem;
  transition: color var(--t-base), border-color var(--t-base);
}

.contact__mail:hover { color: var(--text-primary); border-bottom-color: var(--text-primary); }

.contact__links { margin-top: 2.5rem; }

.footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--border-color);
  padding-block: 2.25rem 3rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }

/* --------------------------------------------------------------------------
   Inner pages (CV, 404, archives)
   -------------------------------------------------------------------------- */

.page-head {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-head__title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.05;
}

.page-body { padding-bottom: var(--section-gap); }
.page-body .prose { max-width: var(--container-narrow); }

.page-body .prose h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem);
  margin: 2.75rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

/* Archive-style listings inherited from the previous theme's includes */

.page-body .archive__item,
.page-body .list__item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

.page-body .list__item:first-of-type .archive__item { border-top: 0; padding-top: 0; }

.page-body .archive__item-title {
  font-size: 1.32rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.page-body .archive__item-title a { color: var(--text-primary); }
.page-body .archive__item-title a:hover { color: var(--accent-primary); }

.page-body .archive__item-excerpt {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.page-body .archive__item-excerpt img { border-radius: var(--radius); margin-top: 0.85rem; }

.page-body .archive__subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin: 2.5rem 0 0.5rem;
}

.page-body .wordwrap { color: var(--text-secondary); margin-bottom: 1.5rem; }
.page-body .taxonomy__index { list-style: none; padding: 0; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.back-home:hover { color: var(--accent-primary); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 320px; margin-inline: 0; opacity: 0.9; transform: none; }
  .about__grid { grid-template-columns: 1fr; }
  .about__aside { position: static; }
  .panel__body { grid-template-columns: 1fr; }
  .carousel[data-ready="true"] .carousel__frame { padding-inline: 0; }
  .carousel__nav { display: none !important; }
  .xp { grid-template-columns: 1fr; }
  .xp__tabs {
    flex-direction: row;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
  }
  .xp__tab {
    border-left: 0;
    border-bottom: 2px solid transparent;
    margin-left: 0;
    margin-bottom: -1px;
    white-space: nowrap;
    width: auto;
  }
  .xp__tab[aria-selected="true"] { border-left-color: transparent; border-bottom-color: var(--accent-primary); }
}

/* German labels are longer than the English ones; below this width the CV
   button would crowd the language switch, so it joins the nav list instead. */
@media (max-width: 880px) {
  .nav__cv { display: none; }
  .nav__item--cv { display: list-item; }
}

@media (max-width: 720px) {
  .nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    display: none;
  }
  .nav__list[data-open="true"] { display: flex; }
  .nav__list li { border-bottom: 1px solid var(--border-soft); }
  .nav__list li:last-child { border-bottom: 0; }
  .nav__link { display: block; padding: 0.85rem var(--gutter); }
  .nav__link::after { display: none; }
  .nav__toggle { display: inline-flex; order: 3; }
  .lang-switch { order: 2; }
  .nav__cv { display: none; }
  .nav__item--cv { display: block; }
  .about__aside { grid-template-columns: 1fr; }
  .portrait { max-width: 15rem; }
  .hero { padding-bottom: 2.5rem; }
  .hero__visual { max-width: 15rem; }
  .pub { grid-template-columns: 1fr; gap: 0.5rem; }
  .pub__year { display: flex; align-items: baseline; gap: 1rem; padding-top: 0; }
  .pub__type { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Motion + print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .carousel[data-ready="true"] .carousel__track { transition: none; }
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; color: #111; }
  .nav, .hero__visual, .footer { display: none; }
  a { color: #111; }
}
