:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --border: #2a2a2a;
  --text: #e8e4dc;
  --muted: #6b6560;
  --accent: #c8a96e;
  --accent-dim: #8a7048;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(14,14,14,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Inconsolata', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Inconsolata', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}

.hero-label {
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-catch {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-catch em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  max-width: 560px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.9;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  font-family: 'Inconsolata', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.2s;
}

.hero-scroll::before {
  content: '';
  width: 1px;
  height: 48px;
  background: var(--accent-dim);
  animation: lineGrow 1s ease forwards 1.4s;
  transform-origin: top;
  transform: scaleY(0);
}

@keyframes lineGrow { to { transform: scaleY(1); } }

/* ── Section base ── */
section {
  padding: 7rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Inconsolata', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 120px;
}

/* ── About ── */
#about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.about-meta {
  position: sticky;
  top: 8rem;
}

.about-name {
  font-family: 'Shippori Mincho', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.about-title {
  font-family: 'Inconsolata', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.about-tag {
  display: inline-block;
  font-family: 'Inconsolata', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  margin: 0.2rem;
  border-radius: 2px;
}

.about-body p {
  font-size: 0.95rem;
  color: #b8b4ae;
  margin-bottom: 1.5rem;
  line-height: 1.95;
}

.about-body p strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Works ── */
#works {
  border-top: 1px solid var(--border);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
}

.work-card {
  background: var(--bg);
  padding: 2.5rem;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
}

.work-card:hover { background: var(--surface); }
.work-card:hover::before { height: 100%; }

.work-num {
  font-family: 'Inconsolata', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-dim);
  margin-bottom: 1.5rem;
}

.work-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.work-en {
  font-family: 'Inconsolata', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.work-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.85;
}

.work-date {
  font-family: 'Inconsolata', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  margin-top: 1.25rem;
}

/* ── Skills ── */
#skills {
  border-top: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

.skill-group h3 {
  font-family: 'Inconsolata', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(42,42,42,0.5);
  transition: color 0.2s;
}

.skill-group li:hover { color: var(--text); }

/* ── Contact ── */
#contact {
  border-top: 1px solid var(--border);
  text-align: center;
  padding-bottom: 8rem;
}

.contact-heading {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  font-family: 'Inconsolata', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.85rem 2rem;
  transition: border-color 0.2s, color 0.2s;
}

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

.contact-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.contact-link.primary:hover {
  background: transparent;
  color: var(--accent);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span {
  font-family: 'Inconsolata', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  section { padding: 5rem 1.5rem; }
  #hero { padding: 0 1.5rem 4rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-meta { position: static; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
