/* ============================================================
   style.css — Yuzuki Honna Personal Site
   Aesthetic: Cinematic Editorial
   Fonts: Cormorant Garamond (display) + Noto Serif JP (body) + DM Mono (accent)
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Light Mode */
  --bg: #f5f3ef;
  --bg-alt: #edeae4;
  --fg: #1a1714;
  --fg-muted: #5a5550;
  --fg-subtle: #8a8580;
  --accent: #1e2d5a;
  /* 深紺 */
  --accent-light: #3a4f8a;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --card: #ffffff;
  --card-border: rgba(30, 45, 90, 0.12);
  --header-bg: rgba(245, 243, 239, 0.88);
  --nav-hover-bg: rgba(30, 45, 90, 0.08);
  --shadow: 0 4px 32px rgba(26, 23, 20, 0.10);
  --shadow-hover: 0 12px 48px rgba(26, 23, 20, 0.18);
  --radius: 6px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #090c10;
  --bg-alt: #0f1520;
  --fg: #ddd8cf;
  --fg-muted: #8a8a9a;
  --fg-subtle: #5a5a70;
  --accent: #c9a84c;
  /* ダーク時は金色をアクセントに */
  --accent-light: #e8c97a;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --card: #111520;
  --card-border: rgba(201, 168, 76, 0.14);
  --header-bg: rgba(9, 12, 16, 0.92);
  --nav-hover-bg: rgba(201, 168, 76, 0.08);
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.50);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.72);
}

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

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Noto Serif JP", "游明朝", "Hiragino Mincho ProN", "MS 明朝", serif;
  font-weight: 300;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

/* ---------- Typography ---------- */
.font-display {
  font-family: "Cormorant Garamond", "游明朝", serif;
}

/* ---------- Page-top Button ---------- */
.pagetop {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 20px;
  z-index: 200;
}

.pagetop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  color: var(--fg-muted);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pagetop a:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  transition: background var(--transition), border-color var(--transition);
}

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

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.site-logo:hover {
  opacity: 0.72;
}

.logo-en {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.logo-ja {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  font-weight: 300;
}

/* Nav */
.global-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 8px 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.nav-link:hover,
.nav-item.is-current .nav-link {
  color: var(--fg);
}

.nav-link:hover::after,
.nav-item.is-current .nav-link::after {
  transform: scaleX(1);
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--card-border);
}

/* Language Switch */
.lang-switch {
  display: flex;
  align-items: center;
}

.lang-switch input {
  display: none;
}

.lang-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.lang-label::before {
  content: attr(data-lang);
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
}

input:checked+.lang-label::before {
  left: auto;
  right: 6px;
}

.lang-label::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  transition: var(--transition);
}

input:checked+.lang-label::after {
  right: auto;
  left: 4px;
  background: #fff;
}

input:checked+.lang-label {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* EN状態（未チェック）: ボタンをアクセント色に、文字を見えるように */
.lang-label::after {
  background: var(--accent);
}

[data-theme="dark"] .lang-label::after {
  background: var(--gold);
}

[data-theme="dark"] input:checked+.lang-label {
  background: var(--gold);
  border-color: var(--gold);
  color: #090c10;
}

[data-theme="dark"] input:checked+.lang-label::after {
  background: #090c10;
}

/* Theme Toggle */
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  color: var(--fg-muted);
  padding: 0;
}

.theme-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.theme-icon {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  overflow: hidden;
}

.theme-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  background: currentColor;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--fg);
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Responsive Header ---------- */
@media (max-width: 1100px) {
  .header-inner {
    padding: 0 24px;
  }
}

@media (max-width: 820px) {
  .hamburger {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 0;
    gap: 0;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-link {
    padding: 14px 32px;
    font-size: 1.1rem;
  }

  .nav-link::after {
    bottom: 8px;
    left: 32px;
    right: 32px;
  }

  .nav-controls {
    margin-left: 8px;
    padding-left: 8px;
  }
}

@media (max-width: 480px) {
  .logo-en {
    font-size: 1.2rem;
  }

  .header-inner {
    padding: 0 16px;
  }
}

/* ============================================================
   FADE-IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.fade-in.active {
  opacity: 1;
}

/* ============================================================
   STAGGERED FADE-IN (Works List)
   ============================================================ */
.works-list.fade-in {
  opacity: 1;
  transform: none;
  transition: none;
}

.works-list.fade-in>.work-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.5s ease;
}

