﻿:root {
  color-scheme: dark light;
  --bg: #080b14;
  --surface: #101625;
  --surface-2: #141d30;
  --text: #e9eefc;
  --muted: #a9b3cc;
  --line: #2a3958;
  --accent: #4da3ff;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(3, 7, 17, 0.32);
  --space-1: 8px;
  --space-2: 16px;
  --neon: #00ffb4;
  --neon-glow: rgba(0, 255, 180, 0.35);
  --neon-dim: rgba(0, 255, 180, 0.08);
  --space-3: 24px;
  --space-4: 32px;
  --ease: 200ms ease;
  --parallax-x: 0;
  --parallax-y: 0;
  --cursor-x: 50%;
  --cursor-y: 24%;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f3f6fc;
    --text: #101525;
    --muted: #4e5b78;
    --line: #d6dfef;
    --accent: #216bcb;
    --shadow: 0 12px 24px rgba(23, 36, 65, 0.12);
  }
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Nunito Sans', sans-serif;
  background: radial-gradient(circle at 10% 0%, rgba(77, 163, 255, 0.16), transparent 35%), var(--bg);
  color: var(--text);
  position: relative;
}

body::before {
  display: none;
}

body::after {
  content: '';
  position: fixed;
  inset: -8%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background:
    radial-gradient(circle at 18% 12%, rgba(90, 131, 235, 0.22), transparent 34%),
    radial-gradient(circle at 76% 78%, rgba(75, 211, 198, 0.15), transparent 36%),
    linear-gradient(180deg, rgba(77, 163, 255, 0.03), rgba(45, 86, 146, 0.07));
  transform: translate3d(calc(var(--parallax-x, 0) * 24px), calc(var(--parallax-y, 0) * 20px), 0);
  transition: transform 240ms linear;
}

body>* {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }

  .fx-global-light {
    display: none !important;
  }

  body::after {
    transform: none;
    opacity: 0.2;
  }
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
}

.brand {
  font-family: 'Merienda', cursive;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: none;
}

.brand-logo-image.visible {
  display: block;
}

.brand-logo-text.hidden {
  display: none;
}

nav {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  --mag-x: 0px;
  --mag-y: 0px;
  --lift-y: 0px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  transform: translate3d(var(--mag-x), calc(var(--mag-y) + var(--lift-y)), 0);
  transition: background var(--ease), color var(--ease), transform var(--ease);
  will-change: transform;
}

.nav-link.active,
.nav-link:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  --lift-y: -1px;
}

.page-shell {
  padding: var(--space-4) 0 80px;
}

.section {
  margin-bottom: var(--space-4);
}

.list-page .page-shell {
  padding: 28px 0 64px;
}

.list-page .section {
  background: color-mix(in srgb, var(--surface) 94%, #122449 6%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
}

.list-page .section-header {
  margin-bottom: var(--space-3);
}

.list-page .projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.list-page .projects-grid .project-card {
  grid-column: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy {
  animation: riseIn 520ms cubic-bezier(.2, .75, .2, 1) both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 var(--space-1);
}

h1,
h2,
h3 {
  font-family: 'Merienda', cursive;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
}

.hero-line {
  margin: var(--space-2) 0 var(--space-1);
  font-size: 1.05rem;
  color: var(--text);
}

.bio {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.hero-cta {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn {
  --mag-x: 0px;
  --mag-y: 0px;
  --lift-y: 0px;
  text-decoration: none;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  transform: translate3d(var(--mag-x), calc(var(--mag-y) + var(--lift-y)), 0);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease);
  will-change: transform;
}

.btn:focus-visible,
.back-to-top:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--text);
}

.btn:hover {
  --lift-y: -2px;
  box-shadow: 0 14px 30px rgba(8, 15, 30, 0.38);
}

.credibility-row {
  margin-top: var(--space-3);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-1);
}

