/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --parchment:  #f5f0e8;
  --ink:        #1c1a17;
  --gold:       #b08d57;
  --gold-light: #caa96e;
  --terracotta: #b5603a;
  --terra-pale: #f0e0d4;
  --mid:        #6b6456;
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'Josefin Sans', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--ink);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%231c1a17'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23221f1b' opacity='0.4'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23181510' opacity='0.4'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ─── Page box ──────────────────────────────────────────────── */
.page-box {
  background: var(--parchment);
  max-width: 1360px;
  margin: 1.5rem auto;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.3),
    0 12px 40px rgba(0,0,0,0.4),
    0 40px 100px rgba(0,0,0,0.35),
    0 0 0 1px rgba(176,141,87,0.14);
  position: relative;
}

/* ─── Utilities ─────────────────────────────────────────────── */
.label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
}

.gold-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}
.bio-nav-btns {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  margin-bottom: 2rem;
}
.bio-nav-btn {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(28,26,23,0.25);
  padding: 0.35rem 0.85rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bio-nav-btn:hover {
  background: var(--gold);
  color: var(--parchment);
  border-color: var(--gold);
}

/* ─── Nav ───────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 4rem;
  background: var(--parchment);
  transition: box-shadow 0.4s, background 0.4s;
}

nav.scrolled {
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(176,141,87,0.25), 0 4px 20px rgba(28,26,23,0.06);
}

.nav-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}
a.nav-name:hover {
  color: var(--gold);
  transition: color 0.2s;
}

.nav-name span {
  font-style: normal;
  font-weight: 300;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  display: block;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.25s;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Mobile hamburger toggle — hidden on desktop, shown ≤768px (see media query) */
.nav-toggle-cb { display: none; }
.nav-burger { display: none; }

/* ─── Index Hero ────────────────────────────────────────────── */
#hero {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 7rem;
  position: relative;
  overflow: hidden;
  gap: 2.5rem;
}

.hero-main {
  display: flex;
  flex-direction: row;
  gap: 4rem;
  flex: 1;
}

.hero-col-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
}

.hero-col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
  position: relative;
  z-index: 1;
}

.hero-gallery a {
  display: block;
  overflow: hidden;
}

.hero-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s, transform 0.25s;
}

.hero-gallery a:hover img {
  opacity: 0.75;
  transform: scale(1.05);
}

.hero-topright {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-bottomright {
  display: flex;
  justify-content: flex-end;
}

#hero::before {
  content: 'VADAS';
  position: absolute;
  bottom: 25%;
  right: 0;
  font-family: var(--serif);
  font-size: 28vw;
  font-weight: 600;
  color: rgba(28,26,23,0.045);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.02em;
  user-select: none;
}

#hero::after {
  content: '';
  position: absolute;
  left: 3.5rem;
  top: 0.75rem;
  bottom: 4rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.4;
}

.hero-name {
  font-size: clamp(3.8rem, 6.5vw, 6.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.2rem;
  position: relative;
  z-index: 1;
}

.hero-name em {
  font-style: normal;
  color: var(--gold);
}

.hero-title {
  font-family: var(--sans);
  font-weight: 200;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-top: 0.4rem;
  position: relative;
  z-index: 1;
}


.hero-tagline {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--mid);
  max-width: 62ch;
  border-left: 2px solid var(--gold);
  padding-left: 1.4rem;
  text-align: justify;
}


.hero-cta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--parchment);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--gold);
}

.btn-ghost:hover {
  background: var(--gold);
  color: var(--parchment);
}

/* ─── Hero book cover ───────────────────────────────────────── */
.hero-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
}

.hero-book img {
  height: 380px;
  width: auto;
  box-shadow: 4px 6px 24px rgba(28,26,23,0.18);
  border: 1px solid rgba(176,141,87,0.2);
  display: block;
}

.hero-book-caption {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  text-align: center;
  max-width: 280px;
  line-height: 1.6;
}