.works-list.fade-in.active>.work-item {
  opacity: 1;
  transform: translateY(0);
}

.works-list.fade-in.active>.work-item:nth-child(1) {
  transition-delay: 0.05s;
}

.works-list.fade-in.active>.work-item:nth-child(2) {
  transition-delay: 0.10s;
}

.works-list.fade-in.active>.work-item:nth-child(3) {
  transition-delay: 0.15s;
}

.works-list.fade-in.active>.work-item:nth-child(4) {
  transition-delay: 0.20s;
}

.works-list.fade-in.active>.work-item:nth-child(5) {
  transition-delay: 0.25s;
}

.works-list.fade-in.active>.work-item:nth-child(6) {
  transition-delay: 0.30s;
}

.works-list.fade-in.active>.work-item:nth-child(7) {
  transition-delay: 0.35s;
}

.works-list.fade-in.active>.work-item:nth-child(8) {
  transition-delay: 0.40s;
}

.works-list.fade-in.active>.work-item:nth-child(9) {
  transition-delay: 0.45s;
}

.works-list.fade-in.active>.work-item:nth-child(10) {
  transition-delay: 0.50s;
}

.works-list.fade-in.active>.work-item:nth-child(11) {
  transition-delay: 0.55s;
}

.works-list.fade-in.active>.work-item:nth-child(12) {
  transition-delay: 0.60s;
}

/* ============================================================
   OPENING ANIMATION
   ============================================================ */
.op-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.op-mask {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.op-text {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 6vw, 6rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--fg);
  animation: opFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes opFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.12) translateY(12px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.home-main {
  flex: 1;
}

.hero {
  width: 100%;
  height: 56.25vw;
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100dvw;
  height: auto;
  object-fit: cover;
  opacity: 0.85;
}

.hero-label {
  position: absolute;
  bottom: 40px;
  right: 48px;
  writing-mode: vertical-rl;
}

.hero-label-text {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

/* ============================================================
   HOME — UPDATES TABLE
   ============================================================ */
.updates-section {
  max-width: 860px;
  margin: 80px auto;
  padding: 0 32px;
}

.visitor-counter {
  text-align: right;
  margin-bottom: 24px;
  font-family: "DM Mono", monospace;
  color: var(--fg-muted);
}

.visitor-counter .counter-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-right: 12px;
  opacity: 0.7;
}

.visitor-counter .counter-number {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.2em;
}

.section-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--gold);
}

.updates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.updates-table thead th {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.updates-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--fg-muted);
  transition: color var(--transition);
}

.updates-table tbody td:first-child {
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--gold);
  white-space: nowrap;
  width: 140px;
}

.updates-table tbody tr:hover td {
  color: var(--fg);
}

.updates-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 28px 88px;
}

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

.footer-copy {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--fg-subtle);
}

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

.footer-links img {
  height: 20px;
  width: auto;
  opacity: 0.5;
  filter: var(--fg)==#ddd8cf ? invert(1): none;
  transition: opacity var(--transition), transform var(--transition);
}

[data-theme="dark"] .footer-links img.re {
  filter: invert(1) brightness(0.8);
}

.footer-links a:hover img {
  opacity: 1;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .site-footer {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============================================================
   ABOUT ME
   ============================================================ */
.about-main {
  flex: 1;
}


.about-name-ja {
  font-family: "Cormorant Garamond", "Noto Serif JP", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--fg);
  line-height: 1.1;
}

.e-name {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}

.about-under {
  background: linear-gradient(160deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-top: 1px solid var(--card-border);
  padding-bottom: 80px;
}

.skills-section,
.portfolio-section,
.meaning-section,
.timeline {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 0;
  color: var(--fg-muted);
}

.skills-section h1,
.portfolio-section h1,
.meaning-section h1,
.timeline h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--fg);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
  position: relative;
  line-height: 1.3;
  animation: nameReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  transform-origin: left;
}

.skills-section h1::after,
.portfolio-section h1::after,
.meaning-section h1::after,
.timeline h1::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gold);
}

.skills-grid {
  display: grid;
  gap: 8px;
}

.skill-item {}

