/* Fippenluck Works - Premium Edition */
:root {
  color-scheme: dark;

  /* Enhanced color palette */
  --bg-base: #08090e;
  --bg-elevated: #0f1118;
  --bg-panel: rgba(18, 20, 28, 0.85);
  --bg-card: rgba(22, 25, 36, 0.92);

  /* Foreground colors */
  --fg-primary: #f0f3ff;
  --fg-secondary: #b8c2e0;
  --fg-muted: #7a86a8;

  /* Accent colors with gradients */
  --accent-1: #a78bfa;
  --accent-2: #ec4899;
  --accent-3: #06b6d4;
  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #f97316 100%);
  --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(167, 139, 250, 0.15), transparent 70%);

  /* Soft accents */
  --accent-soft: rgba(167, 139, 250, 0.08);
  --accent-border: rgba(167, 139, 250, 0.25);

  /* Borders & shadows */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.25);

  /* Typography */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, sans-serif;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;

  /* Timing functions */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--fg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-smooth);
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

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

.hidden {
  display: none !important;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--accent-border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-1);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.025em;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-smooth);
  isolation: isolate;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  z-index: -1;
}

.btn.primary {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  color: white;
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn.ghost {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  color: var(--fg-primary);
  backdrop-filter: blur(20px);
}

.btn.ghost::before {
  opacity: 1;
  background: var(--accent-soft);
}

.btn.ghost:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn.ghost:hover::before {
  opacity: 1;
}

.btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ============================================
   Topbar / Header
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
  background: rgba(15, 17, 24, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem clamp(1.5rem, 5vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.brand__link {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.3s var(--ease-smooth);
}

.brand__link:hover {
  opacity: 0.8;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.3s var(--ease-smooth);
  backdrop-filter: blur(10px);
}

.hamburger:hover {
  background: var(--accent-soft);
  border-color: var(--accent-1);
  transform: scale(1.05);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-smooth);
}

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

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

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

.social ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.social a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.social a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out-expo);
}

.social a:hover {
  color: var(--fg-primary);
}

.social a:hover::after {
  transform: scaleX(1);
}

/* ============================================
   Layout
   ============================================ */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  border-right: 1px solid var(--border-subtle);
  background: rgba(15, 17, 24, 0.6);
  backdrop-filter: blur(20px);
  padding: 2rem 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  transition: transform 0.3s var(--ease-out-expo);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent-1) 50%, transparent);
  opacity: 0.2;
}

.sidebar__section + .sidebar__section {
  margin-top: 2.5rem;
}