/* ─── Scroll hint ───────────────────────────────────────────── */
.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-scroll-hint span {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ─── Subpage Hero ──────────────────────────────────────────── */
.subpage-hero {
  padding: 4.5rem 7rem 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(176,141,87,0.2);
}

.subpage-hero::after {
  content: '';
  position: absolute;
  left: 3.5rem;
  top: 3rem;
  bottom: 3rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.4;
}

.subpage-watermark {
  position: absolute;
  bottom: -0.12em;
  right: 0;
  font-family: var(--serif);
  font-size: 22vw;
  font-weight: 600;
  color: rgba(28,26,23,0.04);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -0.02em;
  user-select: none;
  z-index: 0;
}

.subpage-hero-content {
  position: relative;
  z-index: 1;
}

.subpage-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.subpage-hero-title {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.subpage-hero-title em {
  font-style: normal;
  color: var(--gold);
}

.subpage-hero-desc {
  font-family: var(--sans);
  font-weight: 200;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-top: 0.8rem;
}

/* ─── Subpage content wrapper ───────────────────────────────── */
.subpage-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 4rem;
}

/* ─── Rövid életrajz with portrait ──────────────────────────── */
.rovid-wrap {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.rovid-wrap .md-content {
  flex: 1;
}
.rovid-portrait {
  flex-shrink: 0;
  width: 220px;
  margin-top: 3.5rem;
}
.rovid-portrait img {
  width: 100%;
  display: block;
  box-shadow: 4px 6px 24px rgba(28,26,23,0.18);
  border: 1px solid rgba(176,141,87,0.2);
}

/* ─── Photo gallery ─────────────────────────────────────────── */
.photo-section {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 72ch;
  flex-shrink: 0;
}
.photo-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  display: block;
  transition: opacity 0.2s, transform 0.2s;
  border: 2px solid transparent;
}
.photo-thumb:hover {
  opacity: 0.8;
  transform: scale(1.02);
}
.photo-thumb.active {
  border-color: var(--gold);
}
.photo-viewer {
  flex: 1;
  position: sticky;
  top: 6rem;
  align-self: flex-start;
}
.photo-viewer img {
  width: 100%;
  display: block;
  box-shadow: 4px 6px 24px rgba(28,26,23,0.18);
  border: 1px solid rgba(176,141,87,0.2);
  transition: opacity 0.18s;
}
.photo-caption {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 0.75rem;
  text-align: center;
}

/* ─── Anchor scroll offset (accounts for sticky nav) ────────── */
#rovid, #szakmai, #hetven, #fenykeptar,
#konyvek, #tanulmanyok, #katalogusok, #folyoiratok {
  scroll-margin-top: 6rem;
}

/* ─── Section divider ───────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid rgba(176,141,87,0.35);
  margin: 3rem 0;
  width: 100%;
}

/* ─── Markdown content ──────────────────────────────────────── */
.md-content {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  max-width: 72ch;
}
.md-content p {
  margin-bottom: 1.4rem;
  text-align: justify;
}
.md-content strong {
  font-weight: 600;
}
.md-content em {
  font-style: italic;
}
.md-content h1, .md-content h2, .md-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin-bottom: 1rem;
}
.md-content ol, .md-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
.md-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.md-content hr {
  border: none;
  border-top: 1px solid rgba(176,141,87,0.35);
  margin: 2.5rem 0;
}
.md-content {
  max-width: 80ch;
}

#bibliografia.md-content {
  max-width: none;
}

/* ─── About / Biography ─────────────────────────────────────── */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  align-items: start;
}

.bio-sidebar {
  position: sticky;
  top: 6rem;
}

.bio-sidebar .label { margin-bottom: 1.5rem; }

.sidebar-stat {
  border-top: 1px solid rgba(176,141,87,0.3);
  padding: 1.2rem 0;
}

.sidebar-stat:last-child { border-bottom: 1px solid rgba(176,141,87,0.3); }

