:root {
  color-scheme: light;
  --white: #ffffff;
  --black: #171717;
  --grey-700: #565656;
  --grey-500: #787878;
  --grey-300: #d9d9d9;
  --grey-100: #f3f3f1;
  --shell: 1120px;
  --page-padding: clamp(22px, 4vw, 52px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
}

body > .site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 5px;
}

.site-shell {
  width: min(100% - (2 * var(--page-padding)), var(--shell));
  margin-inline: auto;
}

.site-header {
  background: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-height: 82px;
  border-bottom: 1px solid var(--grey-300);
}

.site-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 28px;
}

.site-nav a {
  color: var(--grey-700);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--black);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: start;
  gap: clamp(60px, 10vw, 128px);
  padding-block: clamp(92px, 12vw, 152px) clamp(106px, 14vw, 174px);
}

.hero-copy {
  max-width: 800px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--grey-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  max-width: 15ch;
  margin: 22px 0 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.lead {
  max-width: 700px;
  margin: 34px 0 0;
  color: var(--grey-700);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-top: 38px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--black);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.system-artwork {
  width: 100%;
  margin: 0;
}

.system-artwork img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(100%);
}

.system-artwork figcaption {
  margin-top: 12px;
  color: var(--grey-500);
  font-size: 12px;
  line-height: 1.4;
}

.research {
  padding-block: 34px 88px;
  border-top: 1px solid var(--grey-300);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px 72px;
  margin-top: 36px;
}

.research-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-300);
}

.research-number {
  color: var(--grey-500);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.research-item h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.research-item h2 a {
  text-decoration: none;
}

.research-item h2 a:hover {
  color: var(--grey-700);
}

.research-item p {
  margin: 16px 0 0;
  color: var(--grey-700);
  font-size: 15px;
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 24px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 10px 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-block: 64px 88px;
  }

  .system-artwork {
    grid-row: 1;
    width: 138px;
  }

  .research-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

.site-nav a.is-active {
  color: var(--black);
}

.lang-switch {
  padding: 3px 9px;
  border: 1px solid var(--grey-300);
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch:hover {
  border-color: var(--black);
}

.site-footer {
  border-top: 1px solid var(--grey-300);
  margin-top: 64px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px 48px;
  padding-block: clamp(40px, 6vw, 64px) 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 420px;
}

.footer-mark {
  flex-shrink: 0;
  width: 52px;
  height: 65px;
  object-fit: cover;
  filter: grayscale(100%);
  border: 1px solid var(--grey-300);
}

.footer-wordmark {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.footer-tagline {
  margin: 8px 0 0;
  color: var(--grey-500);
  font-size: 13px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.footer-nav a {
  color: var(--grey-700);
  font-size: 14px;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--black);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px 32px;
  border-top: 1px solid var(--grey-300);
  color: var(--grey-500);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.footer-bottom a {
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--black);
}

@media (max-width: 760px) {
  .footer-inner {
    flex-direction: column;
  }
}

/* --- Aloldal fejléc (kutatás / esszé / publikáció aloldalak) --- */

.page-hero {
  padding-block: clamp(56px, 8vw, 96px) 40px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-500);
  font-size: 13px;
  text-decoration: none;
}

.breadcrumb:hover {
  color: var(--black);
}

.page-hero .research-number {
  display: block;
  margin-bottom: 18px;
}

.page-hero h1 {
  max-width: 22ch;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero .lead {
  max-width: 640px;
}

/* --- Dokumentum tartalom (kutatási/esszé szövegek) --- */

.doc-section {
  padding-block: 0 96px;
  border-top: 1px solid var(--grey-300);
}

.doc-content {
  max-width: 700px;
  margin-top: 40px;
}

.doc-content h2 {
  margin: 44px 0 16px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc-content h2:first-child {
  margin-top: 0;
}

.doc-content p {
  margin: 0 0 20px;
  color: var(--grey-700);
  font-size: 16px;
  line-height: 1.75;
}

.doc-content p strong {
  color: var(--black);
}

.doc-content ul {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--grey-700);
}

.doc-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.doc-figure {
  margin: 8px 0 44px;
}

.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
  border: 1px solid var(--grey-300);
}

.doc-figure figcaption {
  margin-top: 12px;
  color: var(--grey-500);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Nagyító hover-lencse az ábrákhoz --- */

.magnify-wrap {
  position: relative;
  cursor: zoom-in;
}

.magnify-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(23, 23, 23, 0.72);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.magnify-wrap:hover .magnify-hint {
  opacity: 0;
}

.magnify-lens {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--black), 0 12px 32px rgba(0, 0, 0, 0.35);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  filter: grayscale(100%);
}

.magnify-wrap:hover .magnify-lens {
  opacity: 1;
}

@media (max-width: 760px), (hover: none) {
  .magnify-lens,
  .magnify-hint {
    display: none;
  }

  .magnify-wrap {
    cursor: default;
  }
}

.doc-teaser {
  position: relative;
  max-height: 62vh;
  overflow: hidden;
}

.doc-teaser::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white));
}

