:root {
  --ai-bg: #050816;
  --ai-bg-deep: #03050d;
  --ai-surface: rgba(12, 19, 38, 0.82);
  --ai-surface-solid: #0c1326;
  --ai-surface-raised: #111a31;
  --ai-border: rgba(148, 163, 184, 0.16);
  --ai-border-strong: rgba(94, 234, 212, 0.34);
  --ai-text: #edf4ff;
  --ai-muted: #98a9c3;
  --ai-cyan: #5eead4;
  --ai-blue: #60a5fa;
  --ai-violet: #a78bfa;
  --ai-pink: #f472b6;
  --ai-success: #34d399;
  --ai-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --ai-radius: 22px;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 84px;
  background: var(--ai-bg-deep);
}

body.dark-ai-theme {
  min-width: 320px;
  overflow-x: hidden;
  margin: 0;
  color: var(--ai-muted);
  background:
    radial-gradient(circle at 12% 8%, rgba(96, 165, 250, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 28%, rgba(167, 139, 250, 0.1), transparent 30rem),
    linear-gradient(180deg, var(--ai-bg-deep) 0%, var(--ai-bg) 38%, #070b18 100%);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
}

body.dark-ai-theme::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

::selection {
  color: #041018;
  background: var(--ai-cyan);
}

body.dark-ai-theme h1,
body.dark-ai-theme h2,
body.dark-ai-theme h3,
body.dark-ai-theme h4,
body.dark-ai-theme h5,
body.dark-ai-theme h6,
body.dark-ai-theme .navbar-brand {
  color: var(--ai-text);
  font-family: "Space Grotesk", sans-serif;
}

body.dark-ai-theme p,
body.dark-ai-theme li {
  color: var(--ai-muted);
}

body.dark-ai-theme strong {
  color: #dce9fb;
}

body.dark-ai-theme a {
  color: var(--ai-cyan);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body.dark-ai-theme a:hover,
body.dark-ai-theme a:focus {
  color: #a7fff1;
  text-decoration: none;
}

body.dark-ai-theme .text-primary {
  color: var(--ai-cyan) !important;
}

body.dark-ai-theme .text-secondary {
  color: var(--ai-muted) !important;
}

body.dark-ai-theme .container {
  max-width: 1180px;
}

/* Navigation */
.dark-ai-theme .navbar {
  min-height: 76px;
  border-bottom: 1px solid transparent;
  background: rgba(5, 8, 22, 0.58);
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: min-height 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.dark-ai-theme .navbar.navbar-scrolled {
  min-height: 68px;
  border-color: var(--ai-border);
  background: rgba(5, 8, 22, 0.9);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

.dark-ai-theme .navbar-brand .brand-name {
  color: var(--ai-text);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.dark-ai-theme .navbar-brand .brand-accent {
  color: var(--ai-cyan);
}

.dark-ai-theme .navbar-nav .nav-link {
  position: relative;
  padding: 1.45rem 0.85rem;
  color: #b5c2d7;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark-ai-theme .navbar-nav .nav-link::after {
  position: absolute;
  right: 0.85rem;
  bottom: 1.05rem;
  left: 0.85rem;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--ai-cyan), var(--ai-violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.dark-ai-theme .navbar-nav .nav-link:hover,
.dark-ai-theme .navbar-nav .nav-link.active {
  color: var(--ai-text);
}

.dark-ai-theme .navbar-nav .nav-link:hover::after,
.dark-ai-theme .navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.dark-ai-theme .navbar-toggler {
  border-color: var(--ai-border-strong);
  border-radius: 10px;
}

.dark-ai-theme .navbar-toggler-icon {
  opacity: 0.9;
  filter: none;
}

.dark-ai-theme .navbar-toggler:hover,
.dark-ai-theme .navbar-toggler:focus {
  border-color: rgba(94, 234, 212, 0.75);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.2), rgba(96, 165, 250, 0.14));
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.14);
}

/* Buttons */
.dark-ai-theme .btn {
  min-height: 44px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dark-ai-theme .btn-outline-primary,
.dark-ai-theme .btn-outline-light {
  border-color: rgba(94, 234, 212, 0.7);
  color: var(--ai-text);
  background: rgba(94, 234, 212, 0.06);
}

.dark-ai-theme .btn-outline-primary:hover,
.dark-ai-theme .btn-outline-primary:focus,
.dark-ai-theme .btn-outline-light:hover,
.dark-ai-theme .btn-outline-light:focus,
.dark-ai-theme .btn-dark:hover,
.dark-ai-theme .btn-dark:focus {
  border-color: rgba(94, 234, 212, 0.86);
  color: #ffffff;
  background: linear-gradient(115deg, rgba(94, 234, 212, 0.24), rgba(96, 165, 250, 0.17), rgba(167, 139, 250, 0.17));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.18), 0 0 18px rgba(94, 234, 212, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.dark-ai-theme .btn-outline-primary:active,
.dark-ai-theme .btn-outline-light:active {
  background: rgba(94, 234, 212, 0.16) !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.08) !important;
  transform: translateY(0);
}

.dark-ai-theme .navbar .btn-outline-primary {
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
}

.dark-ai-theme .about-hire-action .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dark-ai-theme .button-label {
  display: block;
  line-height: 1;
  transform: translateY(1px);
}

/* Hero */
.dark-ai-theme #home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh !important;
  margin-bottom: 0 !important;
  background:
    radial-gradient(circle at 78% 28%, rgba(94, 234, 212, 0.12), transparent 16rem),
    radial-gradient(circle at 70% 62%, rgba(167, 139, 250, 0.15), transparent 24rem),
    linear-gradient(135deg, #03050d 8%, #071124 56%, #09071a 100%) !important;
}

.dark-ai-theme #home::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.58;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 72% 46%, black, transparent 64%);
}

.dark-ai-theme #home::after {
  position: absolute;
  z-index: -1;
  top: 20%;
  right: 8%;
  width: min(36vw, 480px);
  aspect-ratio: 1;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 70px rgba(96, 165, 250, 0.035),
    0 0 0 140px rgba(167, 139, 250, 0.025),
    inset 0 0 90px rgba(94, 234, 212, 0.08);
}

.dark-ai-theme #home .hero-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.dark-ai-theme #home .hero-visual::after {
  display: none;
  content: "";
}

.dark-ai-theme #home .hero-wave-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.74;
  pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 58%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 45%, #000 58%, #000 93%, transparent 100%);
}

.dark-ai-theme #home .container {
  position: relative;
  z-index: 1;
}

