/* ==========================================================
   YOUR NAME — Video Portfolio
   Minimal / monotone / editorial style
   ========================================================== */

:root {
  --bg: #0a0a0a;
  --text: #f5f5f0;
  --text-dim: rgba(245, 245, 240, 0.6);
  --text-dimmer: rgba(245, 245, 240, 0.35);
  --border: rgba(245, 245, 240, 0.14);
  --border-strong: rgba(245, 245, 240, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Section heading ---------- */

.section-heading {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.section-heading span {
  white-space: nowrap;
}

.section-heading::after {
  content: "";
  display: block;
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================
   HEADER
   ========================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 200;
  background: transparent;
  transition: background-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-desktop ul {
  display: flex;
  gap: 40px;
}

.nav-desktop a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.nav-desktop a:hover {
  color: var(--text);
}

/* Hamburger (hidden on desktop) */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  z-index: 210;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */

.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(78vw, 340px);
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  z-index: 205;
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 36px;
  text-align: center;
}

.nav-mobile a {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.25em;
}

/* ==========================================================
   HERO
   ========================================================== */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0 24px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-name {
  font-size: clamp(2.2rem, 9vw, 6.5rem);
  font-weight: 200;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
}

@media (max-width: 480px) {
  .hero-name {
    white-space: normal;
    line-height: 1.3;
  }
}

.hero-name .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: letterIn 0.8s var(--ease) forwards;
}

.hero-name .letter.is-space {
  width: 0.35em;
}

@keyframes letterIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-name .letter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-sub {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-indicator {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-indicator.reveal {
  transform: translateX(-50%) translateY(0);
}

.scroll-indicator.reveal:not(.is-visible) {
  transform: translateX(-50%) translateY(20px);
}

.scroll-text {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dimmer);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-line::after {
    animation: none;
    display: none;
  }
}

/* ==========================================================
   WORKS
   ========================================================== */

.works {
  padding: 140px 0;
}

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

.work-card {
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  display: block;
}

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

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.work-card:hover .work-thumb img,
.work-card:focus-visible .work-thumb img {
  transform: scale(1.08);
}

.work-thumb.is-placeholder {
  background: linear-gradient(135deg, #1c1c1c, #262626);
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.work-card:hover .work-overlay,
.work-card:focus-visible .work-overlay {
  opacity: 1;
}

.work-overlay-title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

.work-overlay-role {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

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

.work-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.work-year {
  font-size: 12px;
  color: var(--text-dimmer);
  font-weight: 300;
}

.work-card,
.work-thumb {
  transition: transform 0.6s var(--ease);
}

.work-card:hover {
  transform: scale(1.03);
}

/* ==========================================================
   CONTACT
   ========================================================== */

.contact {
  padding: 100px 0 160px;
}

.contact-mail-line {
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.05em;
  margin-bottom: 64px;
}

.contact-mail-label {
  color: var(--text-dim);
  margin-right: 12px;
}

.contact-mail-value {
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.contact-mail-value:hover {
  border-color: var(--text);
  opacity: 0.8;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.form-row .required {
  color: var(--text-dimmer);
}

.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 2px;
  transition: border-color 0.3s var(--ease);
  resize: vertical;
}

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

.form-submit {
  align-self: center;
  margin-top: 16px;
  padding: 14px 56px;
  font-size: 12px;
  letter-spacing: 0.2em;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.form-submit:hover {
  border-color: var(--text);
  background: rgba(245, 245, 240, 0.06);
}

.sns-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 72px;
}

.sns-links a {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.sns-links a:hover {
  color: var(--text);
}

/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
}

/* ==========================================================
   MODAL
   ========================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.9);
}

.modal-content {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #101010;
  border: 1px solid var(--border);
  padding: 20px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.45s var(--ease);
}

.modal.is-open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  font-size: 26px;
  font-weight: 300;
  color: var(--text);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s var(--ease);
}

.modal-close:hover {
  opacity: 0.6;
}

.modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.modal-info {
  padding: 28px 8px 12px;
}

.modal-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.modal-meta .modal-year::after {
  content: "";
}

.modal-desc {
  font-family: "Noto Sans JP", "Inter", sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.9;
  max-width: 640px;
}

body.modal-locked {
  overflow: hidden;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Tablet: ~768px - 1024px -> 2 columns */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: <768px -> 1 column, hamburger nav */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .works {
    padding: 100px 0;
  }

  .contact {
    padding: 60px 0 120px;
  }

  .section-inner {
    padding: 0 20px;
  }

  .sns-links {
    gap: 24px;
    flex-wrap: wrap;
  }
}

@media (max-width: 400px) {
  .hero-name {
    letter-spacing: 0.04em;
  }
}
