/* ============================================
   Portfolio — Apple-Inspired Design System
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* --- Tokens --- */
:root {
  --font-primary: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', 'Segoe UI', sans-serif;
  --font-jp: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Inter', 'Hiragino Sans', sans-serif;

  --color-bg: #000000;
  --color-bg-alt: #0a0a0a;
  --color-surface: #1d1d1f;
  --color-surface-hover: #2d2d2f;
  --color-text: #f5f5f7;
  --color-text-secondary: #86868b;
  --color-text-tertiary: #6e6e73;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-accent: #f5f5f7;

  --max-width: 980px;
  --max-width-narrow: 720px;
  --section-spacing: 160px;
  --section-spacing-mobile: 100px;

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

  --transition-fast: 0.2s var(--ease-out);
  --transition-medium: 0.5s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 12px;
  left: 24px;
  right: 24px;
  max-width: 1000px;
  margin: 0 auto;
  z-index: 100;
  background: rgba(40, 40, 44, 0.35);
  backdrop-filter: saturate(180%) blur(40px) brightness(1.1);
  -webkit-backdrop-filter: saturate(180%) blur(40px) brightness(1.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}

.nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 100%);
  pointer-events: none;
  border-radius: 20px 20px 0 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.nav-logo-sub {
  font-weight: 400;
  color: var(--color-text-tertiary);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

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

.nav-menu-btn {
  display: none !important;
}

/* --- Sections --- */
.section {
  padding: var(--section-spacing) 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--wide {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section--narrow {
  max-width: var(--max-width-narrow);
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-jp);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.section-title--en {
  font-family: var(--font-primary);
}

.section-subtitle {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 600px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-name {
  font-family: var(--font-primary);
  font-size: 80px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #a0a0a5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-family: var(--font-jp);
  font-size: 20px;
  font-weight: 300;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.hero-meta {
  display: flex;
  gap: 32px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  font-weight: 400;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-tertiary);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}

.hero-scroll-indicator::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--color-text-tertiary), transparent);
}

@keyframes float {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* --- About --- */
.about-content {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.about-image-wrap {
  flex-shrink: 0;
  position: relative;
  margin-top: 8px;
}

.about-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.about-text {
  font-family: var(--font-jp);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text);
  letter-spacing: 0.02em;
  flex: 1;
}

.about-text strong {
  font-weight: 600;
  color: #fff;
}

/* --- Works Grid --- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.work-card--featured {
  grid-column: 1 / -1;
}

.work-card--compact .work-card-thumbnail {
  aspect-ratio: 4 / 3;
}

.work-card--compact .work-card-body {
  padding: 16px 20px 20px;
}

.work-card--compact .work-card-title {
  font-size: 16px;
}

.work-card--compact .work-card-desc {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 48px;
}

.work-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-body {
  padding: 24px 28px 28px;
}

.work-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}

.work-card-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.work-card-roles-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
  margin-right: 2px;
}

.work-card-affiliation {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 8px;
  opacity: 0.7;
}

.work-card-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

/* Card Action Bar */
.work-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.work-card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.work-card-expand {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
}

.work-card-expand:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text);
}

.work-card-link {
  background: rgba(100, 160, 255, 0.1);
  color: rgba(130, 180, 255, 0.9);
}

.work-card-link:hover {
  background: rgba(100, 160, 255, 0.2);
  color: #fff;
}

.work-card-title {
  font-family: var(--font-jp);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.work-card-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Video Section --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.video-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface);
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #111;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info {
  padding: 20px 24px;
}

.video-title {
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* --- Work Card Media Types --- */
.work-card-media {
  width: 100%;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.work-card--featured .work-card-media {
  border-radius: 20px 20px 0 0;
}

.website-embed {
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.work-card--tall .website-embed {
  height: 800px;
}

.work-card--tall .video-embed {
  height: 600px;
}

.website-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.pdf-embed object {
  border-radius: 0;
}

/* Card Link Wrapper */
.work-card-link-wrap {
  text-decoration: none;
  color: inherit;
  display: contents;
}

.work-card-link-wrap .work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* PDF Card */
.work-card--pdf:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.pdf-thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.pdf-thumb-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* PDF Slider */
.pdf-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.pdf-slider-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 300px;
}

.pdf-slide {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pdf-slider-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pdf-slider-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.pdf-slider-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pdf-slider-counter {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-text-secondary);
  min-width: 80px;
  text-align: center;
}

/* OGP Link Card */
.work-card-ogp-link {
  text-decoration: none;
  color: inherit;
}

.ogp-card {
  display: flex;
  flex-direction: column;
}

.ogp-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.ogp-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-surface);
}