.toggle-button {
  background: none;
  border: none;
  border-bottom: 1px solid var(--card-border);
  width: 100%;
  text-align: left;
  padding: 14px 0;
  font-family: "Noto Serif JP", serif;
  font-size: 0.9rem;
  color: var(--fg);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.toggle-button:hover {
  color: var(--gold);
}

.details-content {
  padding: 12px 0 12px 16px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.9;
  border-left: 1px solid var(--card-border);
}

/* Timeline */
.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--card-border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-year {
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-top: 4px;
}

.timeline-item p {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

@media (max-width: 700px) {
  .about-hero {
    padding: 0 0 32px 24px;
  }

  .about-section {
    left: 24px;
  }

  .skills-section,
  .portfolio-section,
  .meaning-section,
  .timeline {
    padding: 40px 20px 0;
  }
}

/* ============================================================
   WORKS
   ============================================================ */
.works-main {
  flex: 1;
}

/* Works イントロ — パララックスヒーロー */
.works-intro {
  padding: 0 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.works-intro::after {
  content: 'WORKS';
  position: absolute;
  top: -10px;
  right: 40px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6rem, 14vw, 14rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.works-intro .works-page-title,
.works-intro .works-page-sub {
  position: relative;
  z-index: 1;
}

.works-under {
  background: var(--bg);
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--card-border);
}

.works-under::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(201, 168, 76, 0.018) 2px,
      rgba(201, 168, 76, 0.018) 3px);
  pointer-events: none;
  z-index: 0;
}

.works-page-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 10px;
}

.works-page-sub {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.work-section {
  padding: 0 48px 80px;
}

.work-year-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--fg-subtle);
  margin: 24px 0 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
  position: relative;
  animation: nameReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  transform-origin: left;
}

.work-year-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.works-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.work-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.work-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

.work-item>img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-item:hover>img {
  transform: scale(1.04);
}

.work-item>p {
  padding: 10px 14px 14px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

/* Tags */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 14px 0;
}

.tag {
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
}

.tag.company {
  background: rgba(30, 45, 90, 0.1);
  color: var(--accent-light);
  border: 1px solid rgba(30, 45, 90, 0.2);
}

.tag.self-made {
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.tag.competition {
  background: rgba(160, 80, 80, 0.1);
  color: #c06060;
  border: 1px solid rgba(160, 80, 80, 0.2);
}

.tag.video {
  background: rgba(40, 100, 60, 0.1);
  color: #4a9a6a;
  border: 1px solid rgba(40, 100, 60, 0.2);
}

.tag.image {
  background: rgba(60, 80, 140, 0.1);
  color: #6a8acc;
  border: 1px solid rgba(60, 80, 140, 0.2);
}

[data-theme="dark"] .tag.company {
  background: rgba(58, 79, 138, 0.18);
  color: #8a9fd8;
  border-color: rgba(58, 79, 138, 0.3);
}

[data-theme="dark"] .tag.self-made {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold);
  border-color: rgba(201, 168, 76, 0.25);
}

[data-theme="dark"] .tag.competition {
  background: rgba(160, 80, 80, 0.12);
  color: #e08888;
  border-color: rgba(160, 80, 80, 0.25);
}

[data-theme="dark"] .tag.video {
  background: rgba(40, 120, 70, 0.12);
  color: #6abb8a;
  border-color: rgba(40, 120, 70, 0.25);
}

[data-theme="dark"] .tag.image {
  background: rgba(60, 100, 180, 0.12);
  color: #88aaee;
  border-color: rgba(60, 100, 180, 0.25);
}

/* Tool Icons */
.s-icon-container {
  display: flex;
  gap: 6px;
  padding: 6px 14px 0;
}

.s-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity var(--transition);
}

.work-item:hover .s-icon {
  opacity: 0.9;
}

/* -------- Popup -------- */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup.active {
  opacity: 1;
}