.metric {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.metric strong {
  display: block;
  font-size: 1.2rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-media {
  display: grid;
  gap: var(--space-1);
  align-content: center;
  justify-items: center;
  animation: riseIn 560ms cubic-bezier(.2, .75, .2, 1) 120ms both;
}

.profile-image,
.profile-audio,
.profile-video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: none;
}

.profile-image.visible,
.profile-audio.visible,
.profile-video.visible {
  display: block;
}

.profile-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-width: 280px;
  box-shadow: 0 18px 36px rgba(9, 18, 38, 0.38);
  animation: floatPortrait 5s ease-in-out infinite;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) 10px;
  box-shadow: var(--shadow);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.chip-list span {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.85rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-2);
}

.home-body #projectsGrid.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.project-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) 10px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.clickable-card {
  cursor: pointer;
}

.project-card p {
  margin: 8px 0;
  color: var(--muted);
}

.project-card h3,
.project-card p,
.cert-card h3,
.cert-card p,
#certificationsGrid .cert-title,
#certificationsGrid .cert-year,
.blog-title,
.blog-date,
.blog-excerpt,
.cert-head span {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-long {
  margin-top: var(--space-2);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.project-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.project-actions {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.detail-box {
  margin-top: var(--space-2);
  border: 1px solid color-mix(in srgb, var(--line) 86%, #8fb2ff 14%);
  border-radius: 14px;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--surface-2) 88%, #102243 12%), color-mix(in srgb, var(--surface) 94%, #0f1d3b 6%));
  box-shadow:
    inset 0 1px 0 rgba(165, 194, 255, 0.07),
    0 10px 24px rgba(6, 12, 26, 0.28);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.detail-box:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(165, 194, 255, 0.1),
    0 12px 28px rgba(8, 16, 34, 0.34);
}

.detail-box summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  user-select: none;
}

.detail-box summary::after {
  content: '+';
  width: 24px;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #9cc6ff 16%);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: color-mix(in srgb, var(--text) 86%, #cde2ff 14%);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform var(--ease), border-color var(--ease), color var(--ease);
}

.detail-box summary::-webkit-details-marker {
  display: none;
}

.detail-box[open] summary {
  border-bottom-color: var(--line);
}

.detail-box[open] summary::after {
  content: '−';
  transform: rotate(180deg);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  color: var(--accent);
}

.detail-body {
  padding: 14px;
  color: color-mix(in srgb, var(--text) 84%, var(--muted) 16%);
  line-height: 1.72;
  font-size: 0.96rem;
}

.detail-body>*:first-child {
  margin-top: 0;
}

.detail-body>*:last-child {
  margin-bottom: 0;
}

.detail-body h1,
.detail-body h2,
.detail-body h3 {
  margin: 0.85rem 0 0.45rem;
  line-height: 1.3;
  color: var(--text);
  font-family: 'Merienda', cursive;
}

.detail-body h1 {
  font-size: clamp(1.08rem, 1.65vw, 1.35rem);
}

.detail-body h2 {
  font-size: clamp(1rem, 1.45vw, 1.2rem);
}

.detail-body p,
.detail-body ul,
.detail-body ol,
.detail-body pre,
.detail-body blockquote {
  margin: 0.45rem 0 0.75rem;
}

.detail-body ul,
.detail-body ol {
  padding-left: 1.15rem;
}

.detail-body blockquote {
  border-left: 3px solid color-mix(in srgb, var(--accent) 68%, #7cded1 32%);
  padding-left: 0.7rem;
  color: color-mix(in srgb, var(--text) 88%, var(--muted) 12%);
}

.detail-body code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.92em;
  padding: 0.06rem 0.34rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, #b8cdfa 22%);
  background: color-mix(in srgb, var(--surface-2) 86%, #17294a 14%);
}

.detail-body pre {
  border: 1px solid color-mix(in srgb, var(--line) 82%, #98b5ea 18%);
  border-radius: 10px;
  padding: 0.72rem;
  overflow-x: auto;
  background: color-mix(in srgb, var(--surface-2) 92%, #0e1b34 8%);
}

.detail-body pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.detail-body img,
.detail-body video,
.detail-body iframe {
  width: 100%;
  max-width: 100%;
  margin: 0.7rem 0;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #9eb9ef 16%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 90%, #122444 10%);
}

.detail-body iframe {
  min-height: 220px;
}

.media-grid {
  margin-top: var(--space-2);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
}

.media-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.content-blocks {
  grid-template-columns: 1fr;
}

.content-blocks img {
  height: auto;
  max-height: 420px;
}

.video-grid {
  margin-top: var(--space-2);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
}

.video-grid video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.video-grid iframe {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

#certificationsGrid.certifications-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

#certificationsGrid .cert-card-link {
  height: 100%;
}

#certificationsGrid .cert-card-featured {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 16px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, #7da6ff 12%);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--surface) 93%, #13284f 7%), color-mix(in srgb, var(--surface) 98%, #0d1830 2%));
  box-shadow:
    inset 0 1px 0 rgba(170, 199, 255, 0.06),
    0 12px 30px rgba(4, 9, 22, 0.32);
  overflow: hidden;
  align-self: stretch;
  height: 100%;
}

#certificationsGrid .cert-card-featured:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(170, 199, 255, 0.09),
    0 14px 34px rgba(6, 12, 28, 0.38);
}

#certificationsGrid .cert-media {
  width: min(100%, 260px);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #9dbdff 20%);
  background: color-mix(in srgb, var(--surface-2) 92%, #ffffff 8%);
  box-shadow:
    inset 0 0 0 1px rgba(145, 172, 233, 0.12),
    0 8px 16px rgba(6, 13, 30, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-left: auto;
  margin-right: auto;
}

#certificationsGrid .cert-img {
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: clamp(170px, 22vw, 240px);
  border-radius: 8px;
}

#certificationsGrid .cert-img-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

#certificationsGrid .cert-meta {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 2px 2px;
  width: min(100%, 260px);
}

#certificationsGrid .cert-title {
  margin: 0;
  line-height: 1.28;
  font-size: clamp(1.08rem, 1.4vw, 1.32rem);
  color: var(--text);
  letter-spacing: 0.01em;
}

#certificationsGrid .cert-year {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}



.home-body #projectsGrid .project-card {
  grid-column: auto;
  height: 100%;
  align-items: center;
  text-align: center;
  padding: var(--space-2) 8px;
}