.stat-number {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--terracotta);
  line-height: 1;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 0.3rem;
}

.bio-body h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--ink);
}

.bio-body h2 strong {
  font-style: normal;
  font-weight: 600;
}

.bio-body p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--mid);
  margin-bottom: 1.5rem;
}

.bio-body p:first-of-type {
  font-size: 1.2rem;
  color: var(--ink);
}

.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.affiliation-tag {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
  padding: 0.4rem 0.9rem;
  opacity: 0.8;
}

/* ─── Research specialisms ──────────────────────────────────── */
.research-section {
  background: var(--ink);
  padding: 6rem 4rem;
  border-top: 1px solid rgba(176,141,87,0.15);
  border-bottom: 1px solid rgba(176,141,87,0.15);
  position: relative;
  overflow: hidden;
}

.research-section::before {
  content: 'RESEARCH';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 18vw;
  font-weight: 600;
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.1em;
}

.research-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.research-inner .label { color: var(--gold); }
.research-inner .gold-rule { background: var(--terracotta); }

.research-inner h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  font-style: italic;
  color: var(--parchment);
  margin-bottom: 3.5rem;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(176,141,87,0.2);
}

.research-card {
  padding: 2.8rem 2.5rem;
  border-right: 1px solid rgba(176,141,87,0.2);
  border-bottom: 1px solid rgba(176,141,87,0.2);
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}

.research-card:nth-child(3n) { border-right: none; }
.research-card:nth-last-child(-n+3) { border-bottom: none; }
.research-card:hover { background: rgba(176,141,87,0.07); }

.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--gold);
  transition: height 0.4s ease;
}

.research-card:hover::before { height: 100%; }

.card-number {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(176,141,87,0.15);
  line-height: 1;
  margin-bottom: 1.2rem;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--parchment);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.95rem;
  color: rgba(245,240,232,0.5);
  line-height: 1.75;
}

.card-tag {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 2px;
}

/* ─── Publications ──────────────────────────────────────────── */
.pub-list { display: flex; flex-direction: column; }

.pub-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.2);
  transition: background 0.25s, padding 0.25s, margin 0.25s;
  cursor: default;
}

.pub-item:first-child { border-top: 1px solid rgba(176,141,87,0.2); }
.pub-item:hover { background: rgba(176,141,87,0.04); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }

.pub-year {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--gold);
  padding-top: 0.4rem;
}

.pub-title {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.pub-meta {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--mid);
}

.pub-meta strong {
  font-style: normal;
  color: var(--terracotta);
  font-weight: 500;
}

.pub-type {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  border: 1px solid rgba(176,141,87,0.3);
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  align-self: center;
}

.pub-type.monograph { color: var(--terracotta); border-color: var(--terracotta); }
.pub-type.journal   { color: var(--gold);       border-color: var(--gold); }
.pub-type.chapter   { color: var(--mid);        border-color: rgba(107,100,86,0.5); }

/* ─── Courses ───────────────────────────────────────────────── */
.course-level-group { margin-bottom: 4rem; }

.course-level-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(176,141,87,0.25);
  padding-bottom: 0.8rem;
  margin-bottom: 0;
}

.course-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.15);
  transition: background 0.25s, padding 0.25s, margin 0.25s;
}

.course-item:hover { background: rgba(176,141,87,0.04); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }

.course-code {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--mid);
  padding-top: 0.35rem;
}

.course-title {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.course-desc {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.6;
}

.course-sem {
  font-family: var(--sans);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--ink);
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  align-self: start;
  margin-top: 0.2rem;
}

/* ─── Vitafórum ─────────────────────────────────────────────── */
.forum-list { display: flex; flex-direction: column; gap: 0; }

.forum-post {
  padding: 2.8rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  transition: background 0.25s, padding 0.25s, margin 0.25s;
  cursor: pointer;
}

.forum-post:first-child { border-top: 1px solid rgba(176,141,87,0.2); }
.forum-post:hover { background: rgba(176,141,87,0.04); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }

.forum-post-category {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.5rem;
}

.forum-post-title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.forum-post-excerpt {
  font-size: 1rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 70ch;
}

.forum-post-meta {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--mid);
  margin-top: 1rem;
}

.forum-post-replies {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding-top: 0.4rem;
}

.reply-count {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.reply-label {
  font-family: var(--sans);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ─── Visszhang ─────────────────────────────────────────────── */
.visszhang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.review-card {
  background: rgba(176,141,87,0.05);
  border: 1px solid rgba(176,141,87,0.2);
  padding: 2.5rem;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.review-card:hover {
  border-color: rgba(176,141,87,0.5);
  box-shadow: 0 4px 24px rgba(176,141,87,0.08);
}

.review-quote-mark {
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 300;
  color: rgba(176,141,87,0.2);
  line-height: 0.6;
  margin-bottom: 1rem;
}

.review-text {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.review-source {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
}

.review-source strong {
  color: var(--terracotta);
  font-weight: 400;
}

.media-list { display: flex; flex-direction: column; }

.media-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.15);
  transition: background 0.25s, padding 0.25s, margin 0.25s;
}

.media-item:first-child { border-top: 1px solid rgba(176,141,87,0.15); }
.media-item:hover { background: rgba(176,141,87,0.04); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }

.media-year {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.media-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.media-outlet {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--mid);
}

.media-type {
  font-family: var(--sans);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--mid);
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}

.media-type.award { background: var(--terracotta); }
.media-type.tv    { background: var(--ink); }

/* ─── Contact ───────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-text h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.contact-text p {
  font-size: 1.05rem;
  color: var(--mid);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  color: var(--ink);
  transition: color 0.25s;
}

.contact-link:hover { color: var(--gold); }

.contact-link-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  width: 80px;
  flex-shrink: 0;
}

.contact-link span { border-bottom: 1px solid rgba(176,141,87,0.3); }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}

.form-input,
.form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(28,26,23,0.25);
  padding: 0.7rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus { border-bottom-color: var(--gold); }

.form-textarea { resize: none; height: 90px; }

/* ─── Ornament divider ──────────────────────────────────────── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 3rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(176,141,87,0.3), transparent);
}

.ornament-diamond {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.5;
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--parchment);
  opacity: 0.7;
}

.footer-copy {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(245,240,232,0.3);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
  transition: color 0.25s;
}

.footer-links a:hover { color: var(--gold); }

/* ─── Entrance animations ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Course card grid (kurzusok.html overview) ─────────────── */
.course-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.course-card {
  border: 1px solid rgba(176,141,87,0.22);
  padding: 2.5rem;
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}

.course-card:hover {
  border-color: rgba(176,141,87,0.7);
  box-shadow: 0 4px 28px rgba(176,141,87,0.09);
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.35s ease;
}

.course-card:hover::before { width: 100%; }

.course-card-num {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 300;
  color: rgba(176,141,87,0.18);
  line-height: 1;
  margin-bottom: 1rem;
}

.course-card-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 1rem;
}

.course-card-count {
  font-family: var(--sans);
  font-size: 0.57rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.course-card-desc {
  font-size: 0.97rem;
  color: var(--mid);
  line-height: 1.75;
  min-height: 3rem;
}

.course-card-footer {
  margin-top: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  gap: 0.5rem;
}

.course-card-footer::after {
  content: '→';
  font-family: var(--serif);
  font-size: 1rem;
  font-style: normal;
  transition: transform 0.2s;
}

.course-card:hover .course-card-footer::after {
  transform: translateX(5px);
}

/* ─── Back link (course subpages) ───────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.2s;
}
.back-link::before { content: '←'; font-family: var(--serif); font-size: 1rem; }
.back-link:hover { color: var(--gold); }

/* ─── Lecture list (course subpages) ────────────────────────── */
.lecture-list { display: flex; flex-direction: column; }

.lecture-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.18);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s, padding 0.2s, margin 0.2s;
}

