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

:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #111;
  --ink: #efefef;
  --muted: #777;
  --border: rgba(255, 255, 255, 0.1);
  --hover: #1c1c1c;
  --chip: #222;
  --nav-h: 52px;
  --pad: clamp(16px, 5vw, 64px);
  --max: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}

.nav-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

/* ── CONTAINER ── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── HERO ── */
.hero {
  padding: 72px 0 56px;
  border-bottom: 0.5px solid var(--border);
}

.hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-bio {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.75;
}

/* ── FILTERS ── */
.filters-bar {
  border-bottom: 0.5px solid var(--border);
}

.filters {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.filters::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--muted);
  padding: 16px 18px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: -0.5px;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: var(--ink); }
.filter-btn.active::after { transform: scaleX(1); }

/* ── PROJECTS AREA ── */
.projects-area {
  padding-bottom: 96px;
}

/* ── SECTION LABEL ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 44px 0 20px;
}

.section-label-text {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.section-label-rule {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ── GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── CARD ── */
.card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--ink);
  text-decoration: none;
}

.card:hover { background: var(--hover); }

.card--wide { grid-column: span 2; }

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.card--wide .card-thumb {
  aspect-ratio: 21 / 9;
}

.card--fill-thumb .card-thumb {
  flex: 1;
  aspect-ratio: unset;
}

/* ── PAIRED ROW ALIGNMENT (subgrid) ── */
.grid--paired {
  grid-template-rows: auto auto;
  row-gap: 0;
}

.grid--paired .card {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

.grid--paired .card-thumb {
  align-self: stretch;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-hint {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #bbb;
  user-select: none;
}

.card-body {
  padding: 14px 16px 18px;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 9px;
}

.tag {
  display: inline-block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── ABOUT ── */
#about {
  border-top: 0.5px solid var(--border);
  padding: 72px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: start;
}

.about-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 4px;
}

.about-text {
  font-size: 15px;
  line-height: 1.85;
  max-width: 520px;
}

.about-text p + p { margin-top: 14px; }

/* ── FOOTER ── */
.footer {
  border-top: 0.5px solid var(--border);
  padding: 28px var(--pad);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-name {
  font-size: 13px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .card--wide {
    grid-column: span 1;
  }

  .card--wide .card-thumb {
    aspect-ratio: 16 / 10;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
