:root {
  --bg: #10121A;
  --bg-raised: #171A24;
  --line: #262A38;
  --text: #ECEDF3;
  --text-muted: #8B90A3;
  --text-dim: #565B6E;
  --accent: #5FBF8E;
  --accent-dim: #2E6B52;
  --accent2: #5FA8D3;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(232,179,74,0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(95,168,211,0.06), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #10121A; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(16,18,26,0.86);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.back-link {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color .15s ease;
}
.back-link:hover { color: var(--accent); }

.page-wrap { max-width: var(--max-width); margin: 0 auto; padding: 72px 24px 48px; }
.terminal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raised);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3A3E4C;
}
.terminal-bar span:nth-child(1) { background: #AE1C28; }
.terminal-bar span:nth-child(2) { background: #FFFFFF; }
.terminal-bar span:nth-child(3) { background: #21468B; }
.terminal-bar .label {
  margin-left: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}
.terminal-body { padding: 30px; }
.project-kicker {
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 13px;
}
h1 {
  max-width: 15ch;
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 600;
  line-height: 1.12;
}
.project-summary {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 17px;
}
.project-image {
  width: 100%;
  height: 280px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg) center / contain no-repeat url('../images/buuf-louise.jpg');
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
}
.project-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}
.project-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 30px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.section-label {
  margin-bottom: 10px;
  color: var(--accent2);
  font-family: var(--font-mono);
  font-size: 13px;
}
.project-copy h2 {
  margin: 24px 0 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.project-copy h2:first-of-type { margin-top: 0; }
.project-copy p {
  max-width: 48ch;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 15px;
}
.project-copy p:last-child { margin-bottom: 0; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.stack span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.nav-link {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  max-width: 45%;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.nav-link strong { color: var(--text); font-weight: 500; }
.nav-link:hover strong { color: var(--accent); }
.nav-link.next { margin-left: auto; text-align: right; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 36px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

@media (max-width: 650px) {
  .page-wrap { padding: 42px 18px 32px; }
  .header-inner { padding: 16px 18px; }
  .terminal-body { padding: 22px 18px 24px; }
  .project-image { height: 190px; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 0 18px 28px; }
}
