:root {
  --bg-1: #08111f;
  --bg-2: #0f1f38;
  --text: #e8f4ff;
  --muted: #91a3c0;
  --accent: #63ffcc;
  --accent-2: #7a78ff;
  --card: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.15);
  font-family: "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 700px at 90% -120px, rgba(122, 120, 255, 0.35), transparent 60%),
    radial-gradient(1000px 500px at 0% 120%, rgba(99, 255, 204, 0.25), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 2px 2px;
  mix-blend-mode: soft-light;
  opacity: 0.25;
}

.site-header,
main,
footer {
  position: relative;
  z-index: 1;
  width: min(1060px, 92vw);
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  backdrop-filter: blur(4px);
}

.brand {
  font-family: "Space Grotesk", "Noto Sans JP", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
}

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

main {
  display: grid;
  gap: 1.2rem;
  padding-bottom: 2rem;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.hero {
  padding: 3.2rem 1.6rem;
  animation: rise 0.8s ease both;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

h1 {
  margin-top: 0.7rem;
  margin-bottom: 1rem;
  font-family: "Space Grotesk", "Noto Sans JP", sans-serif;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.15;
}

.hero-quick-links {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1rem 1.6rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.hero-icon-link:hover {
  border-color: var(--accent);
}

.hero-icon {
  display: inline-flex;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  overflow: hidden;
  position: relative;
}

.hero-icon.x {
  color: #fff;
  background: #000;
  --fallback-text: "x";
}

.hero-icon.image {
  color: #0a0a0a;
  background: #d9d9d9;
  --fallback-text: "👤";
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.hero-avatar.hidden {
  display: none;
}

.hero-icon::before {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  color: currentColor;
  font-size: 3.2rem;
  line-height: 1;
}

.hero-icon.avatar-broken::before {
  opacity: 1;
}

.sub {
  color: var(--muted);
  max-width: 58ch;
}

.cta-group {
  margin: 2rem 0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.2rem;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
}

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

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

.stat-grid {
  margin-top: 2.2rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stat-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
}

.value {
  font-size: 1.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.label {
  display: block;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.panel {
  padding: 1.5rem;
  animation: rise 0.8s ease both;
  animation-delay: 0.15s;
}

h2 {
  margin-top: 0;
  font-family: "Space Grotesk", "Noto Sans JP", sans-serif;
}

.grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.project-card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: rgba(99, 255, 204, 0.6);
  transform: translateY(-2px);
}

.repo-thumb {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 0.7rem;
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.meta {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.social-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.social-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-card:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 120, 255, 0.65);
}

.social-card h3 {
  margin: 0 0 0.4rem;
}

.social-card p {
  margin: 0;
  color: var(--muted);
}

.twitter-frame {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.35rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.twitter-timeline {
  min-height: 520px;
}

.tweet-fallback {
  margin-top: 1rem;
  display: none;
}

.tweet-fallback.visible {
  display: block;
}

.tweet-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  display: grid;
  gap: 0.6rem;
  overflow-wrap: anywhere;
}

.tweet-card h3,
.tweet-card p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tweet-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.tweet-card video,
.tweet-video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.tweet-card a {
  color: var(--text);
  text-decoration: none;
}

.tweet-card a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.tweet-meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.subtle-link {
  color: var(--text);
  text-decoration: none;
}

.subtle-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #052024;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.notice {
  color: var(--muted);
  font-size: 0.9rem;
}

.notice a {
  color: var(--accent);
  text-decoration: none;
}

.notice a:hover {
  text-decoration: underline;
}

footer {
  padding: 1rem 0 2rem;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
  }
}