.popup-content {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  width: 90%;
  max-width: 1400px;
  height: 88vh;
  display: flex;
  flex-direction: row;
  position: relative;
  overflow-y: auto;
  padding-top: 56px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(32px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.popup-media {
  width: 68%;
  padding: 24px 20px 24px 24px;
  overflow-y: auto;
}

.popup-media img,
.popup-media video {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 12px;
}

.popup-media-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 4px;
}

.popup-media-video-container iframe,
.popup-media-video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.popup-description {
  width: 32%;
  padding: 24px 24px 24px 0;
  font-size: 0.86rem;
  line-height: 2;
  color: var(--fg-muted);
  border-left: 1px solid var(--card-border);
  padding-left: 24px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--fg-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}

.close-button:hover {
  background: var(--bg-alt);
  color: var(--fg);
}

@media (max-width: 760px) {
  .popup-content {
    flex-direction: column;
    height: 92vh;
    padding-top: 48px;
  }

  .popup-media,
  .popup-description {
    width: 100%;
    padding: 16px;
    border-left: none;
  }

  .popup-description {
    border-top: 1px solid var(--card-border);
  }

  .works-intro {
    padding: 48px 24px 28px;
  }

  .work-section {
    padding: 0 20px 60px;
  }
}

/* Responsive works grid */
@media (max-width: 600px) {
  .works-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
}

/* Blog イントロ — パララックスヒーロー */
.blog-intro {
  padding: 0 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
  will-change: transform;
}

.blog-intro::after {
  content: 'BLOG';
  position: absolute;
  top: -10px;
  right: 40px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6rem, 14vw, 14rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.blog-intro h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.blog-intro .blog-sub {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.blog-under {
  background: var(--bg);
  position: relative;
  z-index: 2;
}



.blog-main {
  flex: 1;
}

.blog {
  min-height: 400px;
  padding: 72px 64px;
  position: relative;
}


.blog h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  margin-bottom: 8px;
}

.blog-sub {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 48px;
}

.blog-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.blog-link-wrapper {
  display: block;
}

.blog-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}

.blog-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

.blog-item .thumb-wrap {
  width: 100%;
  overflow: hidden;
}

.blog-item .thumb-wrap>img,
.blog-item .thumb-wrap>.blog-no-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--fg-muted);
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.blog-item:hover .thumb-wrap>img,
.blog-item:hover .thumb-wrap>.blog-no-image {
  transform: scale(1.04);
}

.blog-text {
  padding: 10px 14px 14px;
}

.blog-title {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
  margin-bottom: 6px;
  line-height: 1.5;
}

.blog-item:hover .blog-title {
  color: var(--gold);
}

.blog-date {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
  text-align: right;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .blog {
    padding: 48px 20px;
  }
}

/* ============================================================
   404
   ============================================================ */
.error {
  position: relative;
  min-height: calc(100vh - 72px - 80px);
  background-image: url("https://elza.poitou-mora.ts.net/Honna_Yuzuki/404.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.error::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 16, 0.62);
}

.error-inner {
  position: relative;
  z-index: 1;
  padding: 32px;
}

.error h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 12px;
}

.error p {
  font-size: 1.1rem;
  color: #ccc8bb;
  margin-bottom: 24px;
}

.error span {
  font-size: 0.82rem;
  color: #908c7f;
  line-height: 1.9;
}

.error .link {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   LANGUAGE SWITCH (JA-EN label state)
   ============================================================ */
input:checked+.lang-label[data-lang]::before {
  content: attr(data-lang);
}

/* ============================================================
   UTILITY
   ============================================================ */
main {
  flex: 1;
}

/* ============================================================
   ABOUT ME — 追加スタイル（元HTMLより移植）
   ============================================================ */

/* アイコン＋プロフィールヘッダー */
.about-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  padding: 160px 64px 0;
  position: relative;
  will-change: transform;
  overflow: hidden;
  margin: 30px;
}

.about-section::before {
  content: 'ABOUT ME';
  position: absolute;
  top: 0;
  right: -20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6rem, 14vw, 14rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.about-section .icon,
.about-section .about-info {
  position: relative;
  z-index: 1;
}

.about-section .icon {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  flex-shrink: 0;
}

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

.about-info h1 {
  font-family: "Cormorant Garamond", "Noto Serif JP", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin: 0;
}

.profile-words {
  margin-top: 8px;
}

.profile-words p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.9;
  margin: 0;
  word-wrap: break-word;
}

.profile-words a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.profile-words a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .about-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 24px 0;
    gap: 20px;
  }

  .about-section .icon {
    width: 160px;
    height: 160px;
  }
}

/* content-toggle（意味セクションのアコーディオン） */
.content-toggle {
  border-bottom: 1px solid var(--card-border);
  padding: 4px 0;
}

