/* ----- Modern design variables ----- */
:root {
  --color-bg: #f6f7ff;
  --color-bg-alt: #eef2ff;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #5b6480;
  --color-accent: #6d28d9;
  --color-accent-light: #2563eb;
  --color-accent-hover: #4c1d95;
  --color-border: #dbe2ff;
  --color-border-light: #edf0ff;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 1px rgba(109, 40, 217, 0.14), 0 10px 30px rgba(37, 99, 235, 0.16);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --container: min(100% - 2rem, 1000px);
  --header-h: 72px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background:
    radial-gradient(circle at 10% -10%, rgba(109, 40, 217, 0.1), transparent 35%),
    radial-gradient(circle at 95% 5%, rgba(37, 99, 235, 0.12), transparent 36%),
    linear-gradient(180deg, #f8f9ff 0%, var(--color-bg) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.narrow {
  max-width: 680px;
}
.main { min-height: calc(100vh - var(--header-h) - 140px); }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(109, 40, 217, 0.12);
  box-shadow: var(--shadow-xs);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: color var(--transition);
}
.nav-brand:hover { color: var(--color-accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--color-accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--color-bg-alt); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ----- Hero ----- */
.hero {
  padding: 4rem 0 5rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(109, 40, 217, 0.12), transparent 36%),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.2) 0%, var(--color-bg) 100%);
}
.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr auto; gap: 3rem; }
  .hero { padding: 5rem 0 6rem; }
}
.hero-label {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
}
.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.hero-name {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 44ch;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(109, 40, 217, 0.14);
  transition: box-shadow var(--transition), transform var(--transition);
}
.hero-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.hero-card-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.hero-card span {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  text-align: center;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 60%, #0891b2 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #5b21b6 0%, #1d4ed8 55%, #0e7490 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.btn-play {
  background: var(--color-text);
  color: #fff;
  margin-top: 0.875rem;
  box-shadow: var(--shadow-sm);
}
.btn-play:hover {
  background: #334155;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-play svg { flex-shrink: 0; }

/* ----- Sections ----- */
.section {
  padding: 4rem 0;
}
.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.section-desc {
  margin: 0 0 2rem;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* ----- About ----- */
.about-section {
  padding: 4rem 0;
}
.about-content {
  max-width: 56ch;
}
.about-text {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}
.about-text:last-child { margin-bottom: 0; }
.about-text strong { color: var(--color-text); font-weight: 600; }

/* ----- Focus / What I do ----- */
.focus-section {
  background:
    linear-gradient(180deg, rgba(109, 40, 217, 0.05) 0%, rgba(37, 99, 235, 0.04) 100%),
    var(--color-bg-alt);
  padding: 4.5rem 0;
}
.focus-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .focus-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 900px) {
  .focus-grid { grid-template-columns: repeat(4, 1fr); }
}
.focus-card {
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(109, 40, 217, 0.12);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.focus-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
  transform: translateY(-2px);
}
.focus-icon {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.focus-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.focus-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ----- Skills ----- */
.skills-section {
  padding: 4rem 0;
}
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.skill-tag:hover {
  color: var(--color-accent);
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.04);
}

/* ----- App cards ----- */
.apps-section {
  background:
    radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.12), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.12), transparent 30%),
    var(--color-bg-alt);
  padding: 4.5rem 0;
  border-radius: 0;
}
.app-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; }
}
.app-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(37, 99, 235, 0.12);
  transition: all var(--transition);
}
.app-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  transform: translateY(-3px);
}
.app-card-icon-wrap {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.app-card-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-card-icon-fallback {
  font-size: 2.5rem;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}
.app-card-body { min-width: 0; }
.app-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.app-card-desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ----- Contact ----- */
.contact-section {
  padding: 4.5rem 0;
}
.contact-card {
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(109, 40, 217, 0.1);
  transition: box-shadow var(--transition);
}
.contact-card:hover {
  box-shadow: var(--shadow-md);
}
.contact-text {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}
.contact-text a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.contact-text a:hover { color: var(--color-accent-hover); text-decoration: underline; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}
.contact-link:hover {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

/* ----- Page (privacy, 404) ----- */
.page-section { padding: 3rem 0 5rem; }
.page-title {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.page-meta {
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.page-desc {
  margin: 0 0 1.75rem;
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}
.text-center { text-align: center; }
.prose h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.prose p { margin: 0 0 1.125rem; font-size: 1rem; line-height: 1.7; color: var(--color-text-muted); }
.prose p:first-of-type { color: var(--color-text); }
.prose a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.prose a:hover { color: var(--color-accent-hover); text-decoration: underline; }
.prose .btn { margin-top: 0.75rem; }

/* ----- Footer ----- */
.site-footer {
  padding: 1.75rem 0;
  margin-top: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f4f6ff 100%);
  border-top: 1px solid rgba(109, 40, 217, 0.12);
}
.footer-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ----- Mobile nav ----- */
@media (max-width: 639px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--color-border-light);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-links li {
    border-bottom: 1px solid var(--color-border-light);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
  }
  .app-card {
    flex-direction: column;
    text-align: center;
  }
  .app-card-icon-wrap {
    margin-inline: auto;
  }
  .btn-play { margin-inline: auto; }
  .section { padding: 3rem 0; }
  .about-section, .focus-section, .skills-section,
  .apps-section, .contact-section { padding: 3rem 0; }
}