.dark-ai-theme #home .col-lg-7 {
  max-width: 850px;
  flex: 0 0 75%;
}

.dark-ai-theme #home h3 {
  color: var(--ai-cyan) !important;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600 !important;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.dark-ai-theme #home .display-3 {
  margin-bottom: 0.65rem !important;
  color: transparent !important;
  background: linear-gradient(105deg, #f8fbff 10%, #8dddf2 48%, #b59aff 86%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(3.5rem, 8.5vw, 7.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-transform: none !important;
  -webkit-text-stroke: 0 !important;
}

.dark-ai-theme #home .typed-text-output {
  margin: 0;
  min-height: 1.7em;
  color: #c7d4e8 !important;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-weight: 500 !important;
  line-height: 1.35;
}

.dark-ai-theme #home .typed-cursor {
  color: var(--ai-cyan);
}

.dark-ai-theme #home .btn {
  min-width: 170px;
  padding: 0.78rem 1.5rem;
}

.dark-ai-theme .scroll-to-bottom {
  bottom: 24px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border: 1px solid var(--ai-border-strong);
  border-radius: 50%;
  color: var(--ai-cyan);
  background: rgba(12, 19, 38, 0.7);
  backdrop-filter: blur(10px);
  animation: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dark-ai-theme .scroll-to-bottom i,
.dark-ai-theme .back-to-top i {
  color: var(--ai-cyan);
  line-height: 1;
}

.dark-ai-theme .scroll-to-bottom:hover,
.dark-ai-theme .scroll-to-bottom:focus,
.dark-ai-theme .back-to-top:hover,
.dark-ai-theme .back-to-top:focus {
  border-color: rgba(94, 234, 212, 0.86);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.28), rgba(96, 165, 250, 0.2), rgba(167, 139, 250, 0.2));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.2), 0 0 18px rgba(94, 234, 212, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.dark-ai-theme .scroll-to-bottom:hover i,
.dark-ai-theme .scroll-to-bottom:focus i,
.dark-ai-theme .back-to-top:hover i,
.dark-ai-theme .back-to-top:focus i {
  color: #ffffff;
}

/* Sections and headings */
.dark-ai-theme #about,
.dark-ai-theme #experience,
.dark-ai-theme #education,
.dark-ai-theme #skill,
.dark-ai-theme #portfolio,
.dark-ai-theme #blog,
.dark-ai-theme #interests,
.dark-ai-theme #contact,
.dark-ai-theme .project-demo {
  position: relative;
  padding-top: 7rem !important;
  padding-bottom: 7rem !important;
}

.dark-ai-theme #education,
.dark-ai-theme #portfolio,
.dark-ai-theme #interests {
  background: linear-gradient(180deg, rgba(17, 26, 49, 0.24), rgba(5, 8, 22, 0.1));
}