.lecture-item:first-child { border-top: 1px solid rgba(176,141,87,0.18); }

.lecture-item:hover {
  background: rgba(176,141,87,0.05);
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.lecture-num {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 300;
}

.lecture-title {
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
}

.lecture-ext {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.lecture-item:hover .lecture-ext { opacity: 1; }

/* ─── Lecture diasor gallery ─────────────────────────────────── */
.diasor-wrap {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.diasor-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: 340px;
  flex-shrink: 0;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(176,141,87,0.3) transparent;
}

.diasor-thumbs::-webkit-scrollbar { width: 4px; }
.diasor-thumbs::-webkit-scrollbar-track { background: transparent; }
.diasor-thumbs::-webkit-scrollbar-thumb { background: rgba(176,141,87,0.3); border-radius: 2px; }

.diasor-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  display: block;
  width: 100%;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}

.diasor-thumb:hover { opacity: 0.8; }
.diasor-thumb.active { border-color: var(--gold); }

.diasor-viewer {
  flex: 1;
  position: sticky;
  top: 6rem;
  align-self: flex-start;
}

.diasor-main-img {
  width: 100%;
  display: block;
  max-height: calc(100vh - 14rem);
  object-fit: contain;
  background: rgba(28,26,23,0.04);
  transition: opacity 0.18s;
}

.diasor-meta {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.diasor-felirat {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  flex: 1;
}

.diasor-counter {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}

.diasor-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.diasor-nav-btn {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(28,26,23,0.2);
  padding: 0.4rem 1rem;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.diasor-nav-btn:hover {
  background: var(--gold);
  color: var(--parchment);
  border-color: var(--gold);
}

/* ─── Vitafórum article layout ──────────────────────────────── */
.vita-wrap {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.vita-wrap:not(.vita-has-images) .vita-text {
  max-width: 80ch;
}
.vita-text {
  flex: 1;
  min-width: 0;
}
.vita-kepek-panel {
  flex-shrink: 0;
  width: 260px;
  position: sticky;
  top: 6rem;
  display: none;   /* shown by JS once images load */
}
.vita-main-img {
  width: 100%;
  display: block;
  box-shadow: 4px 6px 24px rgba(28,26,23,0.18);
  border: 1px solid rgba(176,141,87,0.2);
  transition: opacity 0.18s;
  cursor: zoom-in;
}
.vita-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 0.6rem;
}
.vita-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.15s, border-color 0.15s;
}
.vita-thumb:hover  { opacity: 0.8; }
.vita-thumb.active { border-color: var(--gold); }

/* ─── Visszhang overview cards (2-column, larger) ────────────── */
.visszhang-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
  margin-top: 2.5rem;
}
.visszhang-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(176,141,87,0.22);
  padding: 2.4rem 2.2rem 2rem;
  position: relative;
  transition: box-shadow 0.25s, border-color 0.25s;
  background: var(--parchment);
  overflow: hidden;
}
.visszhang-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.visszhang-card:hover::before { transform: scaleX(1); }
.visszhang-card:hover {
  box-shadow: 0 8px 32px rgba(28,26,23,0.10);
  border-color: rgba(176,141,87,0.45);
}
.visszhang-card .vita-card-title { font-size: 1.35rem; }
.visszhang-card .vita-card-leiras { -webkit-line-clamp: 4; }

