:root {
  --page-gutter: clamp(1.25rem, 5vw, 5rem);
  --bg-color: #08080e;
  --bg-secondary: #0f0f18;
  --card-bg: #14141e;
  --text-color: #f0ece4;
  --text-muted: #a8a299;

  
  --accent-red: #b3122b;
  --accent-red-light: #e63946;
  --accent-crimson: #8b0000;

  
  --wisteria: #b9a3d9;
  --wisteria-light: #d9c9f0;
  --wisteria-deep: #7b5ea7;

  
  --breath-water: #4cc9f0;
  --breath-water-glow: rgba(76, 201, 240, 0.35);
  --breath-flame: #ff6d00;
  --breath-flame-glow: rgba(255, 109, 0, 0.35);
  --breath-thunder: #ffd60a;
  --breath-thunder-glow: rgba(255, 214, 10, 0.35);
  --breath-insect: #c77dff;
  --breath-insect-glow: rgba(199, 125, 255, 0.35);
  --breath-wind: #70e000;
  --breath-stone: #a68a64;

  
  --border-color: rgba(255, 255, 255, 0.06);
  --shadow-color: rgba(0, 0, 0, 0.6);
  --transition-fast: 0.25s ease;
  --transition-slow: 0.6s ease;
}


body.light-mode {
  --bg-color: #f5f0e8;
  --bg-secondary: #ece4d6;
  --card-bg: #ffffff;
  --text-color: #1a1814;
  --text-muted: #5a534a;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.12);

  
  --wisteria: #7b5ea7;
  --wisteria-light: #523b70;
  --wisteria-deep: #321e4b;

  --breath-water: #0077b6;
  --breath-flame: #d94e00;
  --breath-thunder: #b8860b;
  --breath-insect: #8a2be2;
  --breath-wind: #2d6a4f;
  --breath-stone: #6f583b;

  
  --accent-red-light: #b3122b;
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Noto Serif JP', serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.menu-open {
  overflow: hidden;
}

section,
.hero {
  scroll-margin-top: 100px;
}

:focus-visible {
  outline: 3px solid var(--accent-red-light);
  outline-offset: 4px;
}

button,
a,
input,
textarea {
  transition: outline var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
}

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

ul {
  list-style: none;
}

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

.accent {
  color: var(--accent-red-light);
}

.section {
  padding: clamp(4rem, 9vw, 6.25rem) var(--page-gutter) clamp(3.5rem, 7vw, 5rem);
  position: relative;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  padding-inline: 0.5rem;
}

.title-underline {
  display: block;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--wisteria));
  margin: 12px auto 0;
  border-radius: 3px;
}


.mist-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 15% 25%, rgba(185, 163, 217, 0.07) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 75%, rgba(179, 18, 43, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(76, 201, 240, 0.03) 0%, transparent 60%);
  animation: mistDrift 20s ease-in-out infinite alternate;
}

@keyframes mistDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(1%, -1%) scale(1.02); }
  100% { transform: translate(-1%, 1%) scale(1); }
}


.wisteria-petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 10px;
  height: 14px;
  background: radial-gradient(ellipse, var(--wisteria-light), var(--wisteria-deep));
  border-radius: 50% 50% 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
  filter: blur(0.5px);
}

.petal:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: 0s;   width: 8px;  height: 11px; }
.petal:nth-child(2)  { left: 15%; animation-duration: 14s; animation-delay: 2s;   width: 10px; height: 14px; }
.petal:nth-child(3)  { left: 25%; animation-duration: 11s; animation-delay: 4s;   width: 7px;  height: 10px; }
.petal:nth-child(4)  { left: 40%; animation-duration: 15s; animation-delay: 1s;   width: 9px;  height: 13px; }
.petal:nth-child(5)  { left: 55%; animation-duration: 13s; animation-delay: 3s;   width: 11px; height: 15px; }
.petal:nth-child(6)  { left: 65%; animation-duration: 10s; animation-delay: 5s;   width: 8px;  height: 12px; }
.petal:nth-child(7)  { left: 75%; animation-duration: 16s; animation-delay: 0.5s; width: 7px;  height: 10px; }
.petal:nth-child(8)  { left: 85%; animation-duration: 12s; animation-delay: 3.5s; width: 10px; height: 14px; }
.petal:nth-child(9)  { left: 92%; animation-duration: 14s; animation-delay: 6s;   width: 6px;  height: 9px;  }
.petal:nth-child(10) { left: 35%; animation-duration: 13s; animation-delay: 7s;   width: 9px;  height: 12px; }
.petal:nth-child(11) { left: 48%; animation-duration: 11s; animation-delay: 1.5s; width: 8px;  height: 11px; }
.petal:nth-child(12) { left: 10%; animation-duration: 15s; animation-delay: 4.5s; width: 7px;  height: 10px; }

