:root {
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --text: #eef0f4;
  --text-muted: #a1a7b3;
  --accent: #ff6b35;
  --accent-soft: #ff6b3522;
  --border: #262b35;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

/* Section headings */
.section-heading {
  margin: 56px 0 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-heading h2 { margin: 0; font-size: 1.4rem; }
.section-heading a { font-size: 0.9rem; }

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.project-card a.card-link { color: inherit; text-decoration: none; display: block; }

.project-card .thumb {
  aspect-ratio: 16 / 10;
  background: #1e222b;
  overflow: hidden;
}
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.project-card .card-body { padding: 18px; }
.project-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.project-card .date { color: var(--accent); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.project-card p { color: var(--text-muted); font-size: 0.92rem; margin: 8px 0 12px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tag-list li {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

/* Timeline */
.timeline {
  position: relative;
  padding: 48px 0 80px;
  max-width: 760px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-item .date { color: var(--accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.timeline-item h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.timeline-item p { color: var(--text-muted); margin: 0 0 10px; }

/* Project detail page */
.project-hero {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border);
}
.project-hero .date { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.project-hero h1 { margin: 8px 0 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.project-hero .tagline { color: var(--text-muted); font-size: 1.1rem; max-width: 700px; }

.media-block {
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.media-block img, .media-block iframe { width: 100%; display: block; border: 0; }
.media-block.video { aspect-ratio: 16 / 9; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0 40px;
}
.gallery img { border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; }

.project-body { padding-bottom: 64px; }
.project-body h2 { margin-top: 40px; font-size: 1.3rem; }
.project-body ul { color: var(--text-muted); }

.meta-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.meta-table dt { color: var(--text-muted); font-weight: 600; }
.meta-table dd { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .hero { padding: 48px 0 32px; }
}
