@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/sf-pro-display-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/sf-pro-display-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Display";
  src: url("../fonts/sf-pro-display-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #fbfaf8;
  --color-bg-translucent: rgba(251, 250, 248, 0.9);
  --color-bg-translucent-strong: rgba(251, 250, 248, 0.98);
  --color-text: #111111;
  --color-muted: #767676;
  --color-border: #e6e6e6;
  --color-accent: #f15106;
  --gap: 6px;
  --header-h: 88px;
  --max-width: 1680px;
  --font-body: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  background: var(--color-accent);
  color: #fff;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.drawer-open {
  overflow: hidden;
}

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

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 24px;
  background: var(--color-bg-translucent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  transform: translateY(0);
  transition: transform 0.3s var(--ease);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.menu-btn {
  display: flex;
  align-items: center;
  padding: 12px 4px;
  margin: -12px -4px;
  transition: transform 0.15s ease;
}

.menu-btn:active {
  transform: scale(0.92);
}

.menu-btn .menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.menu-btn .menu-icon span {
  display: block;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease, background 0.15s ease;
}

.menu-btn:hover .menu-icon span {
  background: var(--color-accent);
}

body.drawer-open .menu-btn .menu-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.drawer-open .menu-btn .menu-icon span:nth-child(2) {
  opacity: 0;
}
body.drawer-open .menu-btn .menu-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Drawer */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 17, 17, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 88vw);
  background: #fff;
  z-index: 50;
  padding: 100px 40px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -24px 0 60px rgba(17, 17, 17, 0.14);
}

body.drawer-open .drawer {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.drawer-close:hover {
  color: var(--color-accent);
}

.drawer-close:active {
  transform: scale(0.9);
}

@media (max-width: 480px) {
  .drawer { padding: 88px 24px 32px; }
  .drawer-nav > a { font-size: 22px; }
  .drawer-category { font-size: 17px; }
}

.drawer-nav,
.drawer-nav a,
.drawer-category,
.drawer-footer a {
  text-transform: lowercase;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
}

.drawer-nav > a {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 10px 0;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.drawer-nav > a:hover {
  color: var(--color-accent);
}

.drawer-group {
  display: flex;
  flex-direction: column;
}

/* Personal / Work / Exhibitions: same visual tier, whether it's a label
   (span) or a direct link (Work has no sub-items of its own). */
.drawer-category {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--color-text);
  margin-top: 22px;
  margin-bottom: 6px;
  padding: 4px 0;
  transition: color 0.15s ease;
}

a.drawer-category:hover {
  color: var(--color-accent);
}

.drawer-group a.drawer-sub-link {
  font-size: 16px;
  padding: 6px 0 6px 4px;
  color: var(--color-muted);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.drawer-group a.drawer-sub-link:hover {
  color: var(--color-text);
  padding-left: 10px;
}

.drawer-nav > a.is-current,
.drawer-category.is-current,
.drawer-group a.drawer-sub-link.is-current {
  color: var(--color-accent);
}

.drawer-nav > a.is-current::before,
.drawer-category.is-current::before,
.drawer-group a.drawer-sub-link.is-current::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--color-accent);
  vertical-align: middle;
}

.drawer-footer {
  display: flex;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.drawer-footer a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

.drawer-footer a:hover {
  color: var(--color-accent);
}

/* Cursor badge */

.cursor-badge {
  position: fixed;
  top: 0;
  left: 0;
  width: 68px;
  height: 68px;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  filter: drop-shadow(0 3px 12px rgba(40, 24, 10, 0.28));
  transition: opacity 0.2s ease;
  will-change: transform;
}

.cursor-badge img {
  width: 100%;
  height: 100%;
  display: block;
}

.cursor-badge.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (hover: none) {
  .cursor-badge { display: none; }
}

/* Mix masonry grid */

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

.mix-grid {
  column-count: 6;
  column-gap: var(--gap);
  padding: 16px 24px 100px;
}

.mix-item {
  position: relative;
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: pointer;
  background: #f2f2f2;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.mix-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mix-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease);
}

.img-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-fade.is-loaded {
  opacity: 1;
}

.mix-item:hover img {
  transform: scale(1.045);
}

.mix-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mix-item:hover .mix-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1600px) {
  .mix-grid { column-count: 5; }
}

@media (max-width: 1300px) {
  .mix-grid { column-count: 4; }
}

@media (max-width: 980px) {
  .mix-grid { column-count: 3; }
}

@media (max-width: 600px) {
  .mix-grid { column-count: 2; gap: 4px; padding: 12px 12px 80px; }
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-bg-translucent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-content {
  max-width: 90vw;
  max-height: 86vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}

.lightbox-caption .series-link {
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.lightbox-caption .series-link:hover {
  text-decoration: underline;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  padding: 14px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--color-accent);
}

.lightbox-close { top: 16px; right: 16px; }
.lightbox-close:active { transform: scale(0.9); }

.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:active { transform: translateY(-50%) scale(0.9); }

.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next:active { transform: translateY(-50%) scale(0.9); }

@media (max-width: 600px) {
  .lightbox-content img { max-height: 70vh; }
  .lightbox-prev, .lightbox-next { padding: 10px; font-size: 22px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-close { top: 8px; right: 8px; font-size: 26px; padding: 10px; }
}

/* Series page */

.series-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 8px;
}

.series-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 18px;
  transition: color 0.15s ease;
}

.series-back:hover { color: var(--color-accent); }

.series-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-wrap: balance;
}

.fetch-error {
  color: var(--color-muted);
  font-size: 14px;
  padding: 40px 24px;
}

.series-meta {
  color: var(--color-muted);
  font-size: 14px;
}

.series-story {
  max-width: 1040px;
  margin: 24px auto 100px;
  padding: 0 24px;
}

/* Slideshow (personal projects / exhibitions) */

.slideshow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 40px;
}

.slideshow-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  background: #f7f7f7;
}

.slideshow-viewport img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  user-select: none;
}

.slideshow-prev,
.slideshow-next {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.slideshow-prev:hover,
.slideshow-next:hover {
  background: #f2f2f2;
  color: var(--color-accent);
}

.slideshow-prev:active,
.slideshow-next:active {
  transform: scale(0.92);
}

.slideshow-counter {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .slideshow { gap: 4px; }
  .slideshow-viewport img { max-height: 58vh; }
  .slideshow-prev,
  .slideshow-next {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
}

/* Talks (exhibition video embeds) */

.talks-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.talks-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.talks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.talk-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.talk-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.talk-title {
  margin-top: 10px;
  font-size: 14px;
  color: var(--color-muted);
}

@media (max-width: 720px) {
  .talks-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* About page */

.about-page {
  padding: 60px 24px 100px;
}

.about-inner {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: start;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f2f2f2;
}

.about-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  max-width: 560px;
}

.about-text p,
.press-list p {
  text-wrap: pretty;
}

@media (max-width: 800px) {
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-portrait { max-width: 320px; }
}

.press-list {
  max-width: 640px;
  font-size: 16px;
  line-height: 1.8;
}

.press-list a {
  transition: color 0.15s ease;
}

.press-list a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--color-muted);
  flex-wrap: wrap;
}

.footer-email a { transition: color 0.15s ease; }
.footer-email a:hover { color: var(--color-accent); }

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a { transition: color 0.15s ease; }
.footer-links a:hover { color: var(--color-accent); }