@keyframes petalFall {
  0% {
    transform: translateY(-5vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(30px);
    opacity: 0.5;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-20px);
    opacity: 0;
  }
}


.floating-kanji {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-kanji span {
  position: absolute;
  font-family: 'Noto Serif JP', serif;
  font-size: 6rem;
  color: var(--accent-red);
  opacity: 0.03;
  animation: kanjiFloat 25s ease-in-out infinite;
  user-select: none;
}

body.light-mode .floating-kanji span {
  opacity: 0.04;
}

.floating-kanji span:nth-child(1) { top: 10%; left: 5%;  animation-delay: 0s;  font-size: 8rem; }
.floating-kanji span:nth-child(2) { top: 30%; right: 8%; animation-delay: 5s;  font-size: 5rem; }
.floating-kanji span:nth-child(3) { top: 60%; left: 10%; animation-delay: 10s; font-size: 7rem; }
.floating-kanji span:nth-child(4) { top: 80%; right: 5%; animation-delay: 15s; font-size: 6rem; }

@keyframes kanjiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-15px) rotate(2deg); }
  75%      { transform: translateY(15px) rotate(-2deg); }
}


.section-divider {
  width: 100%;
  height: 60px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-divider::before {
  content: '';
  position: absolute;
  width: 80%;
  max-width: 600px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-crimson) 15%,
    var(--accent-red-light) 30%,
    var(--accent-red) 50%,
    var(--accent-red-light) 70%,
    var(--accent-crimson) 85%,
    transparent 100%
  );
  opacity: 0.6;
}

.section-divider::after {
  content: '◆';
  position: relative;
  z-index: 1;
  color: var(--accent-red-light);
  font-size: 0.7rem;
  background: var(--bg-color);
  padding: 0 16px;
  letter-spacing: 8px;
}

body.light-mode .section-divider::after {
  background: var(--bg-color);
}


.section-divider.water::before {
  background: linear-gradient(90deg, transparent, var(--breath-water), transparent);
}
.section-divider.flame::before {
  background: linear-gradient(90deg, transparent, var(--breath-flame), transparent);
}
.section-divider.thunder::before {
  background: linear-gradient(90deg, transparent, var(--breath-thunder), transparent);
}
.section-divider.insect::before {
  background: linear-gradient(90deg, transparent, var(--breath-insect), transparent);
}


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 8, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-slow), box-shadow var(--transition-fast);
}

body.light-mode .navbar {
  background: rgba(245, 240, 232, 0.92);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--page-gutter);
}

.logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo-kanji {
  color: var(--accent-red-light);
  font-size: 1.6rem;
  text-shadow: 0 0 12px rgba(230, 57, 70, 0.5);
  animation: kanjiPulse 3s ease-in-out infinite;
}

@keyframes kanjiPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(230, 57, 70, 0.5); }
  50%      { text-shadow: 0 0 24px rgba(230, 57, 70, 0.8), 0 0 40px rgba(230, 57, 70, 0.3); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-backdrop {
  display: none;
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red-light), var(--wisteria));
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-red-light);
}

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

.nav-link.active {
  color: var(--accent-red-light);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.theme-toggle:hover {
  transform: rotate(20deg);
  background: var(--bg-secondary);
  box-shadow: 0 0 16px rgba(230, 57, 70, 0.25);
}


.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--text-color);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 7rem var(--page-gutter) 5.5rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(179, 18, 43, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(76, 201, 240, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 20%, var(--bg-secondary) 0%, var(--bg-color) 70%);
  overflow: hidden;
}


.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 50% 100%, transparent 38%, var(--accent-red) 39%, var(--accent-red) 40%, transparent 41%),
    radial-gradient(circle at 50% 0%, transparent 38%, var(--accent-red) 39%, var(--accent-red) 40%, transparent 41%);
  background-size: 60px 60px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 750px;
  width: min(100%, 750px);
}



.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: clamp(0.12rem, 0.7vw, 0.25rem);
  color: var(--wisteria-light);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 20px rgba(185, 163, 217, 0.3);
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent-red-light), var(--wisteria));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}


.btn {
  padding: 14px 30px;
  border-radius: 30px;
  font-family: 'Cinzel', serif;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-light));
  color: #fff;
  box-shadow: 0 6px 24px rgba(179, 18, 43, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(179, 18, 43, 0.6), 0 0 40px rgba(230, 57, 70, 0.2);
}

.btn-outline {
  border-color: var(--wisteria);
  color: var(--wisteria-light);
}

.btn-outline:hover {
  background: var(--wisteria);
  color: #111;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(185, 163, 217, 0.3);
}




.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: var(--wisteria-light);
  animation: bounce 2s infinite;
  z-index: 3;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 12px); }
}