.home-body #projectsGrid .project-card .card-image {
  width: min(100%, 260px);
  margin-left: auto;
  margin-right: auto;
}

.home-body #projectsGrid .project-card .cert-head {
  width: min(100%, 260px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
}

.home-body #projectsGrid .project-card>p {
  width: min(100%, 260px);
  text-align: center;
}

.home-body #projectsGrid .project-card .project-actions {
  width: min(100%, 260px);
  justify-content: center;
}

.home-body #booksGrid .book-card {
  align-items: center;
  text-align: center;
}

.home-body #booksGrid .book-card .card-image {
  margin-left: auto;
  margin-right: auto;
}

.home-body #booksGrid .book-card .cert-head {
  width: min(100%, 360px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
}

.home-body #booksGrid .book-card>p {
  width: min(100%, 360px);
  text-align: center;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) 10px;
  box-shadow: var(--shadow);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.cert-card:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  transform: translateY(-3px);
}

.cert-card-compact h3 {
  margin: 0;
}

.cert-card-compact p {
  margin: 10px 0 0;
}

.card-image {
  width: min(100%, 360px);
  max-width: 100%;
  height: auto;
  max-height: clamp(160px, 23vw, 260px);
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 6px;
  margin-bottom: var(--space-1);
  margin-left: auto;
  margin-right: auto;
}

.cert-card p {
  margin: 8px 0;
  color: var(--muted);
}

.cert-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
  align-items: center;
  flex-wrap: wrap;
  width: min(100%, 360px);
}