.content-toggle .toggle-button {
  font-family: "Noto Serif JP", serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 16px 0;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

.content-toggle .toggle-button::after {
  content: '＋';
  position: absolute;
  right: 0;
  color: var(--fg-subtle);
  transition: transform var(--transition), color var(--transition);
}

.content-toggle.open .toggle-button::after {
  content: '－';
  color: var(--gold);
}

.content-toggle .toggle-button:hover {
  color: var(--gold);
}

.content-toggle .teaser {
  font-size: 0.82rem;
  color: var(--fg-subtle);
  margin: 0 0 8px;
  padding-left: 2px;
  font-style: italic;
}

.content-toggle .details-content {
  display: none;
  padding: 12px 0 20px 16px;
  border-left: 2px solid var(--gold);
  margin-bottom: 8px;
}

.content-toggle.open .details-content {
  display: block;
}

.content-toggle .details-content p {
  font-size: 0.88rem;
  line-height: 2;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.content-toggle .details-content p:last-child {
  margin-bottom: 0;
}

.content-toggle .details-content video {
  width: 100%;
  max-width: 480px;
  margin: 12px 0;
  border-radius: 4px;
}

/* skills-section の ul/li（元HTMLのまま） */
.skills-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-section ul li {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.06em;
  margin-top: 24px;
  margin-bottom: 4px;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
}

.skills-section ul p {
  font-size: 0.86rem;
  line-height: 2;
  color: var(--fg-muted);
  padding-left: 14px;
  margin: 0;
}

/* portfolio-section の本文テキスト */
.portfolio-section div p,
.about-site div p {
  font-size: 0.88rem;
  line-height: 2.1;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.portfolio-section div p:last-child {
  margin-bottom: 0;
}

.portfolio-section div {
  margin-bottom: 20px;
}

.portfolio-section a {
  color: var(--gold);
}

.portfolio-section a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portfolio-section img {
  max-width: 100%;
  border-radius: 4px;
  margin: 16px 0;
}

/* タイムライン */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px 24px 1fr;
  gap: 0 16px;
  align-items: start;
  min-height: 60px;
}

.timeline-date h3 {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold);
  padding-top: 6px;
  text-align: right;
  margin: 0;
}

.timeline-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-center::after {
  content: '';
  flex: 1;
  width: 1px;
  background: var(--card-border);
  margin-top: 4px;
}

.timeline-item:last-child .timeline-center::after {
  display: none;
}

.timeline-content {
  padding: 4px 0 24px;
}

.timeline-content p {
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--fg-muted);
  margin: 0 0 4px;
  word-wrap: break-word;
}

.timeline-content a {
  color: var(--gold);
}

.timeline-content a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .timeline-item {
    grid-template-columns: 100px 20px 1fr;
  }

  .timeline-date h3 {
    font-size: 0.7rem;
  }
}

/* ============================================================
   ANIMATION KEYFRAMES
   ============================================================ */
@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lineGrow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes dotPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(201, 168, 76, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes accordionOpen {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

/* スクロール連動フェードイン */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ============================================================
   WORKS — カードデザイン刷新
   ============================================================ */

/* ページタイトルエリア強化 */
.works-intro {
  padding: 80px 64px 48px;
  position: relative;
  overflow: hidden;
}

.works-intro::before {
  content: 'WORKS';
  position: absolute;
  top: -10px;
  right: 40px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6rem, 14vw, 14rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* 年見出し — より存在感を */
.work-year-heading {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  color: var(--fg);
  margin: 72px 0 28px;
  padding-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.work-year-heading::before {
  content: '—';
  font-family: "DM Mono", monospace;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0;
}

.work-year-heading::after {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  animation: lineGrow 0.6s ease forwards;
  transform-origin: left;
}

/* カードグリッド */
.works-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* カード本体 — 強化版 */
.work-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  animation: fadeInScale 0.5s ease both;
}

/* サムネイル上のオーバーレイ */
.work-item::after {
  content: '詳細を見る';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      transparent 40%,
      rgba(9, 12, 16, 0.82) 100%);
  color: rgba(255, 255, 255, 0);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 14px 14px 0;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.work-item:hover::after {
  color: rgba(201, 168, 76, 0.9);
  opacity: 1;
}

.work-item:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--gold);
  border-color: var(--gold);
}

[data-theme="dark"] .work-item:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--gold);
}

/* サムネイル */
.work-item>img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
  filter: brightness(0.95) saturate(0.9);
}

.work-item:hover>img {
  transform: scale(1.06);
  filter: brightness(1.05) saturate(1.1);
}

/* タイトル */
.work-item>p {
  padding: 12px 14px 16px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  transition: color 0.3s ease;
}

