/* ===================================
   base.css - Base & Typography
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=JetBrains+Mono:wght@300;400&display=swap');

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9100;
  opacity: 0.5;
}

/* Ambient glow — 右上と左下に固定 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(0,102,255,0.07), transparent),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(96,176,255,0.05), transparent);
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body::after {
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(0,102,255,0.1), transparent),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(96,176,255,0.07), transparent);
}

/* Display font */
.font-display, h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Headings */
h1 { font-size: clamp(2.5rem, 6vw, var(--text-6xl)); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--text-4xl)); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2vw, var(--text-2xl)); font-weight: 600; }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

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

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* Page transition overlay */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--accent);
  z-index: 9999;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* Section base */
section {
  position: relative;
}

/* Accent gradient bg element */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: var(--z-below);
  opacity: 0.25;
}
.gradient-orb--accent {
  background: var(--accent);
}
.gradient-orb--light {
  background: #60B0FF;
}

[data-theme="dark"] .gradient-orb {
  opacity: 0.15;
}

.brand {
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.08em;
}
.brand .xi {
  color: #00BFFF;
}