/* ==========================================================================
   Design System & Theme Tokens
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Color Palette - Dark Theme Default */
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.5);

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-primary: #6366f1;
  --accent-secondary: #a855f7;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
  --gradient-text: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #22d3ee 100%);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;

  --glass-bg: rgba(17, 24, 39, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 1px solid rgba(0, 0, 0, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* 💖 Super Bright Neon Pink Theme (超明るいネオンピンク) */
[data-theme="pink"] {
  --bg-primary: #fff0f6;
  --bg-secondary: #ffe3f1;
  --bg-tertiary: #ffd4eb;
  
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(255, 0, 127, 0.35);
  --card-hover-border: rgba(255, 0, 127, 0.9);

  --text-primary: #2e0018;
  --text-secondary: #7a003e;
  --text-muted: #ad0059;

  --accent-primary: #ff007f;
  --accent-secondary: #ff33aa;
  --accent-cyan: #d9006c;
  --accent-pink: #ff007f;

  --gradient-text: linear-gradient(135deg, #e60073 0%, #ff33aa 50%, #800040 100%);
  --glass-bg: rgba(255, 240, 246, 0.95);
  --glass-border: 1px solid rgba(255, 0, 127, 0.4);
  --glass-shadow: 0 10px 35px 0 rgba(255, 0, 127, 0.25);
}

[data-theme="pink"] body {
  background-color: #fff0f6;
  color: #2e0018;
}

[data-theme="pink"] .glass-card,
[data-theme="pink"] .navbar.scrolled,
[data-theme="pink"] .project-card,
[data-theme="pink"] .stat-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 0, 127, 0.35);
  box-shadow: 0 10px 30px rgba(255, 0, 127, 0.15);
}

[data-theme="pink"] .hero-description,
[data-theme="pink"] .section-subtitle,
[data-theme="pink"] .project-desc,
[data-theme="pink"] .stat-label {
  color: #610032 !important;
  font-weight: 500;
}

/* 🪖 Super Bright Camouflage (超明るいポップ迷彩) Theme */
[data-theme="camo"] {
  --bg-primary: #f4f8f0;
  --bg-secondary: #e6f0de;
  --bg-tertiary: #d4e5c7;
  
  --card-bg: rgba(255, 255, 255, 0.93);
  --card-border: rgba(120, 170, 40, 0.4);
  --card-hover-border: rgba(180, 140, 20, 0.9);

  --text-primary: #192711;
  --text-secondary: #3b5429;
  --text-muted: #5d7e44;

  --accent-primary: #68961e;
  --accent-secondary: #c29b1d;
  --accent-cyan: #7cb324;
  --accent-pink: #e67300;

  --gradient-text: linear-gradient(135deg, #598218 0%, #b89218 50%, #192711 100%);
  --glass-bg: rgba(244, 248, 240, 0.95);
  --glass-border: 1px solid rgba(120, 170, 40, 0.45);
  --glass-shadow: 0 10px 35px 0 rgba(80, 120, 30, 0.2);
}

[data-theme="camo"] body {
  background-color: #f4f8f0;
  color: #192711;
  background-image: 
    radial-gradient(#cbe3b7 26%, transparent 26%),
    radial-gradient(#e0d3be 26%, transparent 26%),
    radial-gradient(#a3c488 26%, transparent 26%),
    radial-gradient(#d3e6bf 26%, transparent 26%);
  background-size: 70px 70px;
  background-position: 0 0, 35px 35px, 18px 52px, 52px 18px;
}

[data-theme="camo"] .glass-card,
[data-theme="camo"] .navbar.scrolled,
[data-theme="camo"] .project-card,
[data-theme="camo"] .stat-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(120, 170, 40, 0.4);
  box-shadow: 0 10px 30px rgba(80, 120, 30, 0.15);
}

[data-theme="camo"] .hero-description,
[data-theme="camo"] .section-subtitle,
[data-theme="camo"] .project-desc,
[data-theme="camo"] .stat-label {
  color: #2b401d !important;
  font-weight: 500;
}

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

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

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

/* Background Ambient Orbs */
.bg-ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  animation: pulse-orb 10s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
}

.orb-2 {
  bottom: 10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
  animation-delay: -5s;
}

@keyframes pulse-orb {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(30px, -20px); }
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: 0.8rem 0;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span.accent {
  color: var(--accent-primary);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--card-bg);
  border: var(--glass-border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(15deg);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: var(--font-code);
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.typing-container {
  height: 2.2rem;
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.5rem;
  background-color: var(--accent-primary);
  margin-left: 4px;
  animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
}

.btn-outline {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--card-hover-border);
  transform: translateY(-3px);
}

/* Avatar Container */
.hero-avatar-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-frame {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--gradient-primary);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
  animation: float-frame 6s ease-in-out infinite;
}

@keyframes float-frame {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  display: block;
}

.floating-tech-badge {
  position: absolute;
  padding: 0.6rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-top-left {
  top: 10%;
  left: -15%;
  animation: float-badge 5s ease-in-out infinite;
}

.badge-bottom-right {
  bottom: 10%;
  right: -10%;
  animation: float-badge 5s ease-in-out infinite 2.5s;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(99, 102, 241, 0.3);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-year {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.timeline-title {
  font-size: 1.1rem;
  margin: 0.2rem 0;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-cyan);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.skill-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-percentage {
  color: var(--text-muted);
  font-family: var(--font-code);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Works / Projects Section
   ========================================================================== */
.works-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  border: var(--glass-border);
  color: var(--text-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-hover-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.icon-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform var(--transition-fast);
}

.icon-btn:hover {
  transform: scale(1.15);
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-code);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

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

.modal-content {
  background: var(--bg-secondary);
  border: var(--glass-border);
  width: 90%;
  max-width: 700px;
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

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

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card-bg);
  border: var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-3px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  color: #10b981;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  padding: 3rem 0;
  border-top: var(--glass-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .avatar-frame {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    transition: left var(--transition-normal);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.3rem;
  }
}

/* ==========================================================================
   Super Intense Rainbow Effects (456 Record Holder)
   ========================================================================== */
.rainbow-record-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.6rem;
  background: rgba(15, 15, 25, 0.75);
  border: 3px solid transparent;
  border-radius: 50px;
  background-image: linear-gradient(rgba(15, 15, 25, 0.85), rgba(15, 15, 25, 0.85)), 
                    linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #00ffff, #0000ff, #8b00ff, #ff0000);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.8), 0 0 50px rgba(0, 255, 255, 0.5);
  margin-bottom: 1.5rem;
  animation: rainbow-border-glow 1.5s linear infinite alternate, intense-bounce 0.6s ease-in-out infinite alternate;
}

.rainbow-intense-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #00ffff, #0000ff, #8b00ff, #ff007f, #ff0000);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-move 0.8s linear infinite, intense-shake 0.15s infinite alternate, neon-pulse 0.3s infinite alternate;
  display: inline-block;
}

.rainbow-icon-sparkle {
  font-size: 1.6rem;
  color: #ffff00;
  animation: spin-and-pulse 0.8s linear infinite, rainbow-filter 1.5s linear infinite;
}

@keyframes rainbow-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes intense-shake {
  0% { transform: scale(1) rotate(-3deg) translate(0, 0); }
  25% { transform: scale(1.1) rotate(3deg) translate(-3px, 2px); }
  50% { transform: scale(1.05) rotate(-4deg) translate(3px, -2px); }
  75% { transform: scale(1.12) rotate(2deg) translate(-2px, -3px); }
  100% { transform: scale(1.02) rotate(3deg) translate(2px, 3px); }
}

@keyframes neon-pulse {
  0% { filter: drop-shadow(0 0 15px #ff0055) drop-shadow(0 0 30px #00ffff); }
  100% { filter: drop-shadow(0 0 35px #ffff00) drop-shadow(0 0 60px #ff00ff); }
}

@keyframes rainbow-border-glow {
  0% { box-shadow: 0 0 25px #ff0000, 0 0 50px #ff00ff; }
  50% { box-shadow: 0 0 40px #00ff00, 0 0 70px #00ffff; }
  100% { box-shadow: 0 0 30px #ffff00, 0 0 60px #ff0000; }
}

@keyframes intense-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

@keyframes spin-and-pulse {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.4); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes rainbow-filter {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ==========================================================================
   Fireworks Canvas & Super 3D Gold Title (大川 耕太朗)
   ========================================================================== */
#fireworks-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.typing-container {
  justify-content: center;
}

.golden-title-wrapper {
  text-align: center;
  perspective: 1200px;
  margin: 1.5rem 0 2rem 0;
  width: 100%;
}

.golden-hero-title {
  font-family: var(--font-heading);
  font-size: 5.8rem;
  font-weight: 900;
  letter-spacing: 10px;
  text-align: center;
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 0%, #fff3a8 15%, #ffd700 35%, #ff9100 65%, #fff2a3 85%, #ffae00 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 超立体3Dゴールド押し出しシャドウ (3D Extrusion) */
  filter: 
    drop-shadow(1px 1px 0px #e6c200)
    drop-shadow(2px 2px 0px #cc9900)
    drop-shadow(3px 3px 0px #b38000)
    drop-shadow(4px 4px 0px #996600)
    drop-shadow(5px 5px 0px #805200)
    drop-shadow(6px 6px 0px #663d00)
    drop-shadow(7px 7px 0px #4d2e00)
    drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 35px rgba(255, 215, 0, 0.9));
  animation: gold-shimmer 2.5s linear infinite, gold-3d-spin 5s ease-in-out infinite;
  transform-style: preserve-3d;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}

@keyframes gold-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes gold-3d-spin {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  25% {
    transform: rotateY(90deg) scale(0.85);
  }
  50% {
    transform: rotateY(180deg) scale(1.12);
  }
  75% {
    transform: rotateY(270deg) scale(0.85);
  }
  100% {
    transform: rotateY(360deg) scale(1);
  }
}

@media (max-width: 992px) {
  .golden-hero-title {
    font-size: 4rem;
  }
}

@media (max-width: 576px) {
  .golden-hero-title {
    font-size: 2.7rem;
    letter-spacing: 3px;
  }
}

/* ==========================================================================
   Power Gauge & Generator Counter Styles
   ========================================================================== */
.power-gauge-container {
  width: 100%;
  max-width: 450px;
  height: 14px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 30px;
  overflow: hidden;
  margin: -0.8rem auto 1.5rem auto;
  border: 1.5px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.8);
  position: relative;
}

.power-gauge-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff0055, #ff7f00, #ffff00, #00ff88, #00ffff);
  background-size: 200% 100%;
  box-shadow: 0 0 20px #00ffff, 0 0 35px #ffff00;
  transition: width 0.05s ease-out;
  border-radius: 30px;
  animation: rainbow-move 1.5s linear infinite;
}

#generator-banner {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

#generator-banner:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.9), 0 0 70px rgba(255, 0, 128, 0.9);
}

#generator-banner:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Theme Selector UI (Dark, Pink, Camo)
   ========================================================================== */
.theme-selector-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--card-bg);
  border: var(--glass-border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(8px);
}

.theme-option-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  padding: 0.25rem 0.4rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-option-btn:hover {
  opacity: 1;
  transform: scale(1.25);
}

.theme-option-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  transform: scale(1.15);
}

/* Wikipedia Links (Hidden/Unnoticeable) */
.wiki-link {
  color: inherit;
  text-decoration: none;
  cursor: inherit;
}

.wiki-link:hover {
  opacity: 1;
  color: inherit;
  text-decoration: none;
}