.cert-head span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--text);
  background: var(--surface-2);
}

.cert-breadcrumb {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: 0.95rem;
}

.cert-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.cert-category-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) 14px;
  min-height: 180px;
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  justify-items: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--ease), transform var(--ease);
}

.cert-category-tile:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-2px);
}

.cert-category-tile h3 {
  font-size: 1.1rem;
}

.cert-category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
}

.cert-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.cert-card.placeholder {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.cert-detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  max-width: 860px;
}

.cert-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.cert-detail-meta {
  color: var(--muted);
  margin: 8px 0 0;
}

.cert-detail-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: var(--space-2);
}

.cert-detail-description {
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

.book-category {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-2) 10px;
}

.home-body #booksGrid .book-category {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.book-category-title {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-family: 'Merienda', cursive;
}

.blogs-list {
  display: grid;
  gap: var(--space-2);
}

.blog-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-2) 10px;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.blog-meta {
  display: grid;
  gap: 0.5rem;
  align-content: center;
}

.blog-title {
  margin: 0;
  line-height: 1.3;
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
}

.blog-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.blog-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-media {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  width: clamp(140px, 26vw, 220px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
}

.blog-img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
  display: block;
}

.blog-img-empty {
  color: var(--muted);
  font-weight: 700;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 24, 0.72);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: var(--space-2);
}

.detail-panel {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow);
}

.detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.detail-panel-head h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.detail-panel-meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-close {
  --mag-x: 0px;
  --mag-y: 0px;
  --lift-y: 0px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transform: translate3d(var(--mag-x), calc(var(--mag-y) + var(--lift-y)), 0);
  transition: transform var(--ease), border-color var(--ease), background var(--ease);
}

.detail-close:hover {
  --lift-y: -1px;
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--surface-2) 84%, var(--accent) 16%);
}

.detail-image {
  width: auto;
  max-width: 100%;
  max-height: min(52vh, 420px);
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 8px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-2);
}

.detail-content p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0.3rem 0;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
  margin: 0.55rem 0 0.3rem;
  color: var(--text);
}

.detail-content h1 {
  font-size: 16px;
}

.detail-content h2 {
  font-size: 14px;
}

.detail-content h3 {
  font-size: 0.95rem;
}

