/* ===== DESIGN TOKENS ===== */
:root {
  --background: 222 47% 4%;
  --foreground: 210 20% 98%;
  --muted: 222 30% 12%;
  --muted-foreground: 215 16% 65%;
  --border: 222 25% 16%;
  --border-light: rgba(255, 255, 255, 0.08);
  --primary: 187 85% 53%;
  --primary-foreground: 222 47% 6%;
  --accent-purple: 270 60% 45%;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --glow-cyan: 0 0 40px rgba(34, 211, 238, 0.25);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary)) rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.6);
  border-radius: 8px;
}

body {
  min-height: 100vh;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}

/* ===== AMBIENT BACKGROUND ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-bg__image {
  position: absolute;
  inset: 0;
  background-color: hsl(var(--background));
  background-image:
    linear-gradient(180deg, rgba(5, 5, 8, 0.55) 0%, rgba(5, 5, 8, 0.82) 55%, rgba(5, 5, 8, 0.94) 100%),
    url('/public/ai-generated/hero/hero-cinematic-bg.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(0.92) contrast(1.04);
}

.ambient-bg__fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(124, 58, 237, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(14, 165, 233, 0.06), transparent 45%);
}

.ambient-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
  animation: gridDrift 24s linear infinite;
}

.ambient-bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.65) 100%);
}

@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-48px, -48px); }
}

/* ===== HEADER / LANG ===== */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: var(--radius-md) 1.25rem;
  pointer-events: none;
}

.lang-switcher {
  display: flex;
  gap: 0;
  background: rgba(5, 8, 16, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2px;
  pointer-events: auto;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: hsl(var(--foreground));
}

.lang-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.lang-btn:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 4.5rem 1rem 2rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: 1rem;
}

/* ===== GLASS CARD ===== */
.card-glass {
  background: rgba(8, 12, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}

.card-glass:hover {
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: var(--shadow-lg), var(--glow-cyan);
}

/* ===== HERO ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.hero__avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.hero__glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45) 0%, rgba(124, 58, 237, 0.2) 40%, transparent 70%);
  filter: blur(18px);
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero__avatar {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(34, 211, 238, 0.2);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  max-width: 22ch;
}

.hero__subrole {
  margin-top: 0.65rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.02em;
}

/* ===== CURRENTLY BUILDING ===== */
.building {
  margin-bottom: 2.5rem;
}

.building__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.building-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

.building-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}

.building-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: hsl(var(--primary));
  font-size: 1.15rem;
  flex-shrink: 0;
}

.building-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.building-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: hsl(var(--foreground));
}

.building-card__desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

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

/* ===== ECOSYSTEM ===== */
.ecosystem {
  margin-bottom: 2.5rem;
}

.ecosystem__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.ecosystem-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.1rem 0.75rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

.ecosystem-card i {
  font-size: 1.5rem;
  color: hsl(var(--primary));
  transition: transform 0.25s ease, color 0.25s ease;
}

.ecosystem-card:hover i {
  transform: scale(1.08);
}

.ecosystem-card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}

.ecosystem-card--instagram:hover { border-color: rgba(225, 48, 108, 0.35); }
.ecosystem-card--instagram:hover i { color: #e1306c; }
.ecosystem-card--youtube:hover { border-color: rgba(255, 0, 0, 0.35); }
.ecosystem-card--youtube:hover i { color: #ff0000; }
.ecosystem-card--x:hover { border-color: rgba(255, 255, 255, 0.25); }
.ecosystem-card--x:hover i { color: #fff; }
.ecosystem-card--tiktok:hover { border-color: rgba(255, 0, 85, 0.35); }
.ecosystem-card--tiktok:hover i { color: #ff0055; }

/* ===== MORE LINKS ===== */
.more-links {
  margin-top: 1rem;
}

.more-links__summary {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.more-links__summary::-webkit-details-marker {
  display: none;
}

.more-links__summary::after {
  content: ' +';
  color: hsl(var(--primary));
}

.more-links[open] .more-links__summary::after {
  content: ' −';
}

.more-links__summary:hover {
  color: hsl(var(--foreground));
}

.more-links__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.more-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(8, 12, 22, 0.4);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.more-link:hover {
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(8, 12, 22, 0.65);
  transform: translateX(4px);
}

.more-link:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.more-link i {
  width: 1.25rem;
  text-align: center;
  color: hsl(var(--primary));
}

/* ===== LIFE LOG ===== */
.life-log {
  margin-bottom: 2.5rem;
  position: relative;
}

.life-log--has-bg::before {
  content: '';
  position: absolute;
  inset: -1rem -0.5rem;
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.life-log__list {
  list-style: none;
  padding: 0.5rem 0;
  overflow: hidden;
}

.life-log__item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.life-log__item:last-child {
  border-bottom: none;
}

.life-log__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: hsl(var(--primary));
  box-shadow: 0 0 10px hsl(var(--primary));
  animation: dotPulse 2s ease-in-out infinite;
}

.life-log__text {
  font-size: 0.9375rem;
  color: hsl(210 20% 88%);
  line-height: 1.45;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== QUOTE ===== */
.quote {
  margin-bottom: 2rem;
}

.quote__block {
  padding: 1.5rem 1.35rem;
  text-align: center;
}

.quote__block p {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.5;
  color: hsl(210 20% 90%);
}

.quote__block p::before {
  content: '"';
  color: hsl(var(--primary));
}

.quote__block p::after {
  content: '"';
  color: hsl(var(--primary));
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  position: relative;
  z-index: 1;
}

.site-footer p {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
}

/* ===== MOTION / REVEAL ===== */
.section-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ambient-bg__grid,
  .hero__glow,
  .life-log__dot {
    animation: none;
  }

  .section-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 481px) {
  .container {
    max-width: 560px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .building__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ecosystem__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .more-links__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) {
  .container {
    max-width: 720px;
    padding-top: 5rem;
  }

  .building__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ecosystem__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero__headline {
    max-width: none;
  }
}
