/* Tibor 2026 — typography and chrome.
   Direction follows unslop by Damir Sokolovsky, CC BY 4.0.
   Character: cinematic, spatial, measured.
   Richness lives in the depth gallery; chrome stays quiet. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #050506;
  --surface: rgba(14, 14, 16, 0.78);
  --raised: #19191b;
  --hairline: rgba(237, 237, 237, 0.1);
  --text: #ededed;
  --text-secondary: #a1a1a6;
  --text-muted: #85858b;
  --btn-bg: #ededed;
  --btn-fg: #111111;
  --focus: rgba(237, 237, 237, 0.55);
  --font-display: "Instrument Serif", "Times New Roman", "Songti SC", "Noto Serif SC", "STSong", serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-pad: 24px;
  --nav-h: 36px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.home,
html.home body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
}

body.is-nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 8px;
  transform: translateY(-80px);
}

.skip-link:focus {
  transform: none;
}

/* Gallery stage */

.gallery-block {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.gallery-block .site-overlay {
  position: absolute;
  inset: 0;
  z-index: auto;
  pointer-events: none;
}

.gallery-stage {
  position: absolute;
  inset: 0;
  background: var(--bg);
  touch-action: none;
}

.gallery-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.gallery-fallback {
  height: 100%;
  overflow: auto;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 96px 24px 120px;
  background: var(--bg);
}

.gallery-fallback figure {
  margin: 0;
  flex: 0 0 auto;
  width: min(240px, 42vw);
}

.gallery-fallback img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Overlay chrome — pointer-events none except interactive bits */

.site-overlay {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.site-overlay a,
.site-overlay button,
.site-overlay .site-nav,
.site-overlay .hero-actions {
  pointer-events: auto;
}

/* Nav */

.site-header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0 var(--page-pad);
  pointer-events: none;
}

.site-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px 4px 4px 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--text);
}

.site-logo img,
.site-logo svg {
  width: 20px;
  height: 20px;
  display: block;
}

.site-logo .mark-letters {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.is-current {
  color: var(--text);
}

.nav-links a.is-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 0 16px;
  margin-left: 4px;
}

.nav-links a.is-primary:hover {
  color: var(--btn-fg);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
}

.nav-toggle-bars {
  display: block;
  width: 16px;
  height: 10px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 160ms var(--ease), top 160ms var(--ease);
}

.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { top: 8px; }

body.is-nav-open .nav-toggle-bars::before {
  top: 4.5px;
  transform: rotate(45deg);
}

body.is-nav-open .nav-toggle-bars::after {
  top: 4.5px;
  transform: rotate(-45deg);
}

/* Hero type — only the name holds the center */

.hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 96px var(--page-pad) 120px;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 920px;
}

.hero-kicker {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  mix-blend-mode: exclusion;
  -webkit-mix-blend-mode: exclusion;
}

.hero-role {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-secondary);
}

.hero-lower {
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-bio {
  margin: 0;
  max-width: 28rem;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 20px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline);
}

.btn-secondary:hover {
  border-color: rgba(237, 237, 237, 0.22);
}

.hero-hint {
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 32px;
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Inner pages */

.page-shell {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.page-main {
  padding: 128px var(--page-pad) 80px;
  max-width: 680px;
  margin: 0 auto;
}

.page-main h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-main .entry-content {
  font-size: 16px;
  line-height: 28px;
  color: var(--text-secondary);
}

.page-main .entry-content > * + * {
  margin-top: 16px;
}

.page-main a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
}

.work-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111;
}

.work-card span {
  font-size: 14px;
  line-height: 20px;
}

.page-empty {
  color: var(--text-muted);
}

/* Entrance — one short rise for the name only */

@media (prefers-reduced-motion: no-preference) {
  .hero-kicker,
  .hero-role {
    animation: rise-in 400ms var(--ease) both;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-kicker,
  .hero-role,
  .btn,
  .nav-links a,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    animation: none;
    transition: none;
  }
}

/* Small screens: collapse nav */

