:root {
  --color-primary: #2b6cb0;
  --color-primary-dark: #1e4e80;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a202c;
  --color-text-muted: #4a5568;
  --color-border: #e2e8f0;
  --color-badge-bg: #edf2f7;
  --color-badge-text: #2d3748;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --radius: 8px;
}

[data-theme="dark"] {
  --color-bg: #14181f;
  --color-bg-alt: #1b212c;
  --color-text: #e6e9ef;
  --color-text-muted: #a0aec0;
  --color-border: #2d3748;
  --color-badge-bg: #232b38;
  --color-badge-text: #cbd5e0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--color-border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.topbar__controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.icon-btn,
.lang-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn {
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  line-height: 1;
}

.icon-btn:hover,
.lang-btn:hover {
  border-color: var(--color-primary);
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 3rem;
  background: var(--color-bg-alt);
  overflow: hidden;
  transition: background 0.3s ease;
}

[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 90% 70% at 20% 50%, rgba(55, 18, 100, 0.55) 0%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 80% 55%, rgba(10, 40, 100, 0.5) 0%, transparent 65%),
    linear-gradient(180deg, #05090f 0%, #090c18 55%, #060a12 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__stars canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

[data-theme="dark"] .hero__stars canvas {
  opacity: 1;
}

.hero__doge {
  position: absolute;
  bottom: -10px;
  right: 2rem;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0.22;
  z-index: 2;
  cursor: default;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.hero__doge:hover {
  opacity: 1;
  transform: scale(1.12) translateY(-6px);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.hero__pitch {
  max-width: 620px;
  margin: 0 auto 0.75rem;
  color: var(--color-text-muted);
}

.hero__location {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

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

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--small-primary {
  background: var(--color-primary);
  color: #fff;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section h2 {
  margin: 0 0 2rem;
  font-size: 1.75rem;
  text-align: center;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.card h3 {
  margin: 0 0 0.75rem;
  color: var(--color-primary);
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.badge {
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* Tech stack grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stack-group h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--color-text);
}

/* About */
#about p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--color-text-muted);
  text-align: center;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

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

.easter-egg {
  opacity: 0.35;
  cursor: default;
  transition: opacity 0.15s ease;
}

.easter-egg:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero__title {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
