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

:root {
  --bg:     #111110;
  --fg:     #e8e4dc;
  --muted:  #7a7570;
  --accent: #c0392b;
  --border: #2a2825;
  --serif:  'Instrument Serif', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; width: 100%; }


/* ── Layout ── */
.container {
  max-width: 720px;
  margin: 0 auto;
}


/* ── Header ── */
header {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.header-text { min-width: 0; }

.name {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.tagline {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
}

nav a { color: var(--muted); transition: color 0.15s; }
nav a:hover { color: var(--fg); text-decoration: none; }
.nav-dot { color: var(--border); }

#model-canvas-wrap {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}

#model-canvas {
  width: 100%;
  height: 100%;
  display: block;
}


/* ── Section ── */
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

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


/* ── Filter ── */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}


/* ── Featured Project ── */
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 56px;
}

.project:last-child { margin-bottom: 0; }

.project-media {
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 16 / 9;
  position: relative;
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project:hover .project-media img,
.project:hover .project-media video {
  transform: scale(1.02);
}

.audio-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.52);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #fff;
  padding: 0;
  transition: background 0.15s;
}

.audio-btn:hover { background: rgba(0, 0, 0, 0.82); }
.audio-btn svg { display: block; }

.status {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.status.released { color: #4caf7d; }
.status.wip      { color: #e08040; }

.project-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--muted);
}

.tag.gamedev   { border-color: #e0804033; color: #e08040; }
.tag.fullstack { border-color: #4a9fc033; color: #4a9fc0; }

.project-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.project-links {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.project-links a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.project-links a:hover { border-color: var(--accent); text-decoration: none; }


/* ── Other Projects — card grid ── */
.other-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.other-item {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.other-item:hover {
  border-color: #3d3a35;
  transform: translateY(-2px);
}

.other-media {
  aspect-ratio: 16 / 9;
  background: var(--border);
  overflow: hidden;
}

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

.other-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.other-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 6px;
  line-height: 1.3;
}

.other-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
  flex: 1;
}

.other-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.other-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}

.other-link-btn:hover { text-decoration: none; opacity: 0.7; }

.other-link-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.other-link-btn:hover .other-link-icon {
  background: var(--fg);
  color: var(--bg);
}


/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.about-body { min-width: 0; }

.about-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

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

.about-photo-wrap {
  width: 140px;
  flex-shrink: 0;
}

.about-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: block;
}

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

  .about-photo-wrap {
    width: 100px;
  }

  .about-photo {
    width: 100px;
    height: 100px;
  }
}


/* ── Footer ── */
footer { padding: 48px 0 72px; }

.contact-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 13px;
}

.contact-grid a { color: var(--muted); transition: color 0.15s; }
.contact-grid a:hover { color: var(--fg); text-decoration: none; }


/* ── Filter hidden state ── */
.project[data-hidden],
.other-item[data-hidden] { display: none; }


/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 0 16px; }
  header { grid-template-columns: 1fr; }
  #model-canvas-wrap { width: 140px; height: 140px; margin: 0 auto; }
  .other-item { grid-template-columns: 1fr; }
  .other-links { padding-top: 0; }
}