.ogp-card-site {
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ogp-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.ogp-card-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Documents --- */
.docs-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-surface);
  border-radius: 16px;
  padding: 24px 28px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  color: var(--color-text);
}

.doc-card:hover {
  background: var(--color-surface-hover);
  transform: translateX(4px);
  color: var(--color-text);
}

.doc-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.doc-meta {
  font-size: 13px;
  color: var(--color-text-tertiary);
}

.doc-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--color-text-tertiary);
  transition: transform var(--transition-fast);
}

.doc-card:hover .doc-arrow {
  transform: translateX(4px);
}

/* --- Career Timeline --- */
.career-timeline {
  max-width: var(--max-width);
  margin: 0 auto;
}

.career-item {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: flex-start;
}

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

.career-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.career-body {
  flex: 1;
  min-width: 0;
}

.career-year {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.career-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.career-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skill-group {
  background: var(--color-surface);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skill-group-image-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 0;
}

.skill-group-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.skill-group-title,
.skill-list {
  padding-left: 32px;
  padding-right: 32px;
}

.skill-group-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-top: 24px;
  margin-bottom: 20px;
  border-bottom: none;
}

/* card with no image: give top padding */
.skill-group:not(:has(.skill-group-image-wrap)) .skill-group-title {
  margin-top: 32px;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 32px;
}