.dark-ai-theme .section-title-background {
  color: transparent !important;
  opacity: 0.55;
  font-size: clamp(4rem, 11vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  -webkit-text-stroke: 1px rgba(96, 165, 250, 0.17) !important;
}

.dark-ai-theme .section-title-background + h2 {
  color: var(--ai-text) !important;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.dark-ai-theme .section-title-background + h2::after {
  display: block;
  width: 64px;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 99px;
  content: "";
  background: linear-gradient(90deg, var(--ai-cyan), var(--ai-violet));
}

/* About */
.dark-ai-theme #about .container > .row {
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.035), transparent 38%),
    var(--ai-surface);
  box-shadow: var(--ai-shadow);
}

.dark-ai-theme .profile-photo {
  width: min(88%, 370px);
  margin-bottom: 0;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: 26px !important;
  box-shadow:
    18px 18px 0 rgba(96, 165, 250, 0.07),
    -12px -12px 0 rgba(167, 139, 250, 0.045),
    0 24px 50px rgba(0, 0, 0, 0.34);
}

.dark-ai-theme #about h3 {
  color: var(--ai-text);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
}

.dark-ai-theme #about p {
  color: #aebbd0;
}

.dark-ai-theme #about .row.mb-3 > div {
  padding: 0.35rem 0.5rem !important;
}

.dark-ai-theme #about .row.mb-3 h6 {
  min-height: 52px;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  color: #6f819e;
  background: rgba(255, 255, 255, 0.018);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dark-ai-theme #about .row.mb-3 h6 span {
  display: block;
  margin-top: 0.22rem;
  color: #d6e2f3 !important;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

/* Experience and education */
.dark-ai-theme #experience .row > .col-lg-6,
.dark-ai-theme #education .row > .col-lg-6:last-child {
  flex: 0 0 100%;
  max-width: 100%;
}

.dark-ai-theme #education .row > .col-lg-6:first-child {
  display: none;
}

.dark-ai-theme #experience h3,
.dark-ai-theme #education h3 {
  margin-bottom: 2rem !important;
  font-size: 1.5rem;
}

.dark-ai-theme #experience .border-left,
.dark-ai-theme #education .border-left {
  --timeline-indent: 2.25rem;
  margin-left: 0.45rem !important;
  padding-left: var(--timeline-indent) !important;
  border-color: rgba(94, 234, 212, 0.28) !important;
}

.dark-ai-theme #experience .border-left > .position-relative,
.dark-ai-theme #education .border-left > .position-relative {
  margin-bottom: 1.25rem !important;
  padding: 1.55rem 1.65rem;
  border: 1px solid var(--ai-border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 26, 49, 0.86), rgba(8, 13, 28, 0.86));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dark-ai-theme #experience .border-left > .position-relative:hover,
.dark-ai-theme #education .border-left > .position-relative:hover {
  border-color: rgba(94, 234, 212, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  transform: translateY(-3px);
}

.dark-ai-theme .timeline-marker {
  top: 2px;
  left: calc(-1.5px - var(--timeline-indent)) !important;
  transform: translateX(-50%);
  padding: 4px;
  border-radius: 50%;
  color: var(--ai-cyan) !important;
  background: var(--ai-bg);
  filter: drop-shadow(0 0 7px rgba(94, 234, 212, 0.5));
}

.dark-ai-theme #experience h5,
.dark-ai-theme #education h5 {
  color: var(--ai-text);
  font-size: 1.15rem;
}

