/* ===== CSS Custom Properties (Theming) ===== */
:root {
  /* Light Mode (default) */
  --bg-primary: #fafafa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f3f4f6;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.1);
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(250, 250, 250, 0.8);
  --badge-bg: #f3f4f6;
  --badge-text: #4b5563;
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  --glow-accent: rgba(99, 102, 241, 0.15);
  --grid-color: rgba(99, 102, 241, 0.07);
  --code-color: rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-surface: #141414;
  --bg-surface-hover: #1f1f1f;
  --text-primary: #f5f5f5;
  --text-secondary: #9ca3af;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: rgba(129, 140, 248, 0.1);
  --border: #262626;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(10, 10, 10, 0.8);
  --badge-bg: #1f1f1f;
  --badge-text: #d1d5db;
  --input-bg: #141414;
  --input-border: #333333;
  --gradient-hero: linear-gradient(135deg, rgba(129, 140, 248, 0.06) 0%, rgba(167, 139, 250, 0.06) 100%);
  --glow-accent: rgba(129, 140, 248, 0.15);
  --grid-color: rgba(129, 140, 248, 0.06);
  --code-color: rgba(129, 140, 248, 0.15);
}

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #ffffff;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Container ===== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav__logo-icon {
  width: 2.5rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--text-primary);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

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

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Mobile menu button */
.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav--hidden {
  transform: translateY(-100%);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  background:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    var(--gradient-hero);
  background-size: 60px 60px, 60px 60px, 100% 100%;
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 10s ease-in-out infinite alternate-reverse;
}

@keyframes hero-glow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  100% { transform: translate(-80px, 80px) scale(1.2); opacity: 0.3; }
}

