/* ==========================================================================
   pages.css — page-specific layout: hero + orbital motif, home sections,
   talks page, CV page, thesis page, 404. jankovic.phd
   ========================================================================== */

/* ---- Hero (home) ---- */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: var(--space-7); align-items: center;
  min-height: calc(78vh - var(--nav-height)); padding-block: var(--space-8) var(--space-7); }
.hero__text { display: grid; gap: var(--space-4); justify-items: start; }
.hero__name { font-weight: 700; }
.hero__name .grad {
  background: var(--grad-hero);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__bio { font-size: var(--text-lg); color: var(--text-muted); max-width: 60ch; }
.hero__links { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.hero__ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); }
.hero__ctas .btn--primary:hover .icon { translate: 0 2px; }
.hero__ctas .icon { transition: translate var(--dur-1) var(--ease-out); }

/* Orbital motif wrapping the portrait */
.hero__visual { position: relative; display: grid; place-items: center; }
.orbital { width: min(100%, 560px); height: auto; overflow: visible; }
.orbital__rings { opacity: 0.3; transform-origin: 300px 300px; }
:root[data-theme="light"] .orbital__rings { opacity: 0.35; }
html.js .orbital__rings { animation: precess 90s linear infinite; animation-delay: 1.4s; }
@keyframes precess { to { transform: rotate(360deg); } }
.orbital__ring { stroke-width: 1.5; fill: none; }
html.js .orbital__ring { stroke-dasharray: 940; stroke-dashoffset: 940;
  animation: draw-in 1.2s var(--ease-out) forwards; }
html.js .orbital__ring:nth-child(2) { animation-delay: 150ms; }
html.js .orbital__ring:nth-child(3) { animation-delay: 300ms; }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
.orbital__nucleus { fill: var(--accent-primary); }
.orbital__satellite { fill: var(--motif-a); }

.hero__portrait { position: absolute; width: clamp(170px, 42%, 240px); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; border: 3px solid var(--border-strong);
  background: var(--surface-raised); box-shadow: var(--shadow-card); }
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero__portrait--initials { display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--text-heading); }

@media (max-width: 1199px) { .hero { grid-template-columns: 1fr 0.8fr; } }
@media (max-width: 959px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; gap: var(--space-6); }
  .hero__visual { order: -1; }
  .orbital { width: min(80vw, 340px); }
  .hero__text { justify-items: center; }
  .hero__bio { margin-inline: auto; }
}

/* ---- Home sections ---- */
.topics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }

.section--subtle { background: var(--bg-subtle); }

/* ---- Talks & Posters page ---- */
.page-head { padding-block: var(--space-8) var(--space-6); display: grid; gap: var(--space-3); justify-items: start; }
.page-head .section-head { margin-bottom: 0; }
.page-head__intro { color: var(--text-muted); }
.anchor-pills { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.anchor-pills a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill); text-decoration: none;
  font-size: var(--text-sm); font-weight: 500; color: var(--text-body);
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.anchor-pills a:hover { border-color: var(--accent-primary); background: var(--surface-raised); }
.anchor-pills .icon { width: 14px; height: 14px; }

/* ---- CV page ---- */
.cv-head { padding-block: var(--space-8) var(--space-6); display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.cv-head .section-head { margin-bottom: 0; }
.cv-head__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---- Thesis page ---- */
.thesis-head { padding-block: var(--space-8) var(--space-4); display: grid; gap: var(--space-3); justify-items: start; }
.thesis-head h1 { font-size: var(--text-2xl); max-width: 26ch; }
.thesis-head__supervisors { font-size: var(--text-sm); color: var(--text-muted); }

/* ---- 404 ---- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--space-9); }
.error-page .orbital { width: 200px; margin-inline: auto; }
.error-page h1 { font-size: var(--text-3xl); }
.error-page p { margin-inline: auto; color: var(--text-muted); }
.error-page .btn { margin-top: var(--space-5); }

/* ---- Print (CV page focus) ---- */
@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg-page: #fff; --bg-subtle: #fff; --surface-card: #fff; --surface-raised: #fff;
    --border-hairline: #d7dedf; --border-strong: #8e9a9e;
    --text-body: #111517; --text-muted: #5b686d;
    --text-heading: #5d3a77; --text-eyebrow: #714c8b;
    --text-link: #006760; --nebula: none;
    --thumb-dim: none;
  }
  body { background: #fff !important; }
  .cv-layout { grid-template-columns: 1fr; gap: 1rem; }
  .cv-sidebar { position: static; }
  .cv-head__actions, .anchor-pills, .hero__ctas { display: none !important; }
  html.js .load-rise, html.js [data-reveal] { opacity: 1 !important; translate: 0 0 !important; }
  a { color: inherit; text-decoration: none; }
  .tl-entry, .cv-section { break-inside: avoid; }
}
