:root {
  --bg: #070707;
  --panel: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.18);
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #f90000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: Futura, "Futura PT", "Avenir Next", Avenir, "Century Gothic", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, #1e1e1e 0%, var(--bg) 45%, #030303 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.hero,
.gallery,
.thesis-essay {
  position: relative;
  z-index: 1;
}

.exhibition-main {
  width: calc(100vw - 20px);
  max-width: 1600px;
  margin: 14px auto 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero {
  padding: 24px 24px 10px;
  text-align: center;
  flex: 0 0 auto;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 21px;
  font-weight: bold;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

.gallery {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 0 0 auto;
}

.exhibition-panel {
  min-height: 300px;
  padding: 0;
  display: block;
}

.panel-card-slot {
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 300px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(4px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.project-number {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 19px;
}

.project-card h2 {
  margin: 0 0 14px;
  font-size: 41px;
  line-height: 1.1;
}

.project-tag {
  align-self: flex-start;
  margin: 0 0 19px;
  border: 1px solid var(--line);
  padding: 6px 11px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 19px;
}

.project-enter {
  margin-top: auto;
  padding-top: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 16px;
}

.thesis-essay {
  border: none;
  background: transparent;
  padding: 0 0 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.thesis-essay h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 2.4vw, 40px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.thesis-essay p {
  margin: 0 0 9px;
  max-width: none;
  width: 100%;
  color: #d4d4d4;
  line-height: 1.42;
  font-size: 22px;
}

.thesis-essay p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1000px) {
  .gallery {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .exhibition-main {
    width: min(760px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
  }

  .exhibition-panel {
    min-height: 520px;
  }

  .project-card {
    min-height: 520px;
  }

  .thesis-essay {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 56px;
  }

  .gallery {
    gap: 10px;
  }

  .exhibition-main {
    width: calc(100vw - 16px);
  }

  .panel-card-slot {
    width: 100%;
  }

  .exhibition-panel {
    min-height: 460px;
  }

  .project-card {
    min-height: 460px;
  }
}