.dark-ai-theme #experience .mb-2,
.dark-ai-theme #education .mb-2 {
  color: #7f91ac;
  font-size: 0.9rem;
}

.dark-ai-theme #experience .mb-2 strong,
.dark-ai-theme #education .mb-2 strong {
  color: var(--ai-cyan);
}

.dark-ai-theme #experience ul {
  margin-top: 1.1rem;
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

.dark-ai-theme #experience ul br {
  display: none;
}

.dark-ai-theme #experience ul li {
  position: relative;
  margin-bottom: 0.8rem;
  padding-left: 1.6rem;
}

.dark-ai-theme #experience ul li > span:first-child {
  position: absolute;
  top: 0.05rem;
  left: 0;
  color: var(--ai-cyan);
}

/* Skills */
.dark-ai-theme .skill-grid {
  margin-right: -0.7rem;
  margin-left: -0.7rem;
}

.dark-ai-theme .skill-grid > div {
  padding-right: 0.7rem;
  padding-left: 0.7rem;
}

.dark-ai-theme .skill {
  height: auto;
  margin-bottom: 1.5rem !important;
  padding: 1.3rem 1.35rem;
  border: 1px solid var(--ai-border);
  border-radius: 16px;
  background: rgba(12, 19, 38, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.dark-ai-theme .skill h6 {
  margin-bottom: 0.75rem;
  color: #dce7f7;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600 !important;
}

.dark-ai-theme .skill h6:last-child {
  color: var(--ai-cyan);
  font-family: "Space Grotesk", sans-serif;
}

.dark-ai-theme .progress {
  height: 7px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.dark-ai-theme .progress-bar {
  position: relative;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ai-cyan), var(--ai-blue), var(--ai-violet)) !important;
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.2);
}

.dark-ai-theme .progress-bar::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--ai-bg);
  border-radius: 50%;
  content: "";
  background: var(--ai-cyan);
  transform: translateY(-50%);
}

/* Portfolio and demos */
.dark-ai-theme .project-grid {
  row-gap: 0.5rem;
}

.dark-ai-theme .project-card > .position-relative {
  border: 1px solid var(--ai-border);
  border-radius: 18px;
  background: var(--ai-surface-solid);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.dark-ai-theme .project-card > .position-relative:hover {
  border-color: rgba(94, 234, 212, 0.38);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34), 0 0 32px rgba(94, 234, 212, 0.08);
  transform: translateY(-7px);
}

.dark-ai-theme .project-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 17px !important;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04);
  transition: filter 220ms ease, transform 350ms ease;
}

.dark-ai-theme .project-card:hover .project-card-image {
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.025);
}

.dark-ai-theme .project-card-action {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 17px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.dark-ai-theme .project-card-action:focus-visible {
  outline: 2px solid var(--ai-cyan);
  outline-offset: -5px;
}

.dark-ai-theme .project-card-action:focus-visible .project-card-overlay {
  top: 30px;
  left: 30px;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  opacity: 1;
}

.dark-ai-theme .project-card-overlay {
  border: 1px solid rgba(94, 234, 212, 0.38);
  background: rgba(4, 10, 24, 0.7);
  backdrop-filter: blur(8px);
}

.dark-ai-theme .project-card-icon {
  color: var(--ai-cyan) !important;
  font-size: 46px;
  filter: drop-shadow(0 0 14px rgba(94, 234, 212, 0.3));
}

.dark-ai-theme .project-demo .card {
  overflow: hidden;
  border: 1px solid var(--ai-border) !important;
  border-radius: var(--ai-radius) !important;
  color: var(--ai-muted);
  background: var(--ai-surface-solid);
  box-shadow: var(--ai-shadow);
}

.dark-ai-theme .project-demo .card-header {
  padding: 1rem 1.25rem;
  border-color: var(--ai-border);
  background: rgba(17, 26, 49, 0.92);
}

.dark-ai-theme .project-demo .card-body {
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.dark-ai-theme .project-back-icon {
  color: var(--ai-cyan);
  font-size: 2rem;
}

.dark-ai-theme .project-back-slot {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
}

.dark-ai-theme .project-back-button {
  padding: 0.25rem;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.dark-ai-theme .project-back-button:focus-visible {
  outline: 2px solid var(--ai-cyan);
  outline-offset: 3px;
}

.dark-ai-theme .project-back-button:hover {
  color: #ffffff;
  background: rgba(94, 234, 212, 0.16);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.16);
  transform: translateY(-2px);
}

.dark-ai-theme .project-back-button:hover .project-back-icon {
  color: #ffffff;
}

.dark-ai-theme .demo-select {
  border-color: var(--ai-border-strong);
  background: var(--ai-surface-raised);
}

.dark-ai-theme .demo-select-trigger,
.dark-ai-theme .demo-select-menu {
  border-color: var(--ai-border-strong);
  color: var(--ai-text);
  background: var(--ai-surface-raised);
}

.dark-ai-theme .demo-select-trigger:focus-visible {
  outline-offset: -3px;
}

.dark-ai-theme .demo-select-option {
  color: var(--ai-muted);
}

.dark-ai-theme .demo-select-option:hover,
.dark-ai-theme .demo-select-option:focus {
  color: #03110f;
  background: var(--ai-cyan);
}

.dark-ai-theme .demo-notice {
  width: min(100%, 720px);
  margin-right: auto;
  margin-left: auto;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.065);
}

.dark-ai-theme .model-description-title {
  width: min(100%, 720px);
  margin-right: auto;
  margin-left: auto;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.08);
}

