/* ============================================================
   THEMES — light (default) & dark
   ============================================================ */
:root,
[data-theme="light"] {
  --bg: #f5f7ff;
  --bg-card: #ffffff;
  --bg-elevated: #eef1fd;
  --border: #dce3f5;
  --border-hover: #b4c0e8;
  --text: #1a1c3a;
  --text-secondary: #6070aa;
  --accent: #e94560;
  --accent-hover: #c73050;
  --accent-2: #7c3aed;
  --success: #16a34a;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --transition: 0.18s ease;
  --shadow: 0 4px 24px rgba(100, 120, 200, 0.1);
  --header-bg: rgba(245, 247, 255, 0.88);
  --hero-blob-1: rgba(37, 99, 235, 0.07);
  --hero-blob-2: rgba(124, 58, 237, 0.07);
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --label-color: #2563eb;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-card: #13131a;
  --bg-elevated: #1c1c26;
  --border: #2a2a3a;
  --border-hover: #44446a;
  --text: #eeeef5;
  --text-secondary: #7777aa;
  --accent: #e94560;
  --accent-hover: #c73050;
  --accent-2: #9b59b6;
  --success: #27ae60;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(10, 10, 15, 0.88);
  --hero-blob-1: rgba(233, 69, 96, 0.08);
  --hero-blob-2: rgba(155, 89, 182, 0.08);
  --gradient: linear-gradient(135deg, #e94560, #9b59b6);
  --label-color: #e94560;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

section, footer { scroll-margin-top: 72px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled {
  background: var(--header-bg);
  border-color: var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.header-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

/* ── Hamburger ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

@media (max-width: 639px) {
  .menu-toggle { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .header-nav.open { display: flex; }

  .header-nav a {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .header-nav a:last-child { border-bottom: none; }
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

[data-theme="light"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 0 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--hero-blob-1) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--hero-blob-2) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
  max-width: 640px;
}

.hero-mark {
  animation: float 4s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.hero-logo-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.35), 0 0 80px rgba(0, 200, 255, 0.12);
}

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

.hero-title {
  font-size: clamp(2.75rem, 9vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-kana {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.65;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--label-color);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.8125rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-top: 0.625rem;
}

.btn-cta:hover {
  filter: brightness(0.88);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}

.btn-cta:active { transform: translateY(0); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll-hint span {
  display: block;
  width: 1.5px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--border));
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 6rem 0; }

.section--alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header { margin-bottom: 2.75rem; }

.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--label-color);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.04), rgba(124, 58, 237, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-app-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.project-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
}

.project-status.live { color: var(--success); }
.project-status.dev { color: var(--text-secondary); }

.project-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.project-jp {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-top: -0.25rem;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.625rem;
  color: var(--text-secondary);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
  transition: gap var(--transition);
  align-self: flex-start;
}

.project-link:hover { gap: 0.625rem; }

.project-link--soon {
  color: var(--text-secondary);
  cursor: default;
  font-size: 0.875rem;
  font-weight: 400;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-lead {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 720px;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition);
}

.about-card:hover { border-color: var(--border-hover); }

.about-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.about-kana {
  font-size: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.about-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.about-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.about-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-card p em { font-style: italic; }
.about-card p strong { color: var(--text); font-weight: 600; }

.about-card--story {
  border-left: 3px solid var(--accent-2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cards { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 1.75rem; }
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 960px) {
  .hero::before { width: 900px; height: 900px; }
  .hero::after { width: 700px; height: 700px; }
}
