/* ========== Base ========== */
:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text-sub: rgba(255,255,255,0.5);
  --accent: #6366f1;
  --accent2: #a855f7;
  --accent3: #ec4899;
  --green: #22c55e;
  --amber: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: white; }

/* ========== 3D Canvas ========== */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========== Language Switcher ========== */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 4px;
  background: rgba(10,10,15,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
}

.lang-btn {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.lang-btn:hover:not(.active) { color: var(--text); }

/* ========== Nav ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(10,10,15,0.5);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 32px; }

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

/* ========== Sections ========== */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
}

.container { max-width: 1000px; margin: 0 auto; width: 100%; }

.section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.section-title-lg {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Hero ========== */
.hero {
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
}

.hero-content {
  max-width: 700px;
  animation: fadeUp 1s ease-out;
}

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

.hero-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title .line {
  display: block;
  font-weight: 300;
  font-size: 48px;
  letter-spacing: -0.02em;
  color: var(--text-sub);
}

.hero-title .gradient-text {
  font-size: 96px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-sub);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-btns { display: flex; gap: 16px; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.btn-lg { padding: 18px 40px; font-size: 16px; }

/* ========== Scroll Indicator ========== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========== About ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 2;
  margin-bottom: 40px;
}

.stats-row {
  display: flex;
  gap: 40px;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.1em;
}

.skills-col {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-sub);
  transition: all 0.2s;
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

/* ========== App Cards ========== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: block;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

.card-glow {
  position: absolute;
  top: -50%; right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s;
  opacity: 0;
}

.glow-green { background: radial-gradient(circle, rgba(34, 197, 94, 0.12), transparent 70%); }
.glow-pink { background: radial-gradient(circle, rgba(236, 72, 153, 0.12), transparent 70%); }
.glow-amber { background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%); }

.app-card:hover .card-glow { opacity: 1; }

.card-content { position: relative; z-index: 1; }

.card-emoji { font-size: 36px; display: block; margin-bottom: 16px; }

.card-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-content p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.card-tag.live { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.card-tag.dev { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

.card-arrow {
  font-size: 18px;
  color: var(--text-sub);
  transition: transform 0.2s, color 0.2s;
}

.app-card:hover .card-arrow {
  transform: translateX(4px);
  color: var(--text);
}

.app-card-coming {
  border-style: dashed;
  opacity: 0.5;
  cursor: default;
}

/* ========== Contact ========== */
.contact { text-align: center; }

.contact-inner { max-width: 600px; margin: 0 auto; }

.contact-desc {
  font-size: 18px;
  color: var(--text-sub);
  margin-bottom: 40px;
}

.contact-btns { display: flex; flex-direction: column; align-items: center; gap: 24px; }

.social-links { display: flex; gap: 20px; }

.social-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}

.social-link:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

/* ========== Footer ========== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 20px;
  font-size: 12px;
  color: var(--text-sub);
  border-top: 1px solid var(--border);
}

/* ========== Scroll Reveal ========== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav { padding: 12px 20px; }
  .nav-links { gap: 16px; }
  .nav-link { font-size: 12px; }
  .section { padding: 100px 20px 60px; }
  .hero-title .line { font-size: 28px; }
  .hero-title .gradient-text { font-size: 56px; }
  .hero-desc { font-size: 15px; }
  .hero-btns { flex-direction: column; }
  .section-title { font-size: 28px; }
  .section-title-lg { font-size: 36px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .apps-grid { grid-template-columns: 1fr; }
  .lang-switcher { top: 60px; right: 12px; }
}