.detail-content blockquote {
  border-left: 3px solid color-mix(in srgb, var(--accent) 65%, #6fd4ca 35%);
  padding-left: 0.7rem;
  margin: 0.7rem 0;
}

.detail-content code {
  font-family: Consolas, 'Courier New', monospace;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}

.detail-content pre {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  overflow-x: auto;
  background: var(--surface-2);
}

.detail-content img,
.detail-content video,
.detail-content iframe {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  margin: 0.6rem 0;
}

.detail-content img,
.detail-content video {
  width: auto;
  height: auto;
  max-height: 420px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.detail-content iframe {
  width: 100%;
}

.detail-content iframe {
  min-height: 220px;
}

.detail-actions {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

body.modal-open {
  overflow: hidden;
}

.detail-points {
  margin: var(--space-1) 0 0;
  color: var(--text);
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
}

.contact-box p {
  color: var(--muted);
}

.contact-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: none;
}

.back-to-top.visible {
  display: inline-grid;
  place-items: center;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.motion-rise {
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  animation: riseIn 420ms cubic-bezier(.2, .75, .2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.card-animated:not(.motion-rise) {
  opacity: 0;
  transform: translateY(10px) scale(0.995);
  animation: cardLiftIn 460ms cubic-bezier(.2, .75, .2, 1) forwards;
  animation-delay: var(--card-delay, 0ms);
}

.card-spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --mx: 50%;
  --my: 50%;
}

.card-spotlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(220px circle at var(--mx) var(--my),
      color-mix(in srgb, var(--accent) 22%, #b8dcff 18%) 0%,
      rgba(132, 183, 255, 0.16) 26%,
      rgba(132, 183, 255, 0.07) 46%,
      rgba(132, 183, 255, 0) 70%);
  transition: opacity 220ms ease;
}

.card-spotlight.is-pointer::before,
.card-spotlight:hover::before {
  opacity: 1;
}

.card-spotlight>* {
  position: relative;
  z-index: 1;
}

.fx-global-light {
  position: fixed;
  left: 0;
  top: 0;
  width: 360px;
  height: 360px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
  background:
    radial-gradient(circle at center,
      rgba(248, 252, 255, 0.92) 0%,
      color-mix(in srgb, var(--accent) 28%, #eaf4ff 72%) 22%,
      rgba(146, 193, 255, 0.18) 40%,
      rgba(146, 193, 255, 0.07) 58%,
      rgba(146, 193, 255, 0) 78%);
  filter: blur(132px);
  mix-blend-mode: screen;
  transition: opacity 280ms ease;
}

.fx-global-light-low {
  z-index: 0;
  width: 420px;
  height: 420px;
}

.fx-global-light-high {
  z-index: 7;
}

body.cursor-light-active .fx-global-light-low {
  opacity: 0.1;
}

body.cursor-light-active .fx-global-light-high {
  opacity: 0.14;
}

/* ──────── CROSSHAIR CURSOR ──────── */
.fx-cursor-dot,
.fx-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 12000;
  opacity: 0;
  transition: opacity 160ms ease;
}

/* Center dot = small neon point */
.fx-cursor-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon-glow), 0 0 14px var(--neon-dim);
  transform: translate(-50%, -50%);
}

/* Ring = crosshair frame (hollow circle with 4 crosshair lines) */
.fx-cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 255, 180, 0.45);
  background: transparent;
  transform: translate(-50%, -50%) rotate(0deg);
  transition:
    border-radius 250ms ease,
    border-color 250ms ease,
    background 250ms ease,
    width 250ms ease,
    height 250ms ease,
    transform 250ms ease;
}

/* Crosshair lines inside the ring */
.fx-crosshair-line {
  position: absolute;
  background: rgba(0, 255, 180, 0.55);
  transition: opacity 200ms ease, background 200ms ease;
}

.fx-crosshair-line:nth-child(1) {
  /* top */
  width: 1.5px;
  height: 8px;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.fx-crosshair-line:nth-child(2) {
  /* bottom */
  width: 1.5px;
  height: 8px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.fx-crosshair-line:nth-child(3) {
  /* left */
  width: 8px;
  height: 1.5px;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
}

.fx-crosshair-line:nth-child(4) {
  /* right */
  width: 8px;
  height: 1.5px;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
}

body.custom-cursor-enabled .fx-cursor-dot,
body.custom-cursor-enabled .fx-cursor-ring {
  opacity: 1;
}

body.custom-cursor-enabled {
  cursor: none;
}

body.custom-cursor-enabled a,
body.custom-cursor-enabled button,
body.custom-cursor-enabled .btn,
body.custom-cursor-enabled .nav-link,
body.custom-cursor-enabled .detail-close,
body.custom-cursor-enabled .clickable-card {
  cursor: none;
}

body.custom-cursor-enabled input,
body.custom-cursor-enabled textarea,
body.custom-cursor-enabled select,
body.custom-cursor-enabled [contenteditable='true'] {
  cursor: text;
}

/* HOVER: crosshair morphs to solid square */
body.cursor-hovering .fx-cursor-ring {
  border-radius: 4px;
  width: 16px;
  height: 16px;
  border-color: var(--neon);
  background: rgba(0, 255, 180, 0.18);
  transform: translate(-50%, -50%) rotate(45deg);
}

body.cursor-hovering .fx-crosshair-line {
  opacity: 0;
}

body.cursor-hovering .fx-cursor-dot {
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow);
}

/* PRESSED: shrink the square */
body.cursor-pressed .fx-cursor-ring {
  width: 12px;
  height: 12px;
  background: rgba(0, 255, 180, 0.32);
  transform: translate(-50%, -50%) rotate(45deg) scale(0.8);
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface-2) 90%, #fff 10%), color-mix(in srgb, var(--surface-2) 80%, #fff 20%), color-mix(in srgb, var(--surface-2) 90%, #fff 10%));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton.metric {
  height: 64px;
}

