/* ---------- reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --ink: #f4f4f2;
  --ink-soft: rgba(244, 244, 242, 0.68);
  --ink-faint: rgba(244, 244, 242, 0.42);
  --line: rgba(244, 244, 242, 0.16);
  --accent: #e8621f;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(244, 244, 242, 0.4);
  padding: 9px 16px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.logo:hover {
  border-color: var(--ink);
}

.main-nav {
  display: flex;
  gap: 36px;
  font-size: 14px;
}

.main-nav a {
  position: relative;
  padding-bottom: 6px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 40px 24px;
  gap: 18px;
  font-size: 15px;
}

.site-header.nav-open .mobile-nav { display: flex; }

.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

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

/* ---------- hero ---------- */

.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 120px 40px 64px;
}

.hero h1 {
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 780px;
}

/* ---------- work section ---------- */

.work-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 44px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.filter-btn {
  font-size: 14px;
  color: var(--ink-faint);
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}

.filter-btn:hover { color: var(--ink-soft); }

.filter-btn.active {
  color: var(--ink);
}

.filter-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -25px;
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}

.work-item { display: block; }
.work-item.is-hidden { display: none; }

.work-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.work-media img,
.work-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-media img {
  transition: opacity 0.35s ease, transform 0.6s ease;
}

.work-media video {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-item:hover .work-media img { transform: scale(1.03); }
.work-item.playing .work-media video { opacity: 1; }
.work-item.playing .work-media img { opacity: 0; }

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}

.work-meta h3 {
  font-weight: 400;
  font-size: 15px;
  color: var(--ink);
}

.work-cat {
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ---------- about ---------- */

.about-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 110px 40px 120px;
}

.about-section h1 {
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 32px;
}

.about-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 22px;
  max-width: 640px;
}

.about-section .lead {
  color: var(--ink);
  font-size: 16px;
}

.about-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
  color: var(--ink-faint) !important;
}

/* ---------- contact ---------- */

.contact-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 130px 40px 150px;
}

.contact-section h1 {
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 20px;
}

.contact-section .lead {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 32px;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.2rem, 3.4vw, 1.8rem);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- contact form ---------- */

.contact-form {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}

.form-field label {
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s ease;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.form-field input:invalid.touched,
.form-field textarea:invalid.touched {
  border-color: var(--accent);
}

.form-submit {
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 12px 26px;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.form-submit:hover {
  background: var(--ink);
  color: var(--bg);
}

.form-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
  min-height: 1.4em;
}

.form-note.is-error { color: var(--accent); }
.form-note.is-ok { color: var(--ink); }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- project detail ---------- */

.project {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 40px 0;
}

.project-video {
  width: 100%;
  background: #000;
}

.project-video video {
  width: 100%;
  max-height: 78vh;
  margin: 0 auto;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-info {
  max-width: 780px;
  padding: 44px 0 20px;
}

.project-info h1 {
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  margin-bottom: 26px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.project-meta div {
  font-size: 14px;
}

.project-meta span {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.project-blurb {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.project-pager {
  max-width: 1320px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.project-pager a {
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.project-pager a:hover { color: var(--ink); }

@media (max-width: 600px) {
  .project-pager { flex-direction: column; gap: 12px; text-align: center; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 40px;
}

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

.footer-label {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.footer-email {
  font-size: 16px;
  transition: color 0.2s ease;
}

.footer-email:hover { color: var(--accent); }

.footer-copy {
  font-size: 12px;
  color: var(--ink-faint);
}
