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

:root {
  --font-sans: 'Spectral', serif;
  --font-display: 'Cormorant Garamond', serif;
  --font-italic: 'Lora', serif;
  --red-line: #db2777;
  --violet-line: #7c3aed;
  --magenta: #db2777;
  --purple: #7c3aed;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-tertiary: #999;
  --border: #e5e5e5;
  --bg: #fff;
  --bg-secondary: #f5f4f0;
}

html { font-size: 16px; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text-primary); }

/* ── Topbar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  z-index: 100;
}
.logo {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04cap;
  color: var(--text-primary);
  text-decoration: none;
}
.logo img { filter: grayscale(1); }
@media (prefers-color-scheme: dark) {
  .logo img { filter: grayscale(1) brightness(0) invert(1); }
}
.header-symbol {
  font-size: 22px;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s;
}
.header-symbol:hover { color: #00BFFF; }

.nav-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}
.nav-links a {
  font-family: var(--font-italic);
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a[href="/contact"]:hover { color: var(--magenta); }
.nav-links a[href="/cv"]:hover { color: var(--purple); }

/* ── Scissor row ── */
.scissor-row {
  position: fixed;
  top: 53px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  z-index: 201;
}
.h-dotted {
  flex: 1;
  height: 4px;
  background-image:
    radial-gradient(circle, var(--purple) 1.5px, transparent 2.5px),
    radial-gradient(circle, var(--magenta) 1.5px, transparent 2.5px);
  background-size: 22px 4px, 22px 4px;
  background-position: 0 0, 11px 0;
  background-repeat: repeat-x, repeat-x;
}
.sci {
  padding-left: 7px;
  display: flex;
  align-items: center;
}

/* ── Landing ── */
.landing {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.landing img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ── Body layout ── */
.body {
  display: flex;
  margin-top: 58px;
  height: calc(100vh - 58px);
}

/* ── Sidebar ── */
.sidebar {
  width: 160px;
  flex-shrink: 0;
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 58px;
  left: 0;
  bottom: 0;
  z-index: 110;
  background: transparent;
}
.sidebar::after {
  content: '';
  position: absolute;
  right: 0; top: -68px; bottom: 0;
  width: 1.5px;
  background: var(--red-line);
  z-index: 1;
}
.sidebar-item {
  padding: 6px 20px 6px 34px;
  cursor: pointer;
  position: relative;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.sidebar-item.active::before {
  content: '›';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Times New Roman', serif;
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1;
}

.sidebar.on-landing .sidebar-title { color: rgba(0,0,0,0.7); }
.sidebar.on-landing .sidebar-item.active .sidebar-title,
.sidebar.on-landing .sidebar-item:hover .sidebar-title { color: #000; }
.sidebar.on-landing .sidebar-item.active::before { color: #000; }

.sidebar-label {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
  padding: 0 12px 8px 20px;
  transition: none;
}
.sidebar.on-landing .sidebar-label { color: rgba(0,0,0,0.4); }
.sidebar-label--exhibitions { margin-top: 20px; }
.sidebar-item--exhibition { cursor: default; }
.sidebar-subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.sidebar.on-landing .sidebar-subtitle { color: rgba(0,0,0,0.4); }

.sidebar-title {
  font-family: 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-tertiary);
  line-height: 1.3;
  transition: none;
}
.sidebar-item.active .sidebar-title { color: var(--text-primary); }
.sidebar-item:hover .sidebar-title { color: var(--text-primary); }

/* ── Scroll area ── */
.scroll-area {
  flex: 1;
  overflow-y: scroll;
  scroll-behavior: auto;
  scrollbar-width: none;
  margin-left: 160px;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ── Project section ── */
.project-section {
  padding: 32px 36px 48px;
}
.p-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  margin-left: max(0px, calc(26.5vw - 196px));
}
.p-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: max(0px, calc(26.5vw - 196px));
  margin-bottom: 6px;
}
.p-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.p-year {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.p-sub {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  margin-left: max(0px, calc(26.5vw - 196px));
}

/* ── Project content (markdown) ── */
.project-content {
  width: 47vw;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: max(0px, calc(26.5vw - 196px));
}
.project-content p {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  width: 100%;
  margin-bottom: 20px;
}
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
  margin: 0 0 6px 0;
}
.img-wrap {
  position: relative;
  display: block;
  margin-bottom: 6px;
}
.img-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.img-zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.img-wrap:hover .img-zoom-hint {
  opacity: 1;
}
.project-content img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 6px;
}
.project-content em {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 12px;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 18px;
}

/* Two-column image grid: use HTML in markdown */
.img-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.img-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.img-grid2 img,
.img-grid3 img { margin-bottom: 0; }

/* ── Divider ── */
.divider {
  position: relative;
  margin-left: -161px;
  padding-left: 161px;
  height: 40px;
}
.divider-line {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--violet-line);
  z-index: 2;
}
.divider-dot {
  position: absolute;
  top: 50%;
  left: 149px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--text-primary);
  border-radius: 50%;
  z-index: 10;
}

/* ── About page ── */
.about-page {
  max-width: 560px;
  padding: 48px 36px;
  margin-top: 68px;
  margin-left: auto;
  margin-right: auto;
}
.about-page h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.about-page strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}
.about-page .tagline {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 16px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.about-page p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e8e6df;
    --text-secondary: #a8a69f;
    --text-tertiary: #6b6963;
    --border: #2a2a28;
    --bg: #141413;
    --bg-secondary: #1e1e1c;
  }
}

/* ── Contact page ── */
.contact-page {
  max-width: 560px;
  padding: 48px 36px;
  margin-top: 68px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.contact-intro {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.contact-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 40px;
  line-height: 1.1;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}
.contact-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  text-decoration: none;
  transition: opacity 0.15s;
}
.contact-item:hover { opacity: 1; }
.contact-item--email:hover .contact-value { color: var(--violet-line); }
.contact-item--instagram:hover .contact-value { color: var(--red-line); }
.contact-label {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-tertiary);
}
.contact-value {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
}

/* ── Mobile menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  padding: 20px 20px 40px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.mobile-menu-nav a {
  font-family: var(--font-italic);
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
}
.mobile-menu-nav a[href="/cv"] { color: var(--purple); }
.mobile-menu-nav a[href="/contact"] { color: var(--magenta); }
.mobile-menu-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0;
}

.mobile-menu::after {
  content: '';
  position: fixed;
  right: 60px; top: 0; bottom: 0;
  width: 1.5px;
  background: var(--red-line);
}
.mobile-menu .sidebar-label { padding-left: 0; }
.mobile-menu .sidebar-item { padding-left: 14px; padding-right: 80px; }

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .mobile-menu { display: flex; }
  .sidebar { display: none; }
  .scroll-area { margin-left: 0; }
  .project-section { padding: 24px 20px 36px; }
  .project-content {
    width: 100%;
    margin-left: 0;
  }
  .p-title, .p-tag, .p-sub { margin-left: 0; }
  .divider {
    margin-left: 0;
    padding-left: 20px;
  }
  .divider-dot { display: none; }
}