@media (max-width: 720px) {
  :root {
    --page-pad: 20px;
  }

  .site-header {
    top: 16px;
    justify-content: stretch;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    padding: 4px 4px 4px 8px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
  }

  body.is-nav-open .nav-links,
  .nav-panel {
    display: flex;
  }

  .nav-panel {
    display: none;
    position: fixed;
    top: 76px;
    left: var(--page-pad);
    right: var(--page-pad);
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: auto;
  }

  body.is-nav-open .nav-panel {
    display: flex;
    animation: rise-in 200ms var(--ease) both;
  }

  .nav-panel a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 15px;
  }

  .nav-panel a.is-current,
  .nav-panel a:hover {
    color: var(--text);
  }

  .nav-panel a.is-primary {
    background: var(--btn-bg);
    color: var(--btn-fg);
  }

  .hero {
    padding: 88px var(--page-pad) 112px;
  }

  .hero-name {
    letter-spacing: -0.02em;
  }

  .hero-lower {
    bottom: 80px;
  }

  .hero-hint {
    bottom: 24px;
  }

  .page-main h1 {
    font-size: 32px;
  }
}

@media (min-width: 721px) {
  .nav-panel {
    display: none !important;
  }
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.home,
html.home body {
  overscroll-behavior: none;
}

/* About section — exhibition wall text after the hall */

.home-scroll {
  position: relative;
}

.about-section {
  position: relative;
  z-index: 1;
  background: var(--bg);
  color: var(--text);
  padding: 128px 64px 160px;
  scroll-margin-top: 0;
}

.about-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 80px 96px;
  align-items: start;
}

.about-left {
  position: sticky;
  top: 96px;
}

.about-kicker {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  line-height: 24px;
  color: var(--text-muted);
}

.about-title {
  margin: 0 0 40px;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.about-portrait {
  margin: 0 0 24px;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}

.about-portrait-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-identity {
  padding-top: 4px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 16px;
}

.about-name {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-role {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-secondary);
}

.about-block + .about-block {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--hairline);
}

.about-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 24px;
}

.about-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-heading span {
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
}

.about-intro {
  margin: 0 0 32px;
  max-width: 36rem;
  font-size: 16px;
  line-height: 28px;
  color: var(--text);
}

.about-facts {
  margin: 0;
  display: grid;
  gap: 16px;
}

.about-fact {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.about-fact dt {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
}

.about-fact dd {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--text);
}

.about-social a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease);
}

.about-social a:hover,
.about-social a:focus-visible {
  border-bottom-color: rgba(237, 237, 237, 0.45);
}

.about-social-sep {
  color: var(--text-muted);
}

.about-lines,
.about-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-lines li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}

.about-lines li:last-child {
  padding-bottom: 0;
}

.about-line-lead {
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
}

.about-line-detail {
  font-size: 15px;
  line-height: 24px;
  color: var(--text-secondary);
}

.about-line-role {
  display: block;
  font-size: 15px;
  line-height: 24px;
  color: var(--text);
}

.about-timeline {
  position: relative;
  padding-left: 20px;
}

.about-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 1px;
  background: var(--hairline);
}

.about-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 0 0 32px;
}

.about-timeline li:last-child {
  padding-bottom: 0;
}

.about-timeline li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary);
  box-shadow: 0 0 0 4px var(--bg);
}

.about-timeline-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 960px) {
  .about-section {
    padding: 112px 40px 128px;
  }

  .about-inner {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px 56px;
  }

  .about-title {
    font-size: 48px;
  }

  .about-heading h3 {
    font-size: 28px;
  }
}

@media (max-width: 720px) {
  .about-section {
    padding: 96px var(--page-pad) 96px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-left {
    position: static;
  }

  .about-title {
    font-size: 40px;
    margin-bottom: 32px;
  }

  .about-portrait {
    max-width: 240px;
  }

  .about-name {
    font-size: 28px;
  }

  .about-block + .about-block {
    margin-top: 48px;
    padding-top: 48px;
  }

  .about-heading {
    margin-bottom: 20px;
  }

  .about-heading h3 {
    font-size: 28px;
  }

  .about-fact,
  .about-lines li,
  .about-timeline li {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
  }
}
