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

/* ——— Dark theme (default) ——— */

:root {
  --bg: #050508;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-border: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --text: #f0f0f3;
  --text-secondary: #a0a0b0;
  --text-dim: #55556a;
  --accent: #7c6aef;
  --accent-light: #a594fd;
  --accent-hover: #c4b5fd;
  --glow: rgba(124, 106, 239, 0.08);
  --glow-strong: rgba(124, 106, 239, 0.15);
  --card-shadow: none;
  --max-width: 600px;
}

/* ——— Light theme ——— */

[data-theme="light"] {
  --bg: #f8f8fc;
  --surface: #ffffff;
  --surface-border: rgba(0, 0, 0, 0.08);
  --surface-hover: #f3f2ff;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-dim: #a1a1aa;
  --accent: #6d5cdb;
  --accent-light: #7c6aef;
  --accent-hover: #5b48c8;
  --glow: rgba(109, 92, 219, 0.06);
  --glow-strong: rgba(109, 92, 219, 0.12);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .site-logo span {
  -webkit-text-fill-color: var(--accent);
}

[data-theme="light"] .hero h1 .highlight {
  -webkit-text-fill-color: var(--accent);
}

[data-theme="light"] .app-card:hover {
  border-color: rgba(0, 0, 0, 0.12);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s, color 0.3s;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ——— Header ——— */

.site-header {
  width: 100%;
  padding: 32px 24px 0;
  text-align: center;
  position: relative;
}

.site-logo {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text) !important;
  letter-spacing: -0.03em;
}

.site-logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.site-nav a {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.site-nav a:hover {
  color: var(--text-secondary);
  background: var(--surface);
  text-decoration: none;
}

.site-nav-current {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  opacity: 0.4;
  cursor: default;
  letter-spacing: 0.01em;
}

/* ——— Theme toggle ——— */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

/* ——— Hero ——— */

.hero {
  text-align: center;
  padding: 48px 24px 24px;
  width: 100%;
  max-width: var(--max-width);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 20%, var(--accent-light) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ——— Divider ——— */

.divider {
  width: 40px;
  height: 1px;
  background: var(--surface-border);
  margin: 0 auto;
}

/* ——— Apps ——— */

.apps-section {
  padding: 24px 24px 48px;
  width: 100%;
  max-width: var(--max-width);
}

.section-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-card {
  position: relative;
  padding: 22px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0.7;
}

.app-card:nth-child(1)::before {
  background: linear-gradient(90deg, #7c6aef, transparent 80%);
}
.app-card:nth-child(2)::before {
  background: linear-gradient(90deg, #34d399, transparent 80%);
}
.app-card:nth-child(3)::before {
  background: linear-gradient(90deg, #fbbf24, transparent 80%);
}
.app-card:nth-child(4)::before {
  background: linear-gradient(90deg, #f472b6, transparent 80%);
}

.app-card:hover {
  background: var(--surface-hover);
}

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

.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.app-card:nth-child(1) .app-icon {
  background: rgba(124, 106, 239, 0.12);
}
.app-card:nth-child(2) .app-icon {
  background: rgba(52, 211, 153, 0.1);
}
.app-card:nth-child(3) .app-icon {
  background: rgba(251, 191, 36, 0.1);
}
.app-card:nth-child(4) .app-icon {
  background: rgba(244, 114, 182, 0.1);
}

.app-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  flex: 1;
}

.badge {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--surface-border);
  white-space: nowrap;
}

.app-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 54px;
}

/* ——— Footer ——— */

.site-footer {
  margin-top: auto;
  width: 100%;
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--surface-border);
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer .copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ——— Content pages ——— */

.page-content {
  padding: 48px 24px 56px;
  flex: 1;
  width: 100%;
  max-width: 660px;
}

.page-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  text-align: center;
}

.page-content .page-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
  text-align: center;
}

.page-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.page-content p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.9rem;
}

.page-content ul {
  margin-bottom: 14px;
  padding-left: 0;
  list-style: none;
}

.page-content li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  padding-left: 18px;
  line-height: 1.65;
}

.page-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.page-content strong {
  color: var(--text);
  font-weight: 600;
}

.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(124, 106, 239, 0.3);
}

.page-content a:hover {
  text-decoration-color: var(--accent);
}

/* ——— Contact form ——— */

.contact-form {
  max-width: 440px;
  margin: 12px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-dim);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.form-submit {
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: var(--accent-hover);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.4em;
}

.form-status.success {
  color: #34d399;
}

.form-status.error {
  color: #f87171;
}

/* ——— Easter egg ——— */

.logo-clicks {
  transition: transform 0.3s;
}

.logo-clicks.spin {
  animation: logoSpin 0.6s ease-in-out;
}

@keyframes logoSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.easter-egg-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  white-space: nowrap;
  z-index: 999;
}

.easter-egg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ——— Responsive ——— */

@media (max-width: 540px) {
  .hero {
    padding: 36px 24px 24px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero .tagline {
    font-size: 0.95rem;
  }

  .app-card {
    padding: 16px 16px;
  }

  .app-desc {
    padding-left: 0;
  }

  .app-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .page-content h1 {
    font-size: 1.6rem;
  }

  .site-header {
    padding-top: 24px;
  }
}