.dark-ai-theme .demo-file-control {
  margin-top: 1.5rem;
}

.dark-ai-theme .demo-file-input {
  width: min(100%, 280px);
  margin: 0;
}

.dark-ai-theme .classification-preview-image {
  max-width: 100%;
  height: auto;
}

.dark-ai-theme .classification-loading-indicator {
  display: inline-flex;
  width: min(24rem, 100%);
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(94, 234, 212, 0.42);
  border-radius: 18px;
  color: var(--ai-text);
  background:
    radial-gradient(circle at 50% 0%, rgba(94, 234, 212, 0.13), transparent 70%),
    rgba(8, 15, 31, 0.96);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.08), 0 18px 45px rgba(0, 0, 0, 0.32);
}

.dark-ai-theme .classification-loading-indicator.is-hidden {
  display: none;
}

.dark-ai-theme .classification-loading-spinner {
  width: 3.25rem;
  height: 3.25rem;
  border: 4px solid rgba(96, 165, 250, 0.2);
  border-top-color: var(--ai-cyan);
  border-right-color: var(--ai-violet);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.42));
  animation: classification-spinner-rotation 0.8s linear infinite;
}

.dark-ai-theme .classification-loading-title {
  color: var(--ai-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dark-ai-theme .classification-loading-detail {
  color: var(--ai-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

@keyframes classification-spinner-rotation {
  to {
    transform: rotate(360deg);
  }
}

.dark-ai-theme .demo-error {
  min-height: 1.75rem;
  color: #fca5a5;
}

.dark-ai-theme #classification-result .alert,
.dark-ai-theme #success2 .alert {
  width: min(100%, 720px);
  margin-right: auto;
  margin-left: auto;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.dark-ai-theme .alert-success {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(6, 78, 59, 0.48);
  box-shadow: inset 0 0 22px rgba(52, 211, 153, 0.06);
}

.dark-ai-theme .alert-success strong {
  color: #d1fae5;
}

.dark-ai-theme .alert-success .close {
  color: #a7f3d0;
  opacity: 0.82;
  text-shadow: none;
}

.dark-ai-theme .alert-success .close:hover,
.dark-ai-theme .alert-success .close:focus {
  color: #ffffff;
  opacity: 1;
}

.dark-ai-theme .alert-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.44);
}

.dark-ai-theme .alert-danger strong,
.dark-ai-theme .alert-danger .close {
  color: #fee2e2;
  text-shadow: none;
}

/* Blog */
.dark-ai-theme #blog .row > div > div {
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--ai-border);
  border-radius: 18px;
  background: rgba(12, 19, 38, 0.76);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 220ms ease, border-color 220ms ease;
}

.dark-ai-theme #blog .row > div > div:hover {
  border-color: rgba(96, 165, 250, 0.34);
  transform: translateY(-6px);
}

.dark-ai-theme .blog-image {
  width: 100%;
  height: 210px;
  max-height: none;
  border-radius: 12px !important;
  object-fit: cover;
}