/* Particle canvas */
.hero__particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.hero__tag svg {
  width: 1rem;
  height: 1rem;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero__title .accent {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero__title .accent {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Floating code snippets */
.hero__code-floats {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.code-float {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--code-color);
  white-space: nowrap;
  animation: float-drift 20s ease-in-out infinite;
  opacity: 0;
}

.code-float:nth-child(1) { top: 15%; right: 8%; animation-delay: 0s; animation-duration: 22s; }
.code-float:nth-child(2) { top: 35%; right: 5%; animation-delay: 3s; animation-duration: 18s; }
.code-float:nth-child(3) { top: 55%; right: 12%; animation-delay: 6s; animation-duration: 24s; }
.code-float:nth-child(4) { top: 75%; right: 3%; animation-delay: 9s; animation-duration: 20s; }
.code-float:nth-child(5) { top: 25%; right: 25%; animation-delay: 2s; animation-duration: 26s; }
.code-float:nth-child(6) { top: 65%; right: 20%; animation-delay: 5s; animation-duration: 21s; }

@keyframes float-drift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translateY(-30px) translateX(15px); opacity: 0.8; }
  90% { opacity: 1; }
  100% { transform: translateY(0) translateX(0); opacity: 0; }
}

/* Terminal decoration in hero */
.hero__terminal {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 3vw, 2rem);
  transform: translateY(-50%);
  width: min(340px, 30vw);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.hero__terminal:hover {
  opacity: 1;
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-hover);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ef4444; }
.terminal__dot--yellow { background: #f59e0b; }
.terminal__dot--green { background: #10b981; }

.terminal__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-left: auto;
  margin-right: auto;
}

.terminal__body {
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.terminal__line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
}

.terminal__prompt {
  color: var(--accent);
}

.terminal__cmd {
  color: var(--text-primary);
}

.terminal__output {
  color: #10b981;
}

.terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  animation: cursor-blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ===== Stats Section ===== */
.stats {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat__number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

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

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Ripple effect */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn--primary:active::after {
  width: 300px;
  height: 300px;
}

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

.btn--ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ===== Section Shared ===== */
.section {
  padding: 6rem 0;
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Code decorations ===== */
.code-deco {
  font-family: 'JetBrains Mono', monospace;
  color: var(--code-color);
  font-size: 0.75rem;
  pointer-events: none;
  user-select: none;
}

.section__tag::before {
  content: '// ';
  opacity: 0.5;
}

/* ===== Apps Grid ===== */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* App card with spotlight effect */
.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -100px);
  left: var(--mouse-x, -100px);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.app-card:hover::before {
  opacity: 1;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 30px var(--glow-accent);
  border-color: var(--accent);
}

.app-card > * {
  position: relative;
  z-index: 1;
}

.app-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.app-card__icon--blue {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.app-card__icon--emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.app-card__icon--amber {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.app-card__icon--rose {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
}

.app-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.app-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.app-card__platforms {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

.badge--live {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-weight: 600;
}

.badge--dev {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-weight: 600;
}

.app-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}

.app-card__link:hover {
  gap: 0.625rem;
}

.app-card__link--disabled {
  color: var(--text-secondary);
  cursor: default;
  font-style: italic;
  font-weight: 500;
}

.app-card__link--disabled:hover {
  gap: 0.375rem;
}

.app-card__link svg {
  width: 1rem;
  height: 1rem;
}

.app-card__coming-soon {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--gradient-hero);
  position: relative;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact__info {
  padding-top: 0.5rem;
}

.contact__info-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.contact__info-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.contact__detail-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact__detail-icon svg {
  width: 1rem;
  height: 1rem;
}

/* Mini terminal in contact */
.contact__terminal {
  margin-top: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.contact__terminal .terminal__prompt {
  color: var(--accent);
}

.contact__terminal .terminal__output {
  color: #10b981;
}

.contact__form-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  transition: border-color 0.3s ease;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.footer__brand {
  display: flex;
  flex-direction: column;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer__links-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
}

.footer__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__link--disabled {
  opacity: 0.5;
  cursor: default;
}

.footer__link--disabled:hover {
  color: var(--text-secondary);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.footer__legal {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.footer__legal a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer__socials {
  display: flex;
  gap: 0.75rem;
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer__social:hover {
  color: var(--accent);
}

.footer__social svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ===== App Detail Pages ===== */
.detail-hero {
  padding-top: 6rem;
  padding-bottom: 3rem;
  background:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    var(--gradient-hero);
  background-size: 60px 60px, 60px 60px, 100% 100%;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite alternate;
}

.detail-hero__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.detail-hero__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-hero__text h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.detail-hero__text .detail-hero__tagline {
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

.detail-hero__badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.detail-nav {
  position: sticky;
  top: 4rem;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.detail-nav__inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0;
}

.detail-nav__link {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.375rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.detail-nav__link:hover,
.detail-nav__link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.detail-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-of-type {
  border-bottom: none;
}

.detail-section--cta {
  background:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    var(--gradient-hero);
  background-size: 60px 60px, 60px 60px, 100% 100%;
  padding: 5rem 0;
}

.detail-section__cta {
  margin-top: 1.5rem;
}

.detail-section__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.detail-section__intro {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 2rem;
}

/* Feature cards for detail pages */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -100px);
  left: var(--mouse-x, -100px);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow-accent);
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-card--wide {
  grid-column: 1 / -1;
}

.feature-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.75rem;
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feature-card__desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.feature-card__list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.feature-card__list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.feature-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', monospace;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table td {
  color: var(--text-secondary);
}

.compare-table .highlight {
  color: var(--accent);
  font-weight: 600;
}

/* Tech stack pills */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-pill {
  padding: 0.375rem 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tech-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow-accent);
  transform: translateY(-1px);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--accent);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card--wide {
    grid-column: auto;
  }

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

  .compare-table {
    display: block;
    overflow-x: auto;
  }

  .detail-nav__inner {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* ===== Legal Pages ===== */
.legal {
  padding-top: 8rem;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.legal__header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  position: relative;
}

.legal__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a5b4fc);
  border-radius: 2px;
}

.legal__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.legal__updated {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-family: 'JetBrains Mono', monospace;
}

.legal__content {
  max-width: 48rem;
  margin: 0 auto;
}

.legal__content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal__content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.25rem;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.legal__content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
}

.legal__content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal__content ul,
.legal__content ol {
  margin-bottom: 1.25rem;
  padding-left: 0;
  list-style: none;
}

.legal__content li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.legal__content ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal__content ol {
  counter-reset: legal-counter;
}

.legal__content ol > li {
  counter-increment: legal-counter;
}

.legal__content ol > li::before {
  content: counter(legal-counter) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

.legal__content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.legal__content a:hover {
  border-bottom-color: var(--accent);
}

.legal__content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.legal__content th,
.legal__content td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.legal__content th {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal__content tr:last-child td {
  border-bottom: none;
}

.legal__content tr:hover td {
  background: var(--bg-surface-hover);
}

@media (max-width: 768px) {
  .legal__content table {
    display: block;
    overflow-x: auto;
  }
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for cards */
.app-card.fade-up:nth-child(1) { transition-delay: 0s; }
.app-card.fade-up:nth-child(2) { transition-delay: 0.1s; }
.app-card.fade-up:nth-child(3) { transition-delay: 0.2s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav__links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__menu-btn {
    display: flex;
  }

  .nav__menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero::before,
  .hero::after {
    width: 250px;
    height: 250px;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

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

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .apps__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact__terminal {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer__brand {
    align-items: center;
  }

  .footer__links-group {
    align-items: center;
  }

  .footer__bottom,
  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 1024px) {
  .hero__terminal {
    display: none;
  }

  .hero__code-floats {
    display: none;
  }

  .contact__terminal {
    display: none;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .apps__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) and (min-width: 1025px) {
  .hero__terminal {
    width: 300px;
  }
}
