:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --text: #171717;
  --muted: #6a6a6a;
  --line: #dddddd;
  --accent: #f2cd4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 92%, white);
  border-bottom: 1px solid var(--line);
  padding: 1rem clamp(1rem, 4vw, 3rem);
}

.nav {
  display: flex;
  gap: 1.2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
}

.nav-contact {
  margin-left: auto;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  padding: 0.35rem;
  display: none;
}

.nav-dropdown[open] .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
}

.dropdown-menu a:hover {
  color: var(--text);
  background: var(--bg);
}

.hero {
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 860px;
}

.hero h1 {
  font-size: 48px;
  line-height: 57px;
  margin: 0 0 0.5rem 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

main {
  padding: 1.2rem clamp(1rem, 4vw, 3rem) 2rem;
}

.section {
  display: none;
}

.section-visible {
  display: block;
}

.section-head h2 {
  margin-bottom: 0.2rem;
}

.section-head p {
  color: var(--muted);
  margin-top: 0;
}

.section-subhead {
  margin-top: 64px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
}

.card {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(140deg, #1a1a1a, #333333);
}

.card-preview img,
.card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-preview-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f5f5f5;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  pointer-events: none;
}

.card--chili-piper img {
  object-fit: contain;
  background: #fff;
  padding: 0.35rem;
}

.card--signets-samples img {
  object-fit: contain;
  background: #fff;
  padding: 0.35rem;
}

.resume {
  max-width: 900px;
}

.resume h3 {
  margin-top: 2rem;
}

.resume-item {
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
  margin: 1rem 0;
}

.meta,
.note {
  color: var(--muted);
}

.lightbox {
  border: none;
  width: min(92vw, 1200px);
  background: #121212;
  color: #f2f2f2;
  border-radius: 14px;
  padding: 1rem;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.lightbox img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox video {
  width: 100%;
  max-height: 76vh;
  border-radius: 8px;
  background: #000;
}

.hidden-media {
  display: none;
}

.close-btn {
  border: none;
  outline: none;
  background: transparent;
  color: #f3f3f3;
  border-radius: 7px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav {
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