.work-item:hover>p {
  color: var(--fg);
}

/* ツールアイコン */
.s-icon-container {
  gap: 6px;
  padding: 6px 14px 2px;
}

.s-icon {
  width: 16px;
  height: 16px;
  opacity: 0.45;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-item:hover .s-icon {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* タグ強化 */
.tag {
  font-size: 0.58rem;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.1em;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ポップアップ強化 */
.popup {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.popup-content {
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.popup-description {
  font-size: 0.88rem;
  line-height: 2.1;
}

.close-button {
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.close-button:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

/* ============================================================
   ABOUT ME — セクション全体強化
   ============================================================ */

/* アイコンにグロー */
.about-section .icon {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.about-section .icon:hover {
  box-shadow: 0 0 0 8px rgba(201, 168, 76, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.18);
  transform: scale(1.04);
}

/* about-under の背景に装飾 */
.about-under {
  position: relative;
  overflow: hidden;
}

.about-under::before {
  background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* セクション見出し — ゴールドアンダーラインアニメーション */
.skills-section h1,
.portfolio-section h1,
.meaning-section h1,
.timeline h1 {
  position: relative;
  padding-left: 0;
  border-left: none;
  padding-bottom: 10px;
  margin-bottom: 36px;
}

.skills-section h1::after,
.portfolio-section h1::after,
.meaning-section h1::after,
.timeline h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
  transform-origin: left;
  animation: lineGrow 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* アコーディオン強化 */
.content-toggle {
  border-bottom: 1px solid var(--card-border);
  padding: 0;
  transition: background 0.25s ease;
  border-radius: 4px;
  overflow: hidden;
}

.content-toggle:hover {
  background: rgba(201, 168, 76, 0.03);
}

.content-toggle .toggle-button {
  font-size: 1.02rem;
  padding: 18px 8px;
  padding-right: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.content-toggle .toggle-button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.3s ease;
}

.content-toggle.open .toggle-button::before,
.content-toggle .toggle-button:hover::before {
  background: var(--gold);
}

.content-toggle .toggle-button::after {
  content: '＋';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-toggle.open .toggle-button::after {
  content: '－';
  color: var(--bg);
  border-color: var(--gold);
  transform: translateY(-50%) rotate(180deg);
}

.content-toggle .teaser {
  font-size: 0.78rem;
  color: var(--fg-subtle);
  font-style: italic;
  margin: 0;
  padding: 0;
}

.content-toggle .details-content {
  display: none;
  padding: 16px 16px 24px 20px;
  border-left: 2px solid var(--gold);
  margin: 0 8px 8px;
  border-radius: 0 0 4px 4px;
  background: rgba(201, 168, 76, 0.03);
}

.content-toggle.open .details-content {
  display: block;
  animation: accordionOpen 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* タイムライン強化 */
.timeline-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--gold);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: var(--gold);
  animation: dotPulse 1.5s ease infinite;
}

.timeline-center::after {
  background: linear-gradient(to bottom, var(--gold), var(--card-border));
}

.timeline-date h3 {
  font-size: 0.82rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-date h3 {
  opacity: 1;
}

.timeline-content p {
  transition: color 0.3s ease;
}

.timeline-item:hover .timeline-content p {
  color: var(--fg);
}

/* スキルリスト強化 */
.skills-section ul li {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--gold);
  margin-top: 28px;
  position: relative;
  transition: color 0.3s ease;
}

.skills-section ul li::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.skills-section ul p {
  padding-left: 16px;
  border-left: 1px dashed var(--card-border);
  margin-left: 0;
  padding-top: 4px;
}

/* About Meのrevealクラスをscript.jsで付与するため定義 */
.about-under .skills-section,
.about-under .portfolio-section,
.about-under .meaning-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-under .skills-section.active,
.about-under .portfolio-section.active,
.about-under .meaning-section.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   WORKS カードのスタガードアニメーション
   ============================================================ */
.works-list .work-item:nth-child(1) {
  animation-delay: 0.05s;
}

.works-list .work-item:nth-child(2) {
  animation-delay: 0.12s;
}

.works-list .work-item:nth-child(3) {
  animation-delay: 0.19s;
}

.works-list .work-item:nth-child(4) {
  animation-delay: 0.26s;
}

.works-list .work-item:nth-child(5) {
  animation-delay: 0.33s;
}

.works-list .work-item:nth-child(6) {
  animation-delay: 0.40s;
}


/* ============================================================
   ANIMATION & VISUAL ENHANCEMENTS
   Works / About Me 強化 + スクロール連動アニメーション
   ============================================================ */

/* ---------- スクロール連動フェードイン ---------- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal:not(.in-view) {
  opacity: 0;
  transform: translateY(32px);
}

.reveal-left {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left:not(.in-view) {
  opacity: 0;
  transform: translateX(-28px);
}

/* stagger children */
.stagger-children>* {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children:not(.in-view)>* {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.in-view>* {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.in-view>*:nth-child(1) {
  transition-delay: 0s;
}

.stagger-children.in-view>*:nth-child(2) {
  transition-delay: 0.08s;
}

.stagger-children.in-view>*:nth-child(3) {
  transition-delay: 0.16s;
}

.stagger-children.in-view>*:nth-child(4) {
  transition-delay: 0.24s;
}

.stagger-children.in-view>*:nth-child(5) {
  transition-delay: 0.32s;
}

.stagger-children.in-view>*:nth-child(6) {
  transition-delay: 0.40s;
}

.stagger-children.in-view>*:nth-child(7) {
  transition-delay: 0.48s;
}

.stagger-children.in-view>*:nth-child(8) {
  transition-delay: 0.56s;
}

/* ---------- セクション見出し — 流れるアンダーライン ---------- */
.skills-section h1,
.portfolio-section h1,
.meaning-section h1,
.timeline h1 {
  overflow: hidden;
}

.skills-section h1::before,
.portfolio-section h1::before,
.meaning-section h1::before,
.timeline h1::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -16px;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
  opacity: 0.06;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.skills-section h1,
.portfolio-section h1,
.meaning-section h1,
.timeline h1 {
  position: relative;
}

.in-view .skills-section h1::before,
.skills-section h1.in-view::before,
.portfolio-section h1.in-view::before,
.meaning-section h1.in-view::before,
.timeline h1.in-view::before {
  width: calc(100% + 16px);
}

/* ---------- WORKS カード 強化 ---------- */

/* カード全体に浮き上がり＋金縁 */
.work-item {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}

.work-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
      rgba(201, 168, 76, 0) 0%,
      rgba(201, 168, 76, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
}

.work-item:hover::before {
  opacity: 1;
}

/* ホバー時 — タイトルにゴールドライン */
.work-item>p {
  position: relative;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.work-item>p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.work-item:hover>p {
  color: var(--fg);
  padding-left: 20px;
}

.work-item:hover>p::before {
  width: 12px;
}

/* サムネ上に「CLICK」バッジ */
.work-item .thumb-wrap {
  position: relative;
  overflow: hidden;
}

.work-item .thumb-wrap::after {
  content: 'VIEW';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: #fff;
  background: rgba(9, 12, 16, 0);
  transition: background 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}

.work-item:hover .thumb-wrap::after {
  background: rgba(9, 12, 16, 0.42);
  opacity: 1;
}

/* Works グリッド — カード登場アニメ（stagger） */
.works-list {
  position: relative;
}

.work-item {
  animation: none;
}

.works-list.in-view .work-item {
  animation: cardAppear 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.works-list.in-view .work-item:nth-child(1) {
  animation-delay: 0s;
}

.works-list.in-view .work-item:nth-child(2) {
  animation-delay: 0.07s;
}

.works-list.in-view .work-item:nth-child(3) {
  animation-delay: 0.14s;
}

.works-list.in-view .work-item:nth-child(4) {
  animation-delay: 0.21s;
}

.works-list.in-view .work-item:nth-child(5) {
  animation-delay: 0.28s;
}

.works-list.in-view .work-item:nth-child(6) {
  animation-delay: 0.35s;
}

.works-list.in-view .work-item:nth-child(7) {
  animation-delay: 0.42s;
}

.works-list.in-view .work-item:nth-child(8) {
  animation-delay: 0.49s;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 年ヘッダーのカウンター風装飾 */
.work-year-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.work-year-heading::before {
  letter-spacing: 0.14em;
  color: var(--gold);
  opacity: 0.7;
}

/* 共通ページタイトルスライドイン */
.works-page-title,
.about-hero h1,
.blog-intro h1 {
  display: inline-block;
  animation: titleSlide 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes titleSlide {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

/* ---------- ABOUT ME 強化 ---------- */

/* アイコン — 金リング＋輝きアニメ */
.about-section .icon {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12),
    0 0 0 8px rgba(201, 168, 76, 0.05);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.about-section .icon:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 6px rgba(201, 168, 76, 0.18),
    0 0 0 12px rgba(201, 168, 76, 0.07);
}

@keyframes iconPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12), 0 0 0 8px rgba(201, 168, 76, 0.05);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(201, 168, 76, 0.20), 0 0 0 14px rgba(201, 168, 76, 0.08);
  }
}

/* アコーディオン — スライドイン */
.content-toggle .details-content {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 0 0 16px;
  border-left: 2px solid transparent;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.4s ease,
    border-color 0.3s ease;
}

.content-toggle.open .details-content {
  max-height: 1200px;
  padding: 12px 0 20px 16px;
  border-left-color: var(--gold);
}

/* ＋アイコンに回転 */
.content-toggle .toggle-button::after {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.content-toggle.open .toggle-button::after {
  transform: rotate(45deg);
  content: '＋';
  color: var(--gold);
}

/* content-toggle ホバー時の背景フラッシュ */
.content-toggle .toggle-button {
  border-radius: 4px;
  padding: 16px 4px;
  margin: 0 -4px;
}

.content-toggle .toggle-button:hover {
  background: rgba(201, 168, 76, 0.04);
}

/* タイムライン ドット — パルスアニメ */
.timeline-dot {
  box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5);
  animation: dotPulse 2.8s ease-out infinite;
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5);
  }

  60% {
    box-shadow: 0 0 0 8px rgba(201, 168, 76, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
  }
}

/* タイムライン — スクロール時に左からスライドイン */
.timeline-item {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:not(.in-view) {
  opacity: 0;
  transform: translateX(-16px);
}

/* タイムライン縦線 — 伸びるアニメ */
.timeline-center::after {
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.timeline-item.in-view .timeline-center::after {
  transform: scaleY(1);
}

/* スキルセクション li — 左からスライド */
.skills-section ul li {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}

.skills-section:not(.in-view) ul li {
  opacity: 0;
  transform: translateX(-12px);
}

.skills-section.in-view ul li:nth-child(odd) {
  transition-delay: 0.05s;
}

.skills-section.in-view ul li:nth-child(even) {
  transition-delay: 0.12s;
}

/* About ヒーロー名前 — 字送りフェードイン */
.about-info h1 {
  animation: nameReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes nameReveal {
  from {
    opacity: 0;
    letter-spacing: 0.3em;
  }

  to {
    opacity: 1;
    letter-spacing: 0.08em;
  }
}

.e-name {
  animation: nameReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

/* about-under セクション背景 — subtle grain texture overlay */
.about-under::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(201, 168, 76, 0.018) 2px,
      rgba(201, 168, 76, 0.018) 3px);
  pointer-events: none;
  z-index: 0;
}

.about-under {
  position: relative;
}

.about-under>* {
  position: relative;
  z-index: 1;
}

/* ---------- Popup 強化 ---------- */
.popup-content {
  animation: none;
}

.popup.active .popup-content {
  animation: popupIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ポップアップ 閉じるボタン — 回転 */
.close-button {
  transition: transform 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.close-button:hover {
  transform: rotate(90deg);
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   PERFORMANCE & ACCESSIBILITY ADDITIONS
   ============================================================ */

/* ---------- スクリーンリーダー専用テキスト ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- content-visibility: スクロール外セクションのレンダリング遅延 ---------- */
.work-section .works-list {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* ---------- フォーカスリング（アクセシビリティ強化） ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 画像の Cumulative Layout Shift 防止 ---------- */
img {
  width: 100%;
  height: auto;
}

.thumb-wrap img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.blog-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- スキップリンク ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ---------- ローディングテキスト ---------- */
.loading-text {
  padding: 20px;
  opacity: 0.5;
  text-align: center;
}

/* ---------- Blog aria-live 用最小高さ（CLS防止）---------- */
#blog-list {
  min-height: 200px;
}

/* ---------- about skills: ul→dl スタイル互換 ---------- */
.skills-section dl dt {
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.4em;
  font-family: "DM Mono", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.skills-section dl dd {
  margin-left: 0;
  padding-left: 1em;
  border-left: 2px solid var(--gold);
  margin-top: 0.4em;
  color: var(--fg-muted);
}