.skill-list li {
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* --- Contact / Footer --- */
.contact {
  text-align: center;
  padding: var(--section-spacing) 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-heading {
  font-family: var(--font-primary);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #86868b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-text {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 28px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.contact-link:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.contact-link-url {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: none;
}

.footer-text {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* --- Divider --- */
.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.divider hr {
  border: none;
  height: 0;
  background: transparent;
}

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

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

.fade-in-delay-1 {
  transition-delay: 0.1s;
}

.fade-in-delay-2 {
  transition-delay: 0.2s;
}

.fade-in-delay-3 {
  transition-delay: 0.3s;
}

.fade-in-delay-4 {
  transition-delay: 0.4s;
}

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

  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: none !important;
  }

  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 24px;
    gap: 16px;
  }

  .nav.menu-open .nav-links a {
    font-size: 14px;
  }

  .hero-name {
    font-size: 44px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 12px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-subtitle {
    font-size: 17px;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
  }

  .about-image {
    width: 100px;
    height: 100px;
  }

  .about-text {
    font-size: 20px;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-heading {
    font-size: 36px;
  }

  .video-grid {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 36px;
  }

  .section-title {
    font-size: 28px;
  }

  .work-card-body {
    padding: 18px 20px 22px;
  }

  .work-card-title {
    font-size: 18px;
  }
}

/* --- Work Card Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  pointer-events: all;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--color-bg-alt);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-media {
  width: 100%;
}

.modal-media img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.modal-info {
  padding: 28px 32px 36px;
}

.modal-title {
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin: 8px 0 12px;
}

.modal-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.modal-link-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.modal-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ============ THEMES ============ */
[data-theme="midnight"] {
  --color-bg: #0a0a1a;
  --color-bg-alt: #0f0f24;
  --color-surface: #1a1a2e;
  --color-surface-hover: #252540;
  --color-text: #e8e8f0;
  --color-text-secondary: #8888a8;
  --color-text-tertiary: #6666a0;
  --color-border: rgba(100, 100, 255, .1);
  --color-accent: #818cf8;
}

[data-theme="forest"] {
  --color-bg: #050f08;
  --color-bg-alt: #0a1a0f;
  --color-surface: #142218;
  --color-surface-hover: #1e3325;
  --color-text: #e0f0e4;
  --color-text-secondary: #7ba882;
  --color-text-tertiary: #5a8862;
  --color-border: rgba(80, 180, 100, .1);
  --color-accent: #6ee7a0;
}

[data-theme="crimson"] {
  --color-bg: #0f0508;
  --color-bg-alt: #1a0a10;
  --color-surface: #261418;
  --color-surface-hover: #381e24;
  --color-text: #f0e0e2;
  --color-text-secondary: #b07080;
  --color-text-tertiary: #905868;
  --color-border: rgba(220, 80, 100, .1);
  --color-accent: #f87171;
}

[data-theme="ocean"] {
  --color-bg: #040a10;
  --color-bg-alt: #081420;
  --color-surface: #0f2030;
  --color-surface-hover: #183040;
  --color-text: #e0f0f8;
  --color-text-secondary: #70a0b8;
  --color-text-tertiary: #508898;
  --color-border: rgba(60, 160, 220, .1);
  --color-accent: #38bdf8;
}

[data-theme="ember"] {
  --color-bg: #100804;
  --color-bg-alt: #1a1008;
  --color-surface: #281c10;
  --color-surface-hover: #38281a;
  --color-text: #f0e8e0;
  --color-text-secondary: #b89878;
  --color-text-tertiary: #987858;
  --color-border: rgba(220, 160, 60, .1);
  --color-accent: #fbbf24;
}

[data-theme="snow"] {
  --color-bg: #f8f9fc;
  --color-bg-alt: #fff;
  --color-surface: #fff;
  --color-surface-hover: #f0f1f5;
  --color-text: #1a1a2e;
  --color-text-secondary: #555570;
  --color-text-tertiary: #888898;
  --color-border: rgba(0, 0, 0, .08);
  --color-accent: #4f46e5;
}

[data-theme="cream"] {
  --color-bg: #faf8f4;
  --color-bg-alt: #fffdf8;
  --color-surface: #fff9f0;
  --color-surface-hover: #f4efe6;
  --color-text: #2a2520;
  --color-text-secondary: #756855;
  --color-text-tertiary: #9a8e7c;
  --color-border: rgba(100, 80, 40, .1);
  --color-accent: #b45309;
}

[data-theme="lavender"] {
  --color-bg: #f5f0ff;
  --color-bg-alt: #faf7ff;
  --color-surface: #f0eaff;
  --color-surface-hover: #e5ddf8;
  --color-text: #1e1830;
  --color-text-secondary: #6b5a90;
  --color-text-tertiary: #8878a8;
  --color-border: rgba(100, 60, 200, .1);
  --color-accent: #7c3aed;
}

[data-theme="mint"] {
  --color-bg: #f0faf6;
  --color-bg-alt: #f6fff9;
  --color-surface: #e8f8f0;
  --color-surface-hover: #d8f0e4;
  --color-text: #1a2e22;
  --color-text-secondary: #507060;
  --color-text-tertiary: #78a090;
  --color-border: rgba(40, 160, 100, .1);
  --color-accent: #059669;
}

[data-theme="rose"] {
  --color-bg: #fef2f5;
  --color-bg-alt: #fff5f8;
  --color-surface: #ffeef2;
  --color-surface-hover: #fde2e8;
  --color-text: #2a1520;
  --color-text-secondary: #905060;
  --color-text-tertiary: #b07888;
  --color-border: rgba(200, 60, 100, .1);
  --color-accent: #e11d48;
}

/* --- New colorful themes --- */
[data-theme="sakura"] {
  --color-bg: #100810;
  --color-bg-alt: #1a0e1a;
  --color-surface: #261028;
  --color-surface-hover: #381838;
  --color-text: #f0e0f0;
  --color-text-secondary: #c090c0;
  --color-text-tertiary: #a070a0;
  --color-border: rgba(200, 100, 200, .12);
  --color-accent: #f0abfc;
}

[data-theme="neon"] {
  --color-bg: #050a08;
  --color-bg-alt: #081410;
  --color-surface: #0a1e14;
  --color-surface-hover: #102a1c;
  --color-text: #d0fce8;
  --color-text-secondary: #60d0a0;
  --color-text-tertiary: #40b080;
  --color-border: rgba(0, 255, 150, .1);
  --color-accent: #4ade80;
}

[data-theme="copper"] {
  --color-bg: #0e0806;
  --color-bg-alt: #181008;
  --color-surface: #241a10;
  --color-surface-hover: #342618;
  --color-text: #f0e4d8;
  --color-text-secondary: #c0a080;
  --color-text-tertiary: #a08060;
  --color-border: rgba(200, 150, 80, .12);
  --color-accent: #d4a574;
}

[data-theme="aurora"] {
  --color-bg: #06080e;
  --color-bg-alt: #0a1018;
  --color-surface: #101828;
  --color-surface-hover: #182238;
  --color-text: #e0f0ff;
  --color-text-secondary: #80b0d8;
  --color-text-tertiary: #6090b8;
  --color-border: rgba(100, 180, 255, .1);
  --color-accent: #67e8f9;
}

[data-theme="grape"] {
  --color-bg: #0a060e;
  --color-bg-alt: #120a1a;
  --color-surface: #1e1028;
  --color-surface-hover: #2a1838;
  --color-text: #e8e0f4;
  --color-text-secondary: #a088c0;
  --color-text-tertiary: #8068a0;
  --color-border: rgba(160, 100, 240, .1);
  --color-accent: #a78bfa;
}

/* --- Grayscale themes --- */
[data-theme="charcoal"] {
  --color-bg: #1a1a1a;
  --color-bg-alt: #222222;
  --color-surface: #2a2a2a;
  --color-surface-hover: #333333;
  --color-text: #e8e8e8;
  --color-text-secondary: #999999;
  --color-text-tertiary: #777777;
  --color-border: rgba(255, 255, 255, .08);
  --color-accent: #d4d4d4;
}

[data-theme="slate"] {
  --color-bg: #2c2c34;
  --color-bg-alt: #34343e;
  --color-surface: #3c3c48;
  --color-surface-hover: #484858;
  --color-text: #e8e8f0;
  --color-text-secondary: #9898a8;
  --color-text-tertiary: #787888;
  --color-border: rgba(255, 255, 255, .06);
  --color-accent: #c0c0d0;
}

[data-theme="ash"] {
  --color-bg: #e8e8ec;
  --color-bg-alt: #f0f0f4;
  --color-surface: #f5f5f8;
  --color-surface-hover: #eaeaef;
  --color-text: #1a1a24;
  --color-text-secondary: #555566;
  --color-text-tertiary: #888899;
  --color-border: rgba(0, 0, 0, .08);
  --color-accent: #555566;
}

/* Light theme overrides */
[data-theme="snow"] .hero-name,
[data-theme="cream"] .hero-name,
[data-theme="lavender"] .hero-name,
[data-theme="mint"] .hero-name,
[data-theme="rose"] .hero-name,
[data-theme="ash"] .hero-name {
  background: linear-gradient(180deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="snow"] .about-text strong,
[data-theme="cream"] .about-text strong,
[data-theme="lavender"] .about-text strong,
[data-theme="mint"] .about-text strong,
[data-theme="rose"] .about-text strong,
[data-theme="ash"] .about-text strong {
  color: var(--color-text);
}

[data-theme="snow"] .nav,
[data-theme="cream"] .nav,
[data-theme="lavender"] .nav,
[data-theme="mint"] .nav,
[data-theme="rose"] .nav,
[data-theme="ash"] .nav {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

[data-theme="snow"] .work-card-role,
[data-theme="cream"] .work-card-role,
[data-theme="lavender"] .work-card-role,
[data-theme="mint"] .work-card-role,
[data-theme="rose"] .work-card-role,
[data-theme="ash"] .work-card-role {
  background: rgba(0, 0, 0, .06);
}

[data-theme="snow"] .work-card:hover,
[data-theme="cream"] .work-card:hover,
[data-theme="lavender"] .work-card:hover,
[data-theme="mint"] .work-card:hover,
[data-theme="rose"] .work-card:hover,
[data-theme="ash"] .work-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
}

/* ============ LIQUID GLASS CURSOR ============ */
.cursor-hint {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.8) translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.cursor-hint.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Light theme: dark glass */
[data-theme="snow"] .cursor-hint,
[data-theme="cream"] .cursor-hint,
[data-theme="lavender"] .cursor-hint,
[data-theme="mint"] .cursor-hint,
[data-theme="rose"] .cursor-hint,
[data-theme="ash"] .cursor-hint {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============ PLAYLIST SLIM CARD ============ */
.work-card--playlist {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-height: 90px;
  overflow: hidden;
}

.work-card--playlist .work-card-media {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
}

.work-card--playlist .work-card-media .work-card-thumbnail,
.work-card--playlist .work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}

.work-card--playlist .work-card-body {
  padding: 12px 20px;
  flex: 1;
  min-width: 0;
}

.work-card--playlist .work-card-title {
  font-size: 15px;
  margin-bottom: 2px;
}

.work-card--playlist .work-card-desc {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card--playlist .playlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 0, 0, 0.1);
  color: #ff4444;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

@media (max-width: 600px) {
  .work-card--playlist .work-card-media {
    width: 120px;
  }
}