/* =========================================================
   Osman Can Kandemiroglu — personal academic site
   Apple-style monochrome design system
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Colors */
  --bg:           #ffffff;
  --bg-alt:       #fbfbfd;
  --bg-section:   #f5f5f7;
  --ink:          #1d1d1f;
  --ink-soft:     #424245;
  --ink-mute:     #6e6e73;
  --ink-faint:    #86868b;
  --line:         #d2d2d7;
  --line-faint:   #e8e8ed;
  --accent:       #0071e3;
  --accent-hover: #0077ed;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial,
               system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Layout */
  --maxw:         980px;
  --maxw-wide:    1200px;
  --maxw-prose:   720px;
  --gutter:       clamp(20px, 4vw, 32px);
  --section-y:    clamp(80px, 12vw, 160px);
  --radius:       18px;
  --radius-sm:    10px;

  /* Motion */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47059;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01", "cv02";
  letter-spacing: -0.003em;
}

/* ---------- Type scale (Apple-ish) ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

h1, .h1 {
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h2, .h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.022em;
}

h3, .h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.42;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.prose p { margin-bottom: 1.05em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container--wide  { max-width: var(--maxw-wide); }
.container--prose { max-width: var(--maxw-prose); }

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--tight { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.section--alt { background: var(--bg-section); }

.divider { height: 1px; background: var(--line-faint); margin: 0; border: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-faint);
}
.nav__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav__brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}
.nav__list {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
}
.nav__link {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 160ms var(--ease-out);
}
.nav__link:hover,
.nav__link[aria-current="page"] { color: var(--ink); }

.nav__toggle { display: none; font-size: 22px; line-height: 1; }
@media (max-width: 720px) {
  .nav__list {
    position: absolute;
    inset: 100% 0 auto 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px var(--gutter) 24px;
    gap: 14px;
    border-bottom: 1px solid var(--line-faint);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
  }
  .nav__list.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__toggle { display: inline-flex; }
  .nav__link { font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(72px, 12vw, 140px);
  padding-bottom: clamp(72px, 12vw, 140px);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(0, 113, 227, 0.06), transparent 60%),
    var(--bg);
  text-align: center;
}
.hero__eyebrow { margin-bottom: 18px; }
.hero__title { margin: 0 auto; max-width: 16ch; }
.hero__lede {
  margin: 22px auto 0;
  max-width: 38ch;
}
.hero__cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out),
              transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: #000; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }

.link-inline {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease-out);
}
.link-inline:hover { border-bottom-color: currentColor; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--accent);
}
.link-arrow::after {
  content: "›";
  transition: transform 200ms var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Page header (non-hero pages) ---------- */
