:root {
  --bg: #0b0c09;
  --bg-elevated: rgba(28, 29, 21, .52);
  --bg-elevated-hover: rgba(36, 38, 27, .64);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #f2efe4;
  --text-muted: #bdbdae;
  --text-faint: #8c8d7d;
  --olive: #d9a55a;
  --olive-light: #f0c886;
  --olive-dark: #8a6530;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
}

body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(9, 10, 8, .12) 0%, rgba(9, 10, 8, .28) 40%, rgba(6, 7, 5, .74) 100%),
    radial-gradient(ellipse closest-side at center, rgba(9, 10, 8, 0) 0%, rgba(9, 10, 8, .36) 68%, var(--bg) 100%),
    url('images/skyline-bg.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover, contain, contain;
  background-attachment: fixed;
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }
}

/* ============ SIDE TETRIS (decorative, fills the black margins) ============ */

.tetris-side {
  display: none;
  position: fixed;
  top: 0;
  width: 130px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: .5;
}
.tetris-side--left { left: 0; }
.tetris-side--right { right: 0; }

@media (min-width: 1440px) {
  .tetris-side { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .tetris-side { display: none; }
}

a {
  color: var(--olive-light);
  text-decoration-color: rgba(156, 175, 107, .45);
  text-underline-offset: 3px;
}
a:hover { color: var(--olive-light); text-decoration-color: currentColor; }

/* ============ HEADER / NAV ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 10, 8, .5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .2px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--olive-light); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--olive-light); }

.nav-link--cta {
  color: var(--bg);
  background: var(--olive);
  padding: 7px 16px;
  border-radius: 20px;
  font-weight: 600;
}
.nav-link--cta:hover { color: var(--bg); background: var(--olive-light); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ============ HERO ============ */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14vh 28px 12vh;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 16px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}

.hero-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 32px;
}
.hero-lede a { color: var(--olive-light); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn--primary {
  background: var(--olive);
  color: #0b0c09;
}
.btn--primary:hover { background: var(--olive-light); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--olive); color: var(--olive-light); transform: translateY(-1px); }

/* ============ SECTIONS ============ */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 28px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive);
  flex: none;
}

.section-intro {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: -12px 0 28px;
}

/* About prose */
.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.prose p a { color: var(--olive-light); }
.prose p:last-child { margin-bottom: 0; }

/* Cards: projects + misc */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-item {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .15s ease, border-color .15s ease;
}
.card-item:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-strong);
}

.card-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-tagline {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2px;
  color: var(--olive);
  margin-bottom: 12px;
}

.card-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.card-links a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.card-links a:hover {
  border-color: var(--olive);
  color: var(--olive-light);
}

/* Blog posts */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-item {
  display: block;
  padding: 18px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.post-item:hover, .post-item:focus-visible {
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.post-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.post-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 6px;
}

.post-blurb {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Contact */
.section--contact {
  text-align: center;
}
.section--contact .section-title { justify-content: center; }
.section--contact .section-intro { margin: -12px 0 28px; }
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 28px 64px;
  text-align: center;
}
.site-footer p {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 28px 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-link { width: 100%; padding: 10px 0; }
  .nav-link--cta { width: auto; margin-top: 8px; text-align: center; }

  .hero { padding: 12vh 20px 8vh; min-height: 60vh; }
  .section { padding: 64px 20px; }
}