.dark-ai-theme #blog h5 {
  min-height: 3.4em;
  color: #dce7f7;
  font-size: 1.03rem;
  line-height: 1.45;
}

.dark-ai-theme #blog .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.55rem 1.2rem !important;
  line-height: 1.2;
  text-align: center;
}

/* Interests */
.dark-ai-theme #interests .row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1.4rem;
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  background: rgba(12, 19, 38, 0.65);
}

.dark-ai-theme #interests img {
  width: 120px;
  margin: 0 !important;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.025);
  filter: saturate(0.82);
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.dark-ai-theme #interests img:hover {
  border-color: var(--ai-border-strong);
  filter: saturate(1.1);
  transform: translateY(-5px);
}

.dark-ai-theme #interests .interest-swimming,
.dark-ai-theme #interests .interest-swimming:hover {
  filter: brightness(0) saturate(100%) invert(88%) sepia(27%) saturate(792%) hue-rotate(112deg) brightness(99%) contrast(87%);
}

.dark-ai-theme #experience .fa-check,
.dark-ai-theme .demo-select .fa-circle-chevron-down {
  color: var(--ai-cyan);
}

/* Contact */
.dark-ai-theme .contact-form {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  background: var(--ai-surface);
  box-shadow: var(--ai-shadow);
}

.dark-ai-theme .contact-form .control-group {
  position: relative;
  margin-bottom: 1rem;
}

.dark-ai-theme .contact-form .form-control {
  display: block;
  width: 100%;
}

.dark-ai-theme .contact-form textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

.dark-ai-theme .form-control,
.dark-ai-theme .form-control:focus {
  border: 1px solid var(--ai-border);
  border-radius: 12px;
  color: var(--ai-text);
  background: rgba(3, 7, 18, 0.7);
  box-shadow: none;
}

.dark-ai-theme .form-control:focus {
  border-color: rgba(94, 234, 212, 0.65);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.08);
}

.dark-ai-theme .form-control::placeholder {
  color: #667792;
}

.dark-ai-theme #sendMessageButton {
  min-width: 170px;
  margin-top: 0.25rem;
  padding: 0.75rem 1.4rem;
}

/* Footer */
.dark-ai-theme .site-footer {
  margin-top: 0 !important;
  border-top: 1px solid var(--ai-border);
  background: #03050d !important;
}

.dark-ai-theme .site-footer .btn-social {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid var(--ai-border);
  color: #c8d5e8;
  background: rgba(17, 26, 49, 0.7);
}

.dark-ai-theme .site-footer .btn-social i {
  display: block;
  margin: 0;
  line-height: 1;
}

.dark-ai-theme .site-footer .btn-social:hover,
.dark-ai-theme .site-footer .btn-social:focus {
  border-color: rgba(94, 234, 212, 0.48);
  color: var(--ai-cyan) !important;
  background: rgba(94, 234, 212, 0.1);
  box-shadow: 0 8px 22px rgba(94, 234, 212, 0.08);
  transform: translateY(-2px);
}

.dark-ai-theme .site-footer .btn-social:hover i,
.dark-ai-theme .site-footer .btn-social:focus i {
  color: var(--ai-cyan);
}

.dark-ai-theme .site-footer p,
.dark-ai-theme .site-footer a {
  color: #7f91ac !important;
}