.doc-more {
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--black);
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: var(--white);
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

.btn-external {
  border-color: var(--grey-300);
  color: var(--grey-700);
}

.btn-external:hover {
  border-color: var(--black);
  background: var(--white);
  color: var(--black);
}

.biblio {
  margin: 0;
  padding-left: 20px;
  color: var(--grey-700);
  font-size: 14px;
  line-height: 1.7;
}

.biblio li {
  margin-bottom: 10px;
}

.biblio a {
  text-decoration: underline;
  text-decoration-color: var(--grey-300);
  text-underline-offset: 3px;
}

.biblio a:hover {
  text-decoration-color: var(--black);
}

.source-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--grey-300);
  color: var(--grey-500);
  font-size: 13px;
  line-height: 1.6;
}

/* --- Publikációk oldal --- */

.pub-list {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--grey-300);
}

.pub-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding-block: 18px;
  border-bottom: 1px solid var(--grey-300);
}

.pub-index {
  color: var(--grey-500);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pub-item a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.pub-item a:hover {
  color: var(--grey-700);
  text-decoration: underline;
  text-decoration-color: var(--grey-300);
}

.pub-meta {
  margin: 6px 0 0;
  color: var(--grey-500);
  font-size: 13px;
}

/* --- Esszék oldal --- */

.essay-list {
  margin-top: 36px;
  display: grid;
  gap: 0;
}

.essay-item {
  padding-block: 32px;
  border-top: 1px solid var(--grey-300);
}

.essay-item:last-child {
  border-bottom: 1px solid var(--grey-300);
}

.essay-item h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.essay-source {
  margin: 0 0 14px;
  color: var(--grey-500);
  font-size: 13px;
}

.essay-item p {
  margin: 0 0 18px;
  color: var(--grey-700);
  max-width: 700px;
}

/* --- Kapcsolat oldal --- */

.contact-block {
  margin-top: 40px;
  max-width: 520px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--grey-300);
  border-bottom: 1px solid var(--grey-300);
}

.contact-label {
  color: var(--grey-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-width: 80px;
}

.contact-value a {
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
}

.contact-hint {
  margin-top: 16px;
  color: var(--grey-500);
  font-size: 13px;
}

@media (max-width: 760px) {
  .pub-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

/* --- Kutatás aloldal: rövid szöveg + "további kutatási területek" oldalsáv --- */

.doc-section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.doc-main .doc-more {
  margin-top: 36px;
}

.doc-aside {
  border-left: 1px solid var(--grey-300);
  padding-left: clamp(24px, 3vw, 40px);
  padding-top: 20px;
}

.doc-aside .section-label {
  margin-bottom: 8px;
}

.aside-list {
  margin-top: 24px;
}

.aside-item {
  padding-block: 20px;
  border-top: 1px solid var(--grey-300);
}

.aside-item:first-child {
  border-top: none;
  padding-top: 0;
}

.aside-item .research-number {
  display: block;
  margin-bottom: 8px;
}

.aside-item h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.aside-item h3 a {
  text-decoration: none;
}

.aside-item h3 a:hover {
  color: var(--grey-700);
}

.aside-item p {
  margin: 8px 0 0;
  color: var(--grey-500);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .doc-section-split {
    grid-template-columns: 1fr;
  }

  .doc-aside {
    border-left: none;
    border-top: 1px solid var(--grey-300);
    padding-left: 0;
    padding-top: 32px;
    margin-top: 8px;
  }
}

/* --- Profil (életrajz) oldal --- */

.profile-portrait {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(100%);
  border: 1px solid var(--grey-300);
  margin-bottom: 8px;
}

.doc-content h3 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.availability {
  margin: 8px 0 0;
  color: var(--grey-500);
  font-size: 13px;
}

.availability a {
  text-decoration: underline;
  text-decoration-color: var(--grey-300);
  text-underline-offset: 3px;
}

.availability a:hover {
  text-decoration-color: var(--black);
}

.profile-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--grey-300);
  border-bottom: 1px solid var(--grey-300);
}

.profile-cta p {
  margin: 0;
  color: var(--grey-700);
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