.skeleton.chip {
  width: 80px;
  height: 28px;
  border-radius: 999px;
}

.skeleton.project {
  height: 220px;
  border-radius: var(--radius);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardLiftIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatPortrait {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.cert-card:hover,
.blog-card:hover {
  border-color: rgba(0, 255, 180, 0.35);
  box-shadow: 0 0 14px var(--neon-dim), 0 12px 28px rgba(8, 15, 30, 0.3);
}



/* ──────── TERMINAL TYPEWRITER ──────── */
.terminal-text {
  font-family: 'Courier New', Consolas, monospace !important;
  color: var(--neon) !important;
  background: rgba(0, 255, 180, 0.04);
  border: 1px solid rgba(0, 255, 180, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem !important;
  line-height: 1.6;
  display: block;
}

.terminal-prompt {
  color: var(--accent);
  font-weight: 700;
  user-select: none;
}

.terminal-output {
  color: var(--neon);
}

.terminal-cursor {
  color: var(--neon);
  font-weight: 400;
  margin-left: 1px;
  opacity: 1;
}

.terminal-cursor-blink {
  animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ──────── STAGGERED SLIDE-IN REVEAL ──────── */
.stagger-slide {
  opacity: 0;
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(.2, .75, .2, 1);
  animation-fill-mode: forwards;
  animation-delay: var(--slide-delay, 0ms);
}

.stagger-slide.slide-left {
  transform: translateX(-40px) translateY(10px) scale(0.97);
  animation-name: slideFromLeft;
}

.stagger-slide.slide-right {
  transform: translateX(40px) translateY(10px) scale(0.97);
  animation-name: slideFromRight;
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px) translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(40px) translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

/* ──────── SCROLL PROGRESS BAR ──────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 100;
  pointer-events: none;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--neon), var(--accent), var(--neon));
  transition: transform 60ms linear;
}

/* ──────── BUTTON CLICK RIPPLE ──────── */
.btn {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 255, 180, 0.22);
  transform: scale(0);
  animation: rippleOut 550ms ease-out forwards;
  pointer-events: none;
  z-index: 0;
}

@keyframes rippleOut {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ──────── PARTICLE NETWORK CANVAS ──────── */
#particle-network {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {

  .home-body #projectsGrid.projects-grid,
  #certificationsGrid.certifications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (pointer: coarse) {

  .fx-global-light,
  .fx-cursor-dot,
  .fx-cursor-ring {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .credibility-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card {
    grid-column: span 12;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .home-body #projectsGrid.projects-grid {
    grid-template-columns: 1fr;
  }

  #certificationsGrid.certifications-grid {
    grid-template-columns: 1fr;
  }

  #certificationsGrid .cert-card-featured {
    grid-column: auto;
    padding: 14px 8px;
    gap: 12px;
  }

  #certificationsGrid .cert-media {
    padding: 8px;
  }

  #certificationsGrid .cert-img {
    max-height: 200px;
  }

  #certificationsGrid .cert-title {
    font-size: 1rem;
  }

  .cert-categories-grid {
    grid-template-columns: 1fr;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }

  .detail-box summary {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  .detail-body {
    padding: 12px;
    font-size: 0.93rem;
  }

  .detail-body iframe {
    min-height: 180px;
  }

  .blog-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .blog-media {
    width: 100%;
  }

  .blog-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 680px) {
  .nav-inner {
    align-items: flex-start;
    gap: 0.65rem;
    flex-direction: column;
  }

  nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .nav-link {
    white-space: nowrap;
  }

  .list-page .section {
    padding: var(--space-2);
  }
}