.page-head {
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.page-head__eyebrow { margin-bottom: 14px; }
.page-head__title { max-width: 22ch; }
.page-head__lede {
  margin-top: 18px;
  max-width: 60ch;
}

/* ---------- Cards / project grid ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg-section);
  border-radius: var(--radius);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.18);
}
.card__eyebrow { margin-bottom: 14px; }
.card__title { margin-bottom: 10px; }
.card__desc { color: var(--ink-mute); font-size: 16px; line-height: 1.5; }
.card__cta { margin-top: auto; padding-top: 24px; }

.card--feature {
  background: var(--ink);
  color: var(--bg);
}
.card--feature .card__eyebrow { color: rgba(255, 255, 255, 0.6); }
.card--feature .card__desc { color: rgba(255, 255, 255, 0.78); }
.card--feature .link-arrow { color: #6cb2ff; }

/* ---------- Research article layout ---------- */
.article {
  max-width: var(--maxw-prose);
  margin: 0 auto;
}
.article h2 {
  margin-top: 2.4em;
  margin-bottom: 0.6em;
}
.article h3 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
.article p,
.article li {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.article p { margin-bottom: 1.05em; }
.article ul.bulleted,
.article ol.numbered {
  margin: 0 0 1.2em 1.2em;
}
.article ul.bulleted li { list-style: disc; margin-bottom: 0.4em; }
.article ol.numbered li { list-style: decimal; margin-bottom: 0.4em; }
.article blockquote {
  margin: 1.6em 0;
  padding: 1.2em 1.4em;
  border-left: 3px solid var(--ink);
  background: var(--bg-section);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 18px;
  color: var(--ink-soft);
}

/* Q&A blocks (interview-prep style) */
.qa {
  display: grid;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-sm);
  margin: 1.4em 0;
}
.qa__q {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.qa__a {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.55;
}

/* Key facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  padding: clamp(20px, 2.4vw, 28px) 0;
  border-top: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  margin: 1.6em 0 2em;
}
.facts__item dt {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.facts__item dd {
  font-size: 16px;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

/* Tag chips */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 980px;
  background: var(--bg-section);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* ---------- CV layout ---------- */
.cv-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line-faint);
}
.cv-row:first-of-type { border-top: 0; }
.cv-row__period {
  color: var(--ink-faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.cv-row__title { font-weight: 600; margin-bottom: 4px; }
.cv-row__org { color: var(--ink-mute); font-size: 15px; margin-bottom: 8px; }
.cv-row__desc { color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
@media (max-width: 640px) {
  .cv-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line-faint);
  padding: 48px 0 56px;
  background: var(--bg-alt);
}
.footer__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.footer__copy { font-size: 13px; color: var(--ink-faint); }
.footer__links { display: flex; gap: 22px; }
.footer__links a { font-size: 13px; color: var(--ink-mute); }
.footer__links a:hover { color: var(--ink); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.t-center { text-align: center; }
.t-mute   { color: var(--ink-mute); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mt-6 { margin-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Paper-style page (IMRAD layout for research projects)
   ========================================================= */

.paper-head {
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(28px, 4vw, 48px);
  text-align: center;
}
.paper-head__eyebrow { margin-bottom: 18px; }
.paper-head__title {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.022em;
}
.paper-head__authors {
  margin-top: 24px;
  font-size: 16px;
  color: var(--ink-soft);
}
.paper-head__affil {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-faint);
}

/* Cover image — full-bleed panel */
.cover {
  margin: clamp(28px, 4vw, 48px) auto clamp(48px, 6vw, 72px);
  max-width: var(--maxw-wide);
  padding: 0 var(--gutter);
}
.cover__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
  aspect-ratio: 21 / 9;
}
.cover__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-mute);
  text-align: center;
  padding: 24px;
}
.cover__placeholder .fig__icon { font-size: 44px; opacity: 0.4; }
.cover__placeholder .fig__hint {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.cover__caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.01em;
}

/* Abstract panel */
.abstract {
  max-width: var(--maxw-prose);
  margin: 0 auto clamp(40px, 5vw, 64px);
  padding: clamp(28px, 3.6vw, 44px) clamp(28px, 3.6vw, 44px);
  background: var(--bg-section);
  border-radius: var(--radius);
}
.abstract__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 14px;
}
.abstract__text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.abstract__text p { margin-bottom: 0.9em; }
.abstract__text p:last-child { margin-bottom: 0; }
.abstract__keywords {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-faint);
  font-size: 14px;
  color: var(--ink-mute);
}
.abstract__keywords strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  margin-right: 8px;
}

/* Section markers (numbered IMRAD headings) */
.imrad__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-right: 10px;
  vertical-align: 6%;
  font-weight: 500;
}

/* References list */
.refs {
  list-style: decimal;
  padding-left: 1.4em;
  font-size: 14px;
  color: var(--ink-mute);
}
.refs li { margin-bottom: 0.6em; line-height: 1.5; }
.refs li::marker { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* Page navigation between projects */
.page-nav {
  border-top: 1px solid var(--line-faint);
  padding-top: 32px;
  margin-top: 64px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
}
.page-nav a { color: var(--ink-mute); }
.page-nav a:hover { color: var(--ink); }
.page-nav__prev::before { content: "‹  "; color: var(--ink-faint); }
.page-nav__next::after  { content: "  ›"; color: var(--ink-faint); }

/* =========================================================
   Figure component (Apple-style click-to-zoom)
   ========================================================= */

.fig {
  margin: 2.4em 0;
}
.fig__viewer {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-section);
  position: relative;
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.fig__viewer:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.18);
}
.fig__viewer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.fig__viewer img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 700ms var(--ease-out);
}
.fig__viewer:hover img { transform: scale(1.015); }