.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 6vw, 3.125rem);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about-image-container {
  position: relative;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  height: auto;
  margin: 0 auto;
}

.wisteria-frame {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--wisteria),
    var(--accent-red),
    var(--wisteria-light),
    var(--accent-red-light),
    var(--wisteria)
  );
  animation: rotateFrame 12s linear infinite;
  box-shadow: 0 0 30px rgba(185, 163, 217, 0.2), 0 0 60px rgba(185, 163, 217, 0.1);
}

@keyframes rotateFrame {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-profile {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 4px solid var(--bg-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color var(--transition-slow);
}

body.light-mode .avatar-profile {
  border-color: var(--bg-color);
}

.avatar-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-facts {
  margin-top: 1.5rem;
}

.about-facts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  transition: padding-left var(--transition-fast);
}

.about-facts li:hover {
  padding-left: 8px;
}

.fact-label {
  color: var(--accent-red-light);
  font-weight: 600;
  margin-right: 6px;
}

.about-facts a {
  transition: color var(--transition-fast);
}

.about-facts a:hover {
  color: var(--wisteria-light);
  text-decoration: underline;
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 3vw, 1.875rem);
  max-width: 1100px;
  margin: 0 auto;
}

.projects-grid > a:focus-visible {
  outline: none;
}

.projects-grid > a:focus-visible .project-card {
  border-color: var(--breath-wind);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--breath-wind) 45%, transparent);
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 26px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  height: 100%;
}


.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 40px var(--shadow-color);
}

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


.project-card[data-breath="water"]:hover {
  border-color: var(--breath-water);
  box-shadow: 0 14px 40px var(--breath-water-glow), 0 0 60px var(--breath-water-glow);
}
.project-card[data-breath="water"]::before {
  background: radial-gradient(circle at 50% 120%, var(--breath-water-glow) 0%, transparent 70%);
}
.project-card[data-breath="water"] .project-icon {
  color: var(--breath-water);
}


.project-card[data-breath="flame"]:hover {
  border-color: var(--breath-flame);
  box-shadow: 0 14px 40px var(--breath-flame-glow), 0 0 60px var(--breath-flame-glow);
}
.project-card[data-breath="flame"]::before {
  background: radial-gradient(circle at 50% 120%, var(--breath-flame-glow) 0%, transparent 70%);
}
.project-card[data-breath="flame"] .project-icon {
  color: var(--breath-flame);
}


.project-card[data-breath="thunder"]:hover {
  border-color: var(--breath-thunder);
  box-shadow: 0 14px 40px var(--breath-thunder-glow), 0 0 60px var(--breath-thunder-glow);
}
.project-card[data-breath="thunder"]::before {
  background: radial-gradient(circle at 50% 120%, var(--breath-thunder-glow) 0%, transparent 70%);
}
.project-card[data-breath="thunder"] .project-icon {
  color: var(--breath-thunder);
}


.project-card[data-breath="insect"]:hover {
  border-color: var(--breath-insect);
  box-shadow: 0 14px 40px var(--breath-insect-glow), 0 0 60px var(--breath-insect-glow);
}
.project-card[data-breath="insect"]::before {
  background: radial-gradient(circle at 50% 120%, var(--breath-insect-glow) 0%, transparent 70%);
}
.project-card[data-breath="insect"] .project-icon {
  color: var(--breath-insect);
}


.project-card[data-breath="wind"]:hover {
  border-color: var(--breath-wind);
  box-shadow: 0 14px 40px rgba(112, 224, 0, 0.35), 0 0 60px rgba(112, 224, 0, 0.35);
}
.project-card[data-breath="wind"]::before {
  background: radial-gradient(circle at 50% 120%, rgba(112, 224, 0, 0.35) 0%, transparent 70%);
}
.project-card[data-breath="wind"] .project-icon {
  color: var(--breath-wind);
}


.project-card[data-breath="stone"]:hover {
  border-color: var(--breath-stone);
  box-shadow: 0 14px 40px rgba(166, 138, 100, 0.35), 0 0 60px rgba(166, 138, 100, 0.35);
}
.project-card[data-breath="stone"]::before {
  background: radial-gradient(circle at 50% 120%, rgba(166, 138, 100, 0.35) 0%, transparent 70%);
}
.project-card[data-breath="stone"] .project-icon {
  color: var(--breath-stone);
}

.project-icon {
  font-size: 2.2rem;
  color: var(--accent-red-light);
  margin-bottom: 14px;
  font-family: 'Noto Serif JP', serif;
  position: relative;
  z-index: 1;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(179, 18, 43, 0.15);
  color: var(--accent-red-light);
  border: 1px solid rgba(179, 18, 43, 0.1);
}


.skills-grid {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill-item {
  position: relative;
}

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

.skill-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 1.2s ease;
  position: relative;
}