.sidebar h2 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-left: 0.5rem;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-list li {
  padding: 0.875rem 1rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-list li:hover,
.nav-list li:focus-visible {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.nav-list li:hover::before {
  transform: scaleY(1);
}

.nav-list li.active {
  border-color: var(--accent-1);
  background: linear-gradient(135deg, var(--accent-soft), rgba(236, 72, 153, 0.08));
  color: var(--fg-primary);
  box-shadow: var(--shadow-md);
}

.nav-list li.active::before {
  transform: scaleY(1);
}

.series-section-header {
  padding: 0.5rem 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: default;
  background: none !important;
  border: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.series-section-header:first-child {
  margin-top: 0;
}

.series-section-header::before {
  display: none;
}

.sidebar__links {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  margin-top: 2rem;
}

.sidebar__links h2 {
  margin-top: 1.5rem;
}

.sidebar__links h2:first-child {
  margin-top: 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.link-list li {
  margin: 0;
}

.link-list a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--fg-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s var(--ease-smooth);
  font-size: 0.9rem;
}

.link-list a:hover {
  background: var(--accent-soft);
  color: var(--accent-1);
  transform: translateX(4px);
}

.link-list a:active {
  transform: translateX(2px);
}

/* ============================================
   Main Content Area
   ============================================ */
.content {
  padding: clamp(2rem, 5vw, 4rem);
  overflow-y: auto;
  position: relative;
  animation: fadeIn 0.5s var(--ease-smooth);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15), transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(5deg);
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 60ch;
}

.hero__media {
  border-radius: 24px;
  background: var(--gradient-secondary);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  mix-blend-mode: overlay;
}

.hero img {
  width: min(100%, 600px);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

/* ============================================
   WIP Works (制作中作品)
   ============================================ */
.wip-works {
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.wip-works__title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-primary);
  text-align: center;
}

.wip-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.wip-card {
  display: block;
  text-decoration: none;
  transition: transform 0.3s var(--ease-smooth);
}

.wip-card:hover {
  transform: translateY(-8px);
}

.wip-card__inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.wip-card:hover .wip-card__inner {
  border-color: var(--accent-1);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.wip-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wip-card__content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.wip-card__status {
  display: inline-block;
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: var(--accent-1);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wip-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.3;
}

.wip-card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
  font-weight: 500;
}

.wip-card__description {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.wip-link {
  display: block;
  padding: 0.875rem 1rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-smooth);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--fg-primary);
}

.wip-link:hover {
  border-color: var(--accent-1);
  background: var(--accent-soft);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Work Detail View
   ============================================ */
.work {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid var(--border-subtle);
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow-lg);
  max-width: 1400px;
  margin: 0 auto;
  animation: slideIn 0.4s var(--ease-out-expo);
}

.work__nav {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.works-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.work-nav-button {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  white-space: nowrap;
}

.work-nav-button:hover {
  background: var(--accent-soft);
  color: var(--accent-1);
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.work-nav-button.active {
  background: var(--accent-1);
  color: white;
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.work__media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

.work__video,
.work__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s var(--ease-smooth);
}

.work__media:hover .work__video,
.work__media:hover .work__image {
  transform: scale(1.02);
}

.work__body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 0;
}

.work__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work__header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tag-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list .tag,
.tag-list li {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-1);
  transition: all 0.3s var(--ease-smooth);
}

.tag-list li:hover {
  background: var(--accent-border);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.work__desc {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 70ch;
}

.work__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.work__trial {
  margin-top: 1rem;
}

.work__samples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.sample-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.sample-image:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.work__notes {
  margin: 2rem 0 1rem;
  padding: 1.5rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  color: var(--fg-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.work__notes-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.notes-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-smooth);
}

.notes-image:hover {
  transform: scale(1.02);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.btn.secondary {
  background: var(--gradient-secondary);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn.secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s var(--ease-smooth);
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 1;
}

.lightbox__image {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 3rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
  z-index: 2;
  user-select: none;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev {
  left: 20px;
}

.lightbox__nav--next {
  right: 20px;
}

.lightbox__nav.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   Age Gate
   ============================================ */
.agegate {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(40px) saturate(120%);
  background: rgba(8, 9, 14, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
  animation: fadeIn 0.4s var(--ease-smooth);
}

.agegate__panel {
  max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid var(--border-strong);
  padding: 3rem clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.agegate__panel::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 70%);
  pointer-events: none;
}

.agegate__panel h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.agegate__panel p {
  margin: 0 0 2rem;
  color: var(--fg-secondary);
  line-height: 1.6;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.agegate__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1023px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(340px, 85vw);
    transform: translateX(-100%);
    z-index: 90;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: -1;
  }

  .hamburger {
    display: inline-flex;
  }

  .content {
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }

  .work {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    padding: clamp(2rem, 5vw, 3rem);
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0.875rem 1.25rem;
  }

  .brand__link {
    font-size: 1.1rem;
  }

  .social ul {
    gap: 1rem;
  }

  .social a {
    font-size: 0.875rem;
  }

  .work__body {
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .social ul {
    display: none;
  }

  .work__links {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .work__header h1 {
    font-size: 1.75rem;
  }

  .agegate__panel {
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   Focus Visible (Accessibility)
   ============================================ */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 4px;
  border-radius: 8px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
