:root {
  --bg: #08080c;
  --bg-card: #111117;
  --border: #232330;
  --text: #e8e8f0;
  --text-dim: #8a8a9a;
  --accent: #7c5cff;
  --accent2: #33e0c9;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, rgba(124,92,255,0.35) 0%, rgba(51,224,201,0.12) 45%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

/* Nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px;
}

.nav-logo {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

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

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

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

/* Hero */
.hero-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 24px 120px;
  text-align: center;
}

.hero-eyebrow {
  color: var(--accent2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(90deg, var(--accent), #5a3fe0);
  color: #fff;
}

.btn-primary:hover { opacity: 0.9; }

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

.btn-ghost:hover { border-color: var(--accent); }

/* Sections */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.section-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent2);
  font-size: 0.95rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

/* Project card */
.project-card {
  display: grid;
  grid-template-columns: 1fr;
}

.project-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.project-info {
  padding: 28px;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.project-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  image-rendering: pixelated;
}

.project-header h3 {
  font-size: 1.3rem;
}

.project-desc {
  color: var(--text-dim);
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.project-links a {
  color: var(--accent2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.project-links a:hover { text-decoration: underline; }

.about-card {
  padding: 28px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* Latest section */
.latest-video {
  padding: 0;
  margin-bottom: 14px;
}

.latest-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.latest-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.medal-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.medal-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
}

.medal-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.medal-card-info {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.medal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent2);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.medal-card-info p {
  font-weight: 600;
  font-size: 1.05rem;
}

@media (max-width: 560px) {
  .medal-card {
    grid-template-columns: 1fr;
  }
}

/* Rank card */
.rank-card {
  margin-top: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.rank-badge {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #08080c;
}

.rank-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.rank-label {
  display: block;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent2);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.rank-tier {
  font-size: 1.15rem;
  font-weight: 700;
}

.rank-meta {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.rank-peak {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Links grid */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.link-card:hover {
  transform: translateY(-3px);
}

.link-youtube:hover { border-color: #ff0000; color: #ff4d4d; }
.link-x:hover { border-color: #fff; color: #fff; }
.link-twitch:hover { border-color: #9146ff; color: #b98bff; }
.link-medal:hover { border-color: var(--accent2); color: var(--accent2); }

/* Buddy card */
.buddy-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.buddy-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
}

.buddy-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #08080c;
}

.buddy-card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.buddy-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.buddy-card p span {
  color: var(--accent2);
  font-weight: 600;
}

/* Footer */
.footer {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer a {
  color: var(--text-dim);
  transition: color 0.2s ease;
}

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

.footer p {
  font-size: 0.85rem;
}