/* ─── Vitafórum overview cards ───────────────────────────────── */
.vita-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.vita-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(176,141,87,0.22);
  padding: 1.8rem 1.6rem 1.4rem;
  position: relative;
  transition: box-shadow 0.25s, border-color 0.25s;
  background: var(--parchment);
  overflow: hidden;
}
.vita-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.vita-card:hover::before { transform: scaleX(1); }
.vita-card:hover {
  box-shadow: 0 8px 32px rgba(28,26,23,0.10);
  border-color: rgba(176,141,87,0.45);
}
.vita-card-num {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.vita-card-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}
.vita-card-alcim {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--mid);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.vita-card-leiras {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vita-card-footer {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  transition: letter-spacing 0.2s;
}
.vita-card:hover .vita-card-footer { letter-spacing: 0.28em; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #hero { padding: 3rem; min-height: auto; flex-direction: column; gap: 3rem; }
  #hero::after { display: none; }
  .hero-topright { justify-content: flex-start; }
  .hero-bottomright { justify-content: flex-start; }
  .hero-cta { justify-content: flex-start; }
  .subpage-hero { padding: 3.5rem 3rem 3rem; }
  .subpage-hero::after { left: 1.5rem; }
  .subpage-content { padding: 4rem 3rem; }
  .bio-grid { grid-template-columns: 1fr; gap: 3rem; }
  .bio-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .visszhang-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .research-card:nth-child(2n) { border-right: none; }
  .course-card-grid { grid-template-columns: repeat(2, 1fr); }
  .visszhang-card-grid { grid-template-columns: 1fr; }
  .vita-card-grid { grid-template-columns: repeat(2, 1fr); }
  .vita-wrap { flex-direction: column; }
  .vita-kepek-panel { position: static; width: 100%; }
  .diasor-wrap { flex-direction: column; }
  .diasor-thumbs { width: 100%; max-height: none; grid-template-columns: repeat(6, 1fr); }
  .diasor-viewer { position: static; }
}

@media (max-width: 768px) {
  .page-box { margin: 0; box-shadow: none; }
  nav { padding: 1.2rem 2rem; flex-wrap: wrap; }

  /* Hamburger menu (CSS-only, driven by the hidden checkbox) */
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 26px; height: 20px; margin-left: auto; cursor: pointer;
  }
  .nav-burger span {
    display: block; height: 2px; width: 100%; background: var(--ink);
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .nav-links {
    display: none; flex-direction: column; width: 100%;
    gap: 0; margin-top: 1rem; order: 3;
  }
  .nav-links li { border-top: 1px solid rgba(176,141,87,0.18); }
  .nav-links a { display: block; padding: 0.85rem 0; font-size: 0.7rem; }
  .nav-links a::after { display: none; }
  .nav-toggle-cb:checked ~ .nav-links { display: flex; }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Fix horizontal overflow: wrap the section tabs, stack the two-column
     biography/gallery blocks, and let images be fluid */
  .bio-nav-btns { flex-wrap: wrap; margin-left: 0; }
  .rovid-wrap { flex-direction: column; gap: 2rem; }
  .rovid-portrait { width: 100%; max-width: 260px; margin-top: 0; }
  .photo-section { flex-direction: column; gap: 1.5rem; }
  .photo-grid { width: 100%; }
  .photo-viewer { position: static; width: 100%; }

  /* Justified text reads badly in a narrow column */
  .md-content p, .hero-tagline { text-align: left; }

  #hero { padding: 3rem 2rem; }
  #hero::before { font-size: 45vw; }
  #hero::after { display: none; }
  .subpage-hero { padding: 2.5rem 2rem 2rem; }
  .subpage-hero::after { display: none; }
  .subpage-content { padding: 3rem 2rem; }
  .research-section { padding: 4rem 2rem; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { border-right: none; }
  .pub-item { grid-template-columns: 60px 1fr; }
  .pub-type { display: none; }
  .course-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .course-code { padding-top: 0; }
  .media-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .media-year { padding-bottom: 0; }
  footer { flex-direction: column; gap: 1.5rem; text-align: center; padding: 2.5rem 2rem; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .course-card-grid { grid-template-columns: 1fr; }
  .vita-card-grid { grid-template-columns: 1fr; }
  .visszhang-card-grid { grid-template-columns: 1fr; }
  .lecture-item { grid-template-columns: 2rem 1fr; }
  .lecture-ext { display: none; }
  .diasor-thumbs { grid-template-columns: repeat(4, 1fr); }
}