.dark-ai-theme .back-to-top {
  right: 24px;
  bottom: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0 !important;
  border-color: var(--ai-border-strong);
  border-radius: 50%;
  color: var(--ai-cyan);
  background: rgba(12, 19, 38, 0.88);
  backdrop-filter: blur(10px);
  animation: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

/* Accessibility */
.dark-ai-theme :focus-visible {
  outline: 2px solid var(--ai-cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 991.98px) {
  .dark-ai-theme .navbar {
    min-height: 68px;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
    background: rgba(5, 8, 22, 0.94);
  }

  .dark-ai-theme .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--ai-border);
    border-radius: 16px;
    background: rgba(12, 19, 38, 0.98);
  }

  .dark-ai-theme .navbar-nav .nav-link {
    padding: 0.7rem 0.3rem;
  }

  .dark-ai-theme .navbar-nav .nav-link::after {
    right: auto;
    bottom: 0.35rem;
    left: 0.3rem;
    width: 42px;
  }

  .dark-ai-theme #home .col-lg-7 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .dark-ai-theme #home {
    flex-direction: column;
    align-items: flex-start !important;
    padding-top: clamp(8.5rem, 16vh, 10.5rem) !important;
    padding-bottom: 2.5rem !important;
  }

  .dark-ai-theme #home .container {
    order: 1;
  }

  .dark-ai-theme #home .hero-visual {
    position: relative;
    order: 2;
    inset: auto;
    width: 100%;
    height: clamp(190px, 30svh, 280px);
    margin-top: clamp(2rem, 5vw, 3rem);
    flex: 0 0 auto;
  }

  .dark-ai-theme #home .hero-visual::after {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    display: block;
    width: min(52vw, 300px);
    aspect-ratio: 1;
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 50%;
    box-shadow:
      0 0 0 48px rgba(96, 165, 250, 0.03),
      0 0 0 96px rgba(167, 139, 250, 0.02),
      inset 0 0 70px rgba(94, 234, 212, 0.07);
    transform: translate(-50%, -50%);
  }

  .dark-ai-theme #home .hero-wave-canvas {
    z-index: 1;
    opacity: 0.52;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
  }

  .dark-ai-theme #home::after {
    display: none;
  }

  .dark-ai-theme .profile-photo {
    margin-bottom: 2.25rem;
  }
}

@media (max-width: 767.98px) {
  body.dark-ai-theme {
    font-size: 0.95rem;
  }

  .dark-ai-theme #about,
  .dark-ai-theme #experience,
  .dark-ai-theme #education,
  .dark-ai-theme #skill,
  .dark-ai-theme #portfolio,
  .dark-ai-theme #blog,
  .dark-ai-theme #interests,
  .dark-ai-theme #contact,
  .dark-ai-theme .project-demo {
    padding-top: 4.75rem !important;
    padding-bottom: 4.75rem !important;
  }

  .dark-ai-theme #home {
    padding-top: 7rem !important;
  }

  .dark-ai-theme #home .hero-visual {
    height: clamp(180px, 28svh, 240px);
    margin-top: 0.75rem;
  }

  .dark-ai-theme #home .hero-visual::after {
    width: min(48vw, 200px);
  }

  .dark-ai-theme #home .hero-wave-canvas {
    opacity: 0.48;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 92%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 92%, transparent 100%);
  }

  .dark-ai-theme #home .display-3 {
    font-size: clamp(3.25rem, 18vw, 5.25rem);
  }

  .dark-ai-theme #home .typed-text-output {
    display: inline !important;
    min-height: 0;
    margin-top: 0.8rem;
    font-size: clamp(1rem, 5vw, 1.25rem);
  }

  .dark-ai-theme #home .typed-cursor {
    font-size: 1.65rem;
  }

  .dark-ai-theme .section-title-background {
    font-size: clamp(3.5rem, 21vw, 5rem);
  }

  .dark-ai-theme .section-title-background + h2 {
    font-size: 1.65rem;
  }

  .dark-ai-theme #about .container > .row {
    padding: 1.3rem 0.9rem;
  }

  .dark-ai-theme #experience .border-left,
  .dark-ai-theme #education .border-left {
    --timeline-indent: 1.4rem;
  }

  .dark-ai-theme #experience .border-left > .position-relative,
  .dark-ai-theme #education .border-left > .position-relative {
    padding: 1.2rem;
  }

  .dark-ai-theme .skill {
    height: auto;
  }

  .dark-ai-theme .blog-image {
    height: 220px;
  }
}

@media (max-width: 420px) {
  .dark-ai-theme .navbar-brand h1 {
    font-size: 1.45rem;
  }

  .dark-ai-theme #home .display-3 {
    font-size: 3.2rem;
  }

  .dark-ai-theme #home .hero-actions {
    width: 100%;
  }

  .dark-ai-theme #home .hero-visual::after {
    width: min(52vw, 190px);
  }

  .dark-ai-theme #home .hero-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 220px);
    min-width: 0;
    margin-right: auto;
    margin-left: auto;
  }

  .dark-ai-theme .section-title-background {
    font-size: 3.2rem;
  }

  .dark-ai-theme #interests img {
    width: calc(50% - 0.5rem);
    max-width: 125px;
  }
}
