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

:root {
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-text: #e8e8e8;
  --color-text-muted: #888888;
  --color-accent: #ffffff;
  --color-border: #222222;
  --font-main: 'Inter', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN', sans-serif;
  --container-max: 1200px;
  --spacing-section: 120px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

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

a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.6;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

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

.nav-links a {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 40px 80px;
}

.hero-content h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

/* ========================================
   About
   ======================================== */
.about {
  padding: var(--spacing-section) 0;
  border-bottom: 1px solid var(--color-border);
}

.about-text-ja {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 24px;
  font-weight: 300;
}

.about-text-en {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* ========================================
   Works
   ======================================== */
.works {
  padding: var(--spacing-section) 0;
}

.section-title {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 60px;
}

.work-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.work-card:hover {
  opacity: 0.85;
}

.work-card:hover .work-thumbnail img {
  transform: scale(1.02);
}

.work-thumbnail {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
}

.work-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-info h3 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

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

.work-format {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ========================================
   Modal
   ======================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

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

.modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg-alt);
  padding: 60px;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 28px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  line-height: 1;
}

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

.modal-body h3 {
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.modal-body .modal-description {
  font-size: 14px;
  line-height: 2;
  font-weight: 300;
  margin-bottom: 24px;
  color: var(--color-text);
}

.modal-body .modal-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  font-weight: 300;
}

.modal-gallery {
  display: grid;
  gap: 16px;
}

.modal-gallery img {
  width: 100%;
  height: auto;
}

/* ========================================
   CV
   ======================================== */
.cv {
  padding: var(--spacing-section) 0;
  background: var(--color-bg-alt);
}

.cv-grid {
  display: grid;
  gap: 60px;
}

.cv-section h3 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.cv-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 300;
}

.cv-year {
  color: var(--color-text-muted);
  font-size: 13px;
}

.cv-detail {
  color: var(--color-text);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-links a {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text-muted);
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  :root {
    --spacing-section: 80px;
  }

  .container {
    padding: 0 24px;
  }

  .nav {
    padding: 16px 24px;
  }

  .nav-name {
    font-size: 13px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .hero-content {
    padding: 0 24px 60px;
  }

  .work-card {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 60px;
  }

  .modal-content {
    padding: 40px 24px;
    width: 95%;
  }

  .cv-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
