﻿:root {
  --bg: #0b0d12;
  --bg-alt: #111622;
  --ink: #f4f6fb;
  --accent: #4ed4ff;
  --accent-2: #8a5bff;
  --muted: #a1a8b8;
  --card: #141b2b;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  --radius-lg: 26px;
  --toggle-bg: rgba(255, 255, 255, 0.08);
  --toggle-border: rgba(255, 255, 255, 0.2);
  --toggle-icon: #f4f6fb;
  --ambient-x: 50%;
  --ambient-y: 20%;
  --ambient-color: rgba(78, 212, 255, 0.35);
  --ambient-translate: 0px;
}

body[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-alt: #f0ece6;
  --ink: #141414;
  --accent: #00b3ff;
  --accent-2: #5b7bff;
  --muted: #4f545f;
  --card: #ffffff;
  --shadow: 0 30px 70px rgba(15, 15, 15, 0.18);
  --toggle-bg: rgba(20, 20, 20, 0.05);
  --toggle-border: rgba(20, 20, 20, 0.2);
  --toggle-icon: #141414;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  background-image: radial-gradient(circle at 10% 10%, rgba(78, 212, 255, 0.12), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(138, 91, 255, 0.12), transparent 45%),
    radial-gradient(circle at 30% 80%, rgba(78, 212, 255, 0.08), transparent 40%);
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
}

body.page-enter {
  animation: pageFadeIn 0.8s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  body.page-enter {
    animation: none;
  }
}

h1, h2, h3 {
  font-family: "IBM Plex Serif", serif;
  letter-spacing: -0.5px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 18, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-theme="light"] .site-header {
  background: rgba(245, 243, 238, 0.8);
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

.ambient {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  transform: translateY(var(--ambient-translate));
  transition: opacity 0.6s ease, transform 0.6s ease;
  background:
    radial-gradient(circle at var(--ambient-x) var(--ambient-y), var(--ambient-color), transparent 55%),
    radial-gradient(circle at 80% 15%, rgba(138, 91, 255, 0.2), transparent 45%),
    radial-gradient(circle at 20% 85%, rgba(78, 212, 255, 0.15), transparent 50%);
}

body.ambient-active .ambient {
  opacity: 0.85;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
}

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--ink);
}

body[data-theme="light"] .navbar-toggler {
  border: 1px solid rgba(20, 20, 20, 0.2);
}

.navbar-toggler-icon {
  width: 1.4rem;
  height: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(244,246,251,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

body[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(20,20,20,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
}

.navbar,
.navbar a {
  color: var(--ink);
}

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
}

.btn-hero {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0b0d12;
  border: none;
  box-shadow: 0 14px 40px rgba(78, 212, 255, 0.35);
}

.btn-hero:hover {
  background: linear-gradient(120deg, #6ae0ff, #a77bff);
  color: #0b0d12;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
  background: transparent;
}

.hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.page-hero {
  padding: 6rem 0 4rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.hero-stats h3 {
  margin: 0;
  font-size: 2rem;
}

.hero-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.hero-card__top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.pill-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.link-arrow {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.link-arrow::after {
  content: "→";
}

.section {
  padding: 5rem 0;
}

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

.section-title {
  margin-bottom: 2.5rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.process-step {
  background: var(--card);
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.process-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.step-count {
  display: inline-flex;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.stat-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(78, 212, 255, 0.4);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.stat-card h3 {
  margin-bottom: 0.5rem;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(78, 212, 255, 0.12), rgba(138, 91, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}

.dashboard-hero__copy {
  max-width: 520px;
}

.dashboard-hero__controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  min-width: min(360px, 100%);
}

.dashboard-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 17, 23, 0.4);
  color: var(--muted);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.filter-btn:hover {
  color: var(--ink);
  border-color: rgba(78, 212, 255, 0.5);
  transform: translateY(-1px);
}

.filter-btn.is-active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0b0d12;
  border-color: transparent;
}

.dashboard-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(20, 20, 20, 0.2);
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.dashboard-kpi {
  background: var(--card);
  padding: 1.6rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.dashboard-kpi p {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.dashboard-kpi h3 {
  margin: 0;
  font-size: 1.8rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.dashboard-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.dashboard-card h2 {
  margin-bottom: 1.2rem;
}

.dashboard-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.metric-list {
  display: grid;
  gap: 0.9rem;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem 1rem;
}

.metric-label {
  font-weight: 600;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.metric-value {
  font-weight: 600;
  color: var(--accent);
}

.metric-bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.dashboard-table thead th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-color: rgba(255, 255, 255, 0.08);
}

.dashboard-table tbody td {
  border-color: rgba(255, 255, 255, 0.08);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.faq-item {
  background: var(--card);
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.faq-item:hover {
  transform: translateY(-6px);
  border-color: rgba(78, 212, 255, 0.4);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.project-card,
.skill-card,
.quote-card,
.highlight {
  background: var(--card);
  padding: 2rem;
  border-radius: 22px;
  box-shadow: var(--shadow);
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tilt.is-tilting::after {
  opacity: 1;
}

.project-card:hover,
.skill-card:hover,
.quote-card:hover,
.highlight:hover {
  transform: translateY(-6px);
  border-color: rgba(78, 212, 255, 0.4);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.project-card__badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card ul {
  padding-left: 0;
  margin: 1rem 0;
  list-style: none;
  color: var(--muted);
}

.about-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-card h3 {
  margin-bottom: 0.5rem;
}

.quote-card {
  border-left: 4px solid var(--accent);
}

.contact-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 2rem;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.form-control {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer .socials {
  display: flex;
  gap: 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
}

.cta-banner {
  background: var(--bg-alt);
}

.cta-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

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

.hero-blob {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(78, 212, 255, 0.35), transparent 70%);
  opacity: 0.7;
  filter: blur(20px);
  z-index: -1;
}

.blob-1 {
  top: -80px;
  right: -60px;
}

.blob-2 {
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(138, 91, 255, 0.35), transparent 70%);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s ease, opacity 0.8s ease;
  will-change: transform, opacity;
}

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

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }

.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

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

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--toggle-icon);
  box-shadow: inset -6px -6px 0 0 var(--toggle-bg);
}

body[data-theme="light"] .theme-toggle__icon {
  background: var(--toggle-icon);
  box-shadow: 0 0 0 0 var(--toggle-bg);
}

@media (max-width: 991px) {
  .hero {
    padding-top: 5.5rem;
  }

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

  .dashboard-hero__controls {
    align-items: flex-start;
    width: 100%;
  }

  .dashboard-filters {
    justify-content: flex-start;
  }

  .dashboard-meta {
    justify-content: flex-start;
  }

  .contact-card {
    padding: 2rem;
  }

  .cta-card {
    padding: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1, h2 {
    letter-spacing: -0.3px;
  }

  .display-4 {
    font-size: 2.2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .section {
    padding: 4rem 0;
  }

  .hero-card,
  .about-card,
  .contact-card {
    padding: 1.8rem;
  }

  .project-card,
  .skill-card,
  .quote-card,
  .highlight,
  .process-step,
  .stat-card,
  .faq-item {
    padding: 1.6rem;
  }
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 20, 0.7);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body[data-theme="light"] .back-to-top {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(20, 20, 20, 0.2);
}

@media (max-width: 576px) {
  .display-4 {
    font-size: 1.9rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.6rem 1.2rem;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