.skill-fill {
  background: linear-gradient(90deg, var(--accent-red), var(--wisteria));
}


.skill-item[data-breath="water"] .skill-fill {
  background: linear-gradient(90deg, var(--breath-water-glow), var(--breath-water));
  box-shadow: 0 0 10px var(--breath-water-glow);
}
.skill-item[data-breath="flame"] .skill-fill {
  background: linear-gradient(90deg, var(--breath-flame-glow), var(--breath-flame));
  box-shadow: 0 0 10px var(--breath-flame-glow);
}
.skill-item[data-breath="thunder"] .skill-fill {
  background: linear-gradient(90deg, var(--breath-thunder-glow), var(--breath-thunder));
  box-shadow: 0 0 10px var(--breath-thunder-glow);
}
.skill-item[data-breath="insect"] .skill-fill {
  background: linear-gradient(90deg, var(--breath-insect-glow), var(--breath-insect));
  box-shadow: 0 0 10px var(--breath-insect-glow);
}
.skill-item[data-breath="wind"] .skill-fill {
  background: linear-gradient(90deg, rgba(112, 224, 0, 0.35), var(--breath-wind));
  box-shadow: 0 0 10px rgba(112, 224, 0, 0.35);
}
.skill-item[data-breath="stone"] .skill-fill {
  background: linear-gradient(90deg, rgba(166, 138, 100, 0.35), var(--breath-stone));
  box-shadow: 0 0 10px rgba(166, 138, 100, 0.35);
}


.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px var(--shadow-color);
  position: relative;
}


.contact-form::before,
.contact-form::after {
  content: '〘';
  position: absolute;
  font-size: 1.5rem;
  color: var(--accent-red);
  opacity: 0.25;
}

.contact-form::before {
  top: 12px;
  left: 16px;
}

.contact-form::after {
  content: '〙';
  bottom: 12px;
  right: 16px;
}

body.light-mode .contact-form {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-color);
  font-family: inherit;
  font-size: max(1rem, 16px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: var(--bg-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-red-light);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--accent-red-light);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

.error-message {
  color: var(--accent-red-light);
  font-size: 0.8rem;
  min-height: 16px;
}

.form-submit {
  align-self: center;
  min-width: 200px;
}

.form-success {
  text-align: center;
  color: #7ee787;
  font-weight: 600;
  min-height: 20px;
}

body.light-mode .form-success {
  color: #2e7d32;
}


.footer {
  background: var(--bg-secondary);
  padding: 50px 6% 40px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-red), var(--wisteria), var(--accent-red), transparent);
}

.footer-kanji {
  font-family: 'Noto Serif JP', serif;
  color: var(--accent-red-light);
  font-size: 2rem;
  margin-bottom: 8px;
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
}

.footer-tagline {
  color: var(--wisteria);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-socials {
  margin-top: 18px;
  display: flex;
  gap: 24px;
  justify-content: center;
}

.footer-socials a {
  color: var(--wisteria-light);
  font-size: 0.9rem;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
  position: relative;
}

.footer-socials a:hover {
  color: var(--accent-red-light);
  text-shadow: 0 0 12px rgba(230, 57, 70, 0.4);
}


.back-to-top {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  right: max(1.25rem, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-red-light));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  z-index: 90;
  box-shadow: 0 6px 20px rgba(179, 18, 43, 0.4);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.6), 0 0 40px rgba(230, 57, 70, 0.2);
}


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

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


.reveal.active {
  transition-delay: var(--reveal-delay, 0s);
}


@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-text {
    text-align: left;
  }

}


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

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100dvh;
    width: min(84vw, 340px);
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  padding: max(2rem, env(safe-area-inset-top)) 2rem 2rem;
    gap: 1.4rem;
    transition: right var(--transition-slow);
    box-shadow: -10px 0 40px var(--shadow-color);
    border-left: 1px solid var(--border-color);
    z-index: 106;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 105;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
  }

  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  .section {
    padding-inline: var(--page-gutter);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 22rem);
    margin-inline: auto;
  }

  .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }

  .floating-kanji span {
    font-size: 4rem;
  }

  .petal {
    width: 7px;
    height: 10px;
  }

}

@media (max-width: 480px) {
  .logo {
    font-size: clamp(0.92rem, 4vw, 1.1rem);
  }

  .logo-kanji {
    font-size: 1.35rem;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero-eyebrow {
    font-size: 0.72rem;
  }

  .about-facts li {
    overflow-wrap: anywhere;
  }

  .contact-form {
    padding: 24px 18px;
  }

  .contact-form::before,
  .contact-form::after {
    display: none;
  }
}

@media (hover: none) {
  .project-card:hover {
    transform: none;
  }

  .about-facts li:hover {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