.fig figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mute);
  letter-spacing: -0.003em;
}
.fig figcaption strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
}

/* Placeholder when no image present */
.fig--placeholder .fig__viewer { cursor: default; }
.fig--placeholder .fig__viewer:hover {
  transform: none;
  box-shadow: none;
}
.fig__placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    repeating-linear-gradient(45deg,
      rgba(0,0,0,0.02) 0,
      rgba(0,0,0,0.02) 8px,
      transparent 8px,
      transparent 16px),
    var(--bg-section);
  color: var(--ink-mute);
  text-align: center;
  padding: 24px;
}
.fig__icon {
  font-size: 28px;
  opacity: 0.45;
  font-weight: 300;
}
.fig__hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  word-break: break-word;
  max-width: 90%;
}

/* Cover variant uses 21:9 already on .cover__frame */

/* Interactive iframe figure (self-contained, externally styled) */
.fig--iframe { margin: 2.4em 0; }
.fig--iframe iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-alt);
  box-shadow: 0 4px 24px -14px rgba(0, 0, 0, 0.18);
  min-height: 700px;
}

/* Video frame — responsive 16:9 embed, Apple-style softly-shadowed */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: clamp(40px, 6vw, 64px) auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 30px 80px -32px rgba(0, 0, 0, 0.45);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Coming-soon hero — Apple product-launch style */
.soon {
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 50% 30%, rgba(0, 113, 227, 0.05), transparent 60%),
    var(--bg);
  text-align: center;
}
.soon__eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.soon__title {
  margin: 22px auto 0;
  max-width: 18ch;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 600;
}
.soon__sub {
  margin: 26px auto 0;
  max-width: 36ch;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.soon__meta {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}
.soon__cta {
  margin-top: 56px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.soon__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  animation: soonpulse 2.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes soonpulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* Pull-quote — for headline numbers / quotes on long pages */
.pullquote {
  margin: 2.2em 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--ink);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-weight: 500;
}
.pullquote--center {
  border-left: 0;
  text-align: center;
  padding: 0;
  margin: 2.4em auto;
  max-width: 24ch;
}

/* Big-number row (specs / stat strip) */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin: 2em 0 2.6em;
  padding: clamp(20px, 3vw, 30px) 0;
  border-top: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
}
.specs__item dt {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.specs__item dd {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

/* Figure pair (two figures side by side) */
.fig-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 2.4em 0;
}
.fig-pair .fig { margin: 0; }
@media (max-width: 720px) {
  .fig-pair { grid-template-columns: 1fr; }
}

/* =========================================================
   Lightbox (zoom view)
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox__caption {
  margin-top: 22px;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  letter-spacing: -0.003em;
}
.lightbox__caption strong {
  color: white;
  font-weight: 600;
  margin-right: 4px;
}
.lightbox__close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms var(--ease-out);
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }
body.no-scroll { overflow: hidden; }

/* =========================================================
   Portrait component (Studienlotse / about photo)
   ========================================================= */

.portrait {
  margin: 0 0 1.6em;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-section);
  box-shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.28);
  max-width: 460px;
}
.portrait img {
  width: 100%;
  height: auto;
  display: block;
}
.portrait--float-right {
  float: right;
  margin: 0 0 1.4em 2em;
  max-width: 360px;
}
@media (max-width: 720px) {
  .portrait--float-right { float: none; margin: 0 0 1.6em; max-width: 100%; }
}

.portrait-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.005em;
}

/* Hero portrait (about page, top of body) */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.about-hero__text { min-width: 0; }
.about-hero__photo {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-section);
  box-shadow: 0 22px 60px -30px rgba(0, 0, 0, 0.32);
}
.about-hero__photo img { width: 100%; height: auto; display: block; }
@media (max-width: 820px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-hero__photo { max-width: 460px; margin: 0 auto; }
}

