/* ==========================================================================
   Refresh layer — loaded after style.css.
   Navbar, hero polish, About, Experience, Skills, Services, Portfolio and
   the collaboration CTA. Rules are scoped by section id so they win over
   the older stacked overrides in style.css without !important.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */
body {
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
  --radius-sm: 10px;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.14);
  --line-hover: rgba(148, 163, 184, 0.3);
  --line-accent: rgba(34, 211, 238, 0.45);
  --surface: rgba(148, 163, 184, 0.045);
  --surface-hover: rgba(148, 163, 184, 0.08);
  --surface-raised: #111a2e;
  --band: rgba(148, 163, 184, 0.025);
  --brand: #22d3ee;
  --brand-hover: #67e8f9;
  --brand-ink: #04121a;
  --brand-soft: rgba(34, 211, 238, 0.1);
  --brand-2: #a78bfa;
  --spot: rgba(34, 211, 238, 0.09);
  --nav-bg: rgba(10, 16, 30, 0.72);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 32px -16px rgba(0, 0, 0, 0.55);
  --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 56px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(34, 211, 238, 0.18);
  --gradient-text: linear-gradient(90deg, #22d3ee 0%, #818cf8 55%, #c084fc 100%);

  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.13);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
}

body.light-mode {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.09);
  --line-hover: rgba(15, 23, 42, 0.2);
  --line-accent: rgba(8, 145, 178, 0.45);
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --surface-raised: #ffffff;
  --band: rgba(15, 23, 42, 0.025);
  --brand: #0891b2;
  --brand-hover: #0e7490;
  --brand-ink: #ffffff;
  --brand-soft: rgba(8, 145, 178, 0.08);
  --brand-2: #7c3aed;
  --spot: rgba(8, 145, 178, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.78);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -18px rgba(15, 23, 42, 0.18);
  --card-shadow-hover: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 56px -26px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(8, 145, 178, 0.2);
  --gradient-text: linear-gradient(90deg, #0891b2 0%, #4f46e5 55%, #7c3aed 100%);

  --violet: #7c3aed;
  --violet-soft: rgba(124, 58, 237, 0.09);
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.09);
  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.09);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.1);
}

/* ---------- Base --------------------------------------------------------- */
body {
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-padding-top: calc(var(--nav-h, 72px) + 8px);
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
  height: auto;
}
html.lenis.lenis-smooth,
html.lenis.lenis-smooth body {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: clip;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

body .gradient-text,
body .accent-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

body .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.status-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: statusPulse 2.4s var(--ease-out) infinite;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Scroll progress — transform-driven so it never triggers layout */
body #scroll-progress {
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: none;
  z-index: 10003;
  transition: none;
}

/* Trailing cursor ring (fine pointers only; native cursor stays) */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid var(--line-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10004;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.3s ease, width 0.35s var(--ease-out),
    height 0.35s var(--ease-out), margin 0.35s var(--ease-out),
    background-color 0.35s ease, border-color 0.35s ease;
}
.cursor-ring.is-visible {
  opacity: 1;
}
.cursor-ring.is-hovering {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: var(--brand);
  background-color: var(--brand-soft);
}
@media (hover: none), (pointer: coarse) {
  .cursor-ring {
    display: none;
  }
}

/* ---------- Scroll reveal ----------------------------------------------- */
.reveal {
  transition: opacity 0.9s var(--ease-out) var(--reveal-delay, 0ms),
    transform 0.9s var(--ease-out) var(--reveal-delay, 0ms),
    filter 0.9s var(--ease-out) var(--reveal-delay, 0ms) !important;
}
.reveal:not(.is-in) {
  opacity: 0 !important;
  transform: translate3d(0, 28px, 0) !important;
  filter: blur(6px) !important;
}

/* ---------- Shared buttons ---------------------------------------------- */
#home .btn-hire,
#about .cta-button.primary,
#schedule .schedule-button,
#contact .form-submit,
body .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px -10px rgba(34, 211, 238, 0.6);
  transform: none;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
#home .btn-hire:hover,
#about .cta-button.primary:hover,
#schedule .schedule-button:hover,
#contact .form-submit:hover:not(:disabled),
body .nav-cta:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--brand-ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(34, 211, 238, 0.75);
}

#home .btn-projects,
#about .cta-button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--line-hover);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    color 0.25s ease, transform 0.3s var(--ease-out);
}
#home .btn-projects:hover,
#about .cta-button.secondary:hover {
  border-color: var(--line-accent);
  background: var(--brand-soft);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: none;
}

#home .btn-hire::before,
#home .btn-projects::before,
#about .cta-button::before,
#schedule .schedule-button::before {
  display: none;
}

#home .btn-hire i,
#about .cta-button i,
#schedule .schedule-button i,
body .nav-cta i {
  font-size: 0.8em;
  transition: transform 0.3s var(--ease-out);
}
#home .btn-hire:hover i,
#about .cta-button:hover i,
#schedule .schedule-button:hover i,
body .nav-cta:hover i {
  transform: translateX(3px);
}

/* ---------- Navbar ------------------------------------------------------ */
body[data-theme] .horizontal-navbar {
  height: var(--nav-h);
  padding: 0;
  display: block;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}
body[data-theme] .horizontal-navbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

body[data-theme] .horizontal-navbar .logo-monogram {
  display: grid;
  place-items: center;
  padding: 0;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  font-size: 1.05rem !important;
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(34, 211, 238, 0.6);
  transition: transform 0.3s var(--ease-out);
}
body[data-theme] .horizontal-navbar .logo-monogram:hover {
  transform: rotate(-6deg) scale(1.04);
}
body[data-theme] .horizontal-navbar .logo-monogram::after {
  display: none;
}

body[data-theme] .horizontal-navbar .nav-links {
  gap: 0.15rem;
}

body[data-theme] .horizontal-navbar .nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}
body[data-theme] .horizontal-navbar .nav-links a::after {
  display: none;
}
body[data-theme] .horizontal-navbar .nav-links a:hover {
  color: var(--ink);
  background: var(--surface-hover);
}
body[data-theme] .horizontal-navbar .nav-links a.active {
  color: var(--brand);
  background: var(--brand-soft);
}

body[data-theme] .theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 1rem;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
body[data-theme] .theme-toggle:hover {
  transform: none;
  color: var(--brand);
  border-color: var(--line-accent);
  background: var(--brand-soft);
}
body[data-theme] .theme-toggle i {
  transition: transform 0.5s var(--ease-out);
}
body[data-theme] .theme-toggle:hover i {
  transform: rotate(45deg);
}

body .nav-cta {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  body[data-theme] .horizontal-navbar .nav-links a {
    padding: 0.45rem 0.6rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  body {
    --nav-h: 64px;
  }
  body .nav-cta {
    display: none;
  }
  body[data-theme] .horizontal-navbar {
    height: var(--nav-h);
    padding: 0;
  }
  body[data-theme] .horizontal-navbar .nav-links {
    top: var(--nav-h);
    gap: 0;
    padding: 0.5rem;
    border-bottom: 1px solid var(--line);
  }
  body[data-theme] .horizontal-navbar .nav-links a {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    border-bottom: 0;
    font-size: 1rem;
    color: var(--ink-2);
  }
  body[data-theme] .mobile-menu-toggle {
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-size: 1.1rem;
  }
}

/* ---------- Hero -------------------------------------------------------- */
#home.hero {
  min-height: calc(100svh - var(--nav-h));
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
}

/* Light theme: clean canvas instead of the dark tech photo + particles */
body.light-mode #home.hero {
  background: radial-gradient(
      900px 560px at 82% 40%,
      rgba(8, 145, 178, 0.14),
      transparent 62%
    ),
    radial-gradient(700px 500px at 8% 95%, rgba(124, 58, 237, 0.08), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef5fa 100%);
}
body.light-mode #home.hero::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: radial-gradient(rgba(15, 23, 42, 0.09) 1px, transparent 1px)
    0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000, transparent 75%);
  animation: none;
}
body.light-mode #home.hero::after {
  display: none;
}
body.light-mode #home .hero-welcome,
body.light-mode #home .hero-highlights span,
body.light-mode #home .btn-projects {
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
body.light-mode #home .hero-floating-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.35);
}
body.light-mode #home .hero-image-wrapper {
  filter: drop-shadow(0 30px 50px rgba(8, 145, 178, 0.18));
}

#home .hero-container {
  max-width: var(--container);
  gap: clamp(2.5rem, 6vw, 5rem);
}

#home .hero-left {
  gap: 1.6rem;
}

#home .hero-welcome {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#home .hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
}

#home .hero-role {
  display: inline;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#home .hero-role::after {
  display: none;
}

#home .hero-description {
  max-width: 36em;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.75;
  color: var(--ink-2);
  opacity: 1;
}
#home .hero-description strong {
  color: var(--ink);
  font-weight: 600;
}

#home .hero-highlights {
  gap: 0.6rem;
}
#home .hero-highlights span {
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: none;
  color: var(--muted);
  font-size: 0.88rem;
}
#home .hero-highlights strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink);
}

#home .hero-buttons {
  gap: 0.75rem;
  margin-top: 0.4rem;
  align-items: center;
}

#home .btn-resume {
  min-height: 48px;
  padding: 0.8rem 0.6rem;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-hover);
  text-underline-offset: 6px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
#home .btn-resume:hover {
  transform: none;
  background: none;
  color: var(--brand);
  text-decoration-color: var(--brand);
}

#home .hero-floating-card {
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  #home .hero-left > * {
    animation: heroRise 0.9s var(--ease-out) both;
  }
  #home .hero-left > :nth-child(2) { animation-delay: 0.08s; }
  #home .hero-left > :nth-child(3) { animation-delay: 0.16s; }
  #home .hero-left > :nth-child(4) { animation-delay: 0.24s; }
  #home .hero-left > :nth-child(5) { animation-delay: 0.32s; }
  #home .hero-right {
    animation: heroScale 1.1s var(--ease-out) 0.1s both;
  }
}

@keyframes heroRise {
  from { opacity: 0; transform: translate3d(0, 24px, 0); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes heroScale {
  from { opacity: 0; transform: scale(0.94); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 480px) {
  #home .hero-buttons .btn-hire,
  #home .hero-buttons .btn-projects {
    flex: 1 1 100%;
  }
  #home .hero-buttons .btn-resume {
    width: auto;
    height: auto;
    max-height: none;
  }
}

/* ---------- Section frame ----------------------------------------------- */
#about.about,
#experience.experience-section,
#skills.skills-section,
#services.services,
#portfolio.portfolio,
#schedule.schedule {
  max-width: none;
  margin: 0;
  padding: var(--section-y) 0;
  min-height: 0;
  text-align: left;
  background: transparent;
  color: var(--ink-2);
}

#experience.experience-section,
#services.services {
  background: var(--band);
  border-block: 1px solid var(--line);
}

:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact)::before,
:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact)::after {
  display: none;
}

:is(#about, #experience, #skills, #services, #portfolio, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) .section-heading-block {
  max-width: 760px;
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  text-align: left;
}

:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) h2 {
  margin: 0;
  padding: 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: left;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) h2::after,
:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) h2::before {
  display: none;
}
:is(#about, #experience, #skills, #services, #portfolio, #schedule, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) h2 .gradient-text {
  -webkit-text-fill-color: transparent;
}

:is(#about, #experience, #skills, #services, #portfolio, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) .section-intro {
  max-width: 38em;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  opacity: 1;
}

/* Card base + pointer spotlight */
:is(#experience, #skills, #services, #portfolio, #tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact) .spotlight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
:is(#experience, #skills, #services, #portfolio, #tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact) .spotlight::before {
  display: none;
}
:is(#experience, #skills, #services, #portfolio, #tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact) .spotlight::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: inherit;
  background: radial-gradient(
    480px circle at var(--mx, 50%) var(--my, 0%),
    var(--spot),
    transparent 45%
  );
  background-size: auto;
  opacity: 0;
  animation: none;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}
:is(#experience, #skills, #services, #portfolio, #tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact) .spotlight:hover::after {
  opacity: 1;
}

/* ---------- About ------------------------------------------------------- */
#about .about-container {
  max-width: none;
  padding: 0;
}

#about .about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  max-width: none;
  margin: 0;
  padding: 0;
}

#about .about-left {
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

#about .profile-card {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
#about .profile-card::after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 22, 0.65));
  pointer-events: none;
}

#about .profile-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center 20%;
  box-shadow: none;
  filter: none;
  transition: transform 0.9s var(--ease-out);
}
#about .profile-card:hover .profile-image {
  transform: scale(1.04);
  box-shadow: none;
}

#about .profile-badge {
  position: absolute;
  top: auto;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transform: none;
  animation: none;
}

#about .stats-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#about .stat-card {
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.3s var(--ease-out);
}
#about .stat-card::before {
  display: none;
}
#about .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  box-shadow: none;
}
#about .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1rem;
  box-shadow: none;
}
#about .stat-card:hover .stat-icon {
  transform: none;
}
#about .stat-content h3 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}
#about .stat-content p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 1;
}

#about .about-right {
  text-align: left;
  font-weight: 400;
  cursor: auto;
  box-shadow: none;
  margin: 0;
  overflow: visible;
}

#about .lead-text {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: left;
}
#about .lead-text::before,
#about .lead-text::after {
  display: none;
}
#about .lead-text .accent-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

#about .about-description {
  margin: 1.5rem 0 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
#about .description-preview,
#about .description-full p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-2);
  text-align: left;
  opacity: 1;
}
#about .description-full strong,
#about .description-preview strong {
  color: var(--ink);
  font-weight: 600;
}

/* Smooth auto-height expand via grid rows */
#about .description-full {
  display: grid;
  grid-template-rows: 0fr;
  max-height: none;
  margin: 0;
  opacity: 0;
  overflow: visible;
  transition: grid-template-rows 0.55s var(--ease-out), opacity 0.4s ease;
}
#about .description-full.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}
#about .description-full__inner {
  min-height: 0;
  overflow: hidden;
}
#about .description-full p {
  margin-top: 1rem;
}

#about .read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  padding: 0.25rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
#about .read-more-btn::before {
  display: none;
}
#about .read-more-btn:hover {
  transform: none;
  box-shadow: none;
  color: var(--brand-hover);
}
#about .read-more-icon {
  font-size: 0.75rem;
  transition: transform 0.4s var(--ease-out);
}
#about .read-more-btn.is-open .read-more-icon {
  transform: rotate(180deg);
}

#about .features-list--v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#about .features-list--v2 .feature-item {
  --feat: var(--cyan);
  --feat-soft: var(--cyan-soft);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
  transform: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
#about .features-list--v2 .feature-item[data-accent="violet"] { --feat: var(--violet); --feat-soft: var(--violet-soft); }
#about .features-list--v2 .feature-item[data-accent="emerald"] { --feat: var(--emerald); --feat-soft: var(--emerald-soft); }
#about .features-list--v2 .feature-item[data-accent="amber"] { --feat: var(--amber); --feat-soft: var(--amber-soft); }
#about .features-list--v2 .feature-item::before,
#about .features-list--v2 .feature-item::after {
  display: none;
}
#about .features-list--v2 .feature-item:hover {
  transform: none;
  border-color: var(--feat);
  background: var(--feat-soft);
  box-shadow: none;
}
#about .features-list--v2 .feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 10px;
  background: var(--feat-soft);
  color: var(--feat);
  font-size: 0.95rem;
  box-shadow: none;
}
#about .features-list--v2 .feature-icon i {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
#about .features-list--v2 .feature-item:hover .feature-icon {
  transform: rotate(-6deg);
}
#about .features-list--v2 .feature-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
#about .features-list--v2 .feature-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
#about .features-list--v2 .feature-sub {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

#about .cta-buttons--v2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

@media (max-width: 960px) {
  #about .about-grid {
    grid-template-columns: 1fr;
  }
  #about .about-left {
    position: static;
    max-width: 420px;
  }
}
@media (max-width: 520px) {
  #about .features-list--v2 {
    grid-template-columns: 1fr;
  }
  #about .cta-buttons--v2 .cta-button {
    flex: 1 1 100%;
  }
}

/* ---------- Experience -------------------------------------------------- */
#experience .experience-grid {
  max-width: none;
  margin: 0;
  gap: 1.25rem;
}

#experience .experience-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: border-color 0.3s ease, box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
}
#experience .experience-card--featured {
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--line-accent), var(--card-shadow);
}
#experience .experience-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  box-shadow: var(--card-shadow-hover);
}

#experience .experience-topline {
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--brand);
}
#experience .experience-period {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
#experience .experience-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--muted);
  opacity: 1;
}
#experience .experience-card h3 {
  margin: 1.25rem 0 0.2rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
#experience .experience-company {
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand);
}
#experience .experience-card > p:not(.experience-company) {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-2);
  opacity: 1;
}
#experience .experience-tags {
  gap: 0.4rem;
  margin-top: 1.4rem;
}
#experience .experience-tags span {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 0.3s ease, color 0.3s ease;
}
#experience .experience-card:hover .experience-tags span {
  border-color: var(--line-hover);
  color: var(--ink);
}

/* ---------- Skills ------------------------------------------------------ */
#skills .skills-container {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: none;
  margin: 0;
  padding: 0;
}
#skills .skill-category { grid-column: span 2; }
#skills .skill-category:nth-child(-n + 2) { grid-column: span 3; }

#skills .skill-category {
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
}
#skills .skill-category:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  box-shadow: var(--card-shadow-hover);
}
#skills .skill-category-ai {
  background: linear-gradient(160deg, var(--violet-soft), transparent 55%),
    var(--surface);
}

#skills .skill-category h3 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  -webkit-text-fill-color: currentColor;
  background: none;
}
#skills .skill-category h3 i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.9rem;
  -webkit-text-fill-color: currentColor;
}
#skills .skill-category-ai h3 i {
  background: var(--violet-soft);
  color: var(--violet);
}
#skills .ai-badge,
#skills .skill-exp {
  margin-left: auto;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  -webkit-text-fill-color: currentColor;
  box-shadow: none;
  animation: none;
}
#skills .ai-badge {
  border-color: transparent;
  background: var(--violet-soft);
  color: var(--violet);
}

#skills .skill-item {
  margin: 0 0 1rem;
}
#skills .skill-item:last-child {
  margin-bottom: 0;
}
#skills .skill-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
#skills .skill-info span:first-child {
  font-weight: 500;
  color: var(--ink-2);
}
#skills .skill-info span:last-child {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
#skills .skill-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  box-shadow: none;
}
#skills .skill-progress {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: none;
  transition: width 1.4s var(--ease-out);
}
#skills .skill-progress::after {
  display: none;
}

@media (max-width: 1024px) {
  #skills .skills-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #skills .skill-category,
  #skills .skill-category:nth-child(-n + 2) {
    grid-column: span 1;
  }
  #skills .skill-category:last-child {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  #skills .skills-container {
    grid-template-columns: 1fr;
  }
  #skills .skill-category:last-child {
    grid-column: span 1;
  }
}

/* ---------- Services ---------------------------------------------------- */
#services .services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: none;
  margin: 0;
  padding: 0;
}

#services .service-item {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
}
#services .service-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  background: var(--surface-hover);
  box-shadow: var(--card-shadow-hover);
}

#services .service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#services .service-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.05rem;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, transform 0.4s var(--ease-out);
}
#services .service-item:hover .service-icon {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  transform: rotate(-6deg);
}
#services .service-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

#services .service-item h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  text-shadow: none;
  text-align: left;
}
#services .service-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-2);
  text-align: left;
  opacity: 1;
}

#services .service-item.service-featured {
  margin: 0;
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(160deg, var(--violet-soft), transparent 60%),
    var(--surface);
}
#services .service-item.service-featured:hover {
  border-color: var(--violet);
}
#services .service-featured .service-icon {
  background: var(--violet-soft);
  color: var(--violet);
}
#services .service-featured:hover .service-icon {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
#services .service-tag {
  position: static;
  align-self: flex-start;
  margin: 1.25rem 0 -0.6rem;
  padding: 0.25rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  transform: none;
  animation: none;
}

@media (max-width: 960px) {
  #services .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  #services .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Portfolio --------------------------------------------------- */
#portfolio .portfolio-heading {
  max-width: none;
  margin: 0 0 2rem;
  align-items: flex-end;
}
#portfolio .portfolio-heading > p {
  max-width: 400px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  opacity: 1;
}

#portfolio .portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  max-width: none;
  margin: 0 0 2rem;
  padding: 0;
}
#portfolio .filter-btn {
  min-height: 38px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
  transform: none;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
#portfolio .filter-btn::before,
#portfolio .filter-btn::after {
  display: none;
}
#portfolio .filter-btn:hover {
  transform: none;
  border-color: var(--line-hover);
  background: var(--surface-hover);
  color: var(--ink);
  box-shadow: none;
}
#portfolio .filter-btn.active,
#portfolio .filter-btn.active:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--background-solid);
  box-shadow: none;
}

#portfolio .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: none;
  margin: 0;
  padding: 0;
}

#portfolio .portfolio-item {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  cursor: default;
  perspective: none;
  animation: none;
  transition: border-color 0.3s ease, box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
}
#portfolio .portfolio-item[hidden] {
  display: none !important;
}
#portfolio .portfolio-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  box-shadow: var(--card-shadow-hover);
  animation: none;
}

#portfolio .portfolio-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0b1222;
}
#portfolio .portfolio-media img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
  filter: none;
  transform: none;
  transition: transform 0.9s var(--ease-out);
}
#portfolio .portfolio-item:hover .portfolio-media img {
  transform: scale(1.04);
}

/* Phone screenshots: show as a device peeking up from the frame */
#portfolio .portfolio-media--device {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 1.5rem;
  background: radial-gradient(
      120% 90% at 50% 100%,
      rgba(34, 211, 238, 0.16),
      transparent 70%
    ),
    #0b1222;
}
#portfolio .portfolio-media--device img {
  width: 48%;
  height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.6);
}
#portfolio .portfolio-item:hover .portfolio-media--device img {
  transform: translateY(-6px);
}

#portfolio .portfolio-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
  padding: 1.25rem 1.4rem 1.25rem;
}
#portfolio .portfolio-type {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
#portfolio .portfolio-body h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-align: left;
}
#portfolio .portfolio-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-2);
  text-align: left;
  opacity: 1;
}

/* Featured: the npm package */
#portfolio .portfolio-item--featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
#portfolio .portfolio-item--featured .portfolio-media {
  aspect-ratio: auto;
  min-height: 340px;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  background: #0d1424;
}
/* Product shot: the live crop dialog floating on a soft brand backdrop */
#portfolio .portfolio-media--product {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: radial-gradient(
      80% 70% at 20% 10%,
      rgba(34, 211, 238, 0.22),
      transparent 70%
    ),
    radial-gradient(70% 70% at 90% 100%, rgba(167, 139, 250, 0.22), transparent 70%),
    #0d1424;
}
body.light-mode #portfolio .portfolio-media--product {
  background: radial-gradient(
      80% 70% at 20% 10%,
      rgba(8, 145, 178, 0.16),
      transparent 70%
    ),
    radial-gradient(70% 70% at 90% 100%, rgba(124, 58, 237, 0.14), transparent 70%),
    #eef2f7;
}
#portfolio .portfolio-media--product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1760 / 1200;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08),
    0 24px 50px -18px rgba(0, 0, 0, 0.55);
  transform-origin: 50% 60%;
}
#portfolio .portfolio-item:hover .portfolio-media--product img {
  transform: translateY(-4px) scale(1.02);
}
#portfolio .portfolio-item--featured .portfolio-body {
  justify-content: center;
  gap: 0.6rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
#portfolio .portfolio-item--featured h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

#portfolio .portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
#portfolio .portfolio-meta i {
  margin-right: 0.3rem;
  color: var(--brand);
  font-size: 0.7rem;
}

#portfolio .portfolio-install {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 16, 0.35);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: nowrap;
}
#portfolio .portfolio-install::before {
  content: "$ ";
  color: var(--brand);
}
body.light-mode #portfolio .portfolio-install {
  background: #f1f5f9;
}

#portfolio .portfolio-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: auto 0 0;
  padding-top: 0.75rem;
}
#portfolio .portfolio-link-btn i {
  color: inherit;
}
#portfolio .portfolio-link-btn {
  flex: 0 0 auto;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-hover);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: none;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}
#portfolio .portfolio-link-btn:hover,
#portfolio .portfolio-link-btn:focus-visible {
  transform: none;
  border-color: var(--line-accent);
  background: var(--brand-soft);
  color: var(--ink);
  box-shadow: none;
}
#portfolio .portfolio-link-btn--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}
#portfolio .portfolio-link-btn--primary:hover,
#portfolio .portfolio-link-btn--primary:focus-visible {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  color: var(--brand-ink);
}

/* Light mode: the soft tint was too faint to read as a hover state, so use a solid brand fill. */
body.light-mode #portfolio .portfolio-link-btn:hover,
body.light-mode #portfolio .portfolio-link-btn:focus-visible {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}
body.light-mode #portfolio .portfolio-link-btn:hover i,
body.light-mode #portfolio .portfolio-link-btn:focus-visible i {
  color: #ffffff;
}
body.light-mode #portfolio .portfolio-link-btn--primary:hover,
body.light-mode #portfolio .portfolio-link-btn--primary:focus-visible {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}
#portfolio .portfolio-link-btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.85;
}
#portfolio .portfolio-link-btn[aria-disabled="true"]:hover {
  background: var(--surface);
  border-color: var(--line-hover);
  color: var(--ink);
}
body.light-mode #portfolio .portfolio-link-btn[aria-disabled="true"]:hover,
body.light-mode #portfolio .portfolio-link-btn[aria-disabled="true"]:hover i {
  background: var(--surface);
  border-color: var(--line-hover);
  color: var(--ink);
}

@media (max-width: 960px) {
  #portfolio .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #portfolio .portfolio-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  #portfolio .portfolio-item--featured {
    grid-template-columns: 1fr;
  }
  #portfolio .portfolio-item--featured .portfolio-media {
    min-height: 0;
    aspect-ratio: 16 / 11;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  #portfolio .portfolio-grid {
    grid-template-columns: 1fr;
  }
  #portfolio .portfolio-item--featured {
    grid-column: span 1;
  }
  #portfolio .portfolio-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  #portfolio .filter-btn {
    flex: none;
  }
}

/* Screenshot covers that open the gallery */
#portfolio button.portfolio-media {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #0b1222;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
#portfolio .portfolio-item--featured button.portfolio-media {
  border-bottom: 0;
  border-right: 1px solid var(--line);
}
#portfolio button.portfolio-media--product {
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
#portfolio button.portfolio-media--product.portfolio-media--shot {
  place-items: start;
  align-content: center;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
#portfolio .portfolio-media--product.portfolio-media--shot img {
  position: absolute;
  top: 20%;
  left: 6%;
  width: 80%;
  aspect-ratio: auto;
  object-position: top center;
}
/* Second screen layered over the corner of the first */
#portfolio .portfolio-media--shot img.portfolio-media__layer {
  top: 45%;
  right: 6%;
  left: auto;
  width: 66%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1),
    0 30px 60px -18px rgba(0, 0, 0, 0.65);
}
#portfolio .portfolio-item:hover .portfolio-media--shot img.portfolio-media__layer {
  transform: translateY(-8px) scale(1.02);
}
#portfolio .portfolio-count {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}
#portfolio .portfolio-item:hover .portfolio-count {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}
#portfolio button.portfolio-link-btn {
  font-family: inherit;
  cursor: pointer;
}

@media (max-width: 760px) {
  #portfolio button.portfolio-media--product.portfolio-media--shot {
    place-items: center;
    padding-bottom: clamp(1.25rem, 3vw, 2.25rem);
  }
  #portfolio .portfolio-media--product.portfolio-media--shot img {
    position: static;
    width: 100%;
  }
  #portfolio .portfolio-media--shot img.portfolio-media__layer {
    display: none;
  }
  #portfolio .portfolio-item--featured button.portfolio-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Lightbox ---------------------------------------------------- */
.lightbox {
  width: min(1200px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.lightbox[open] {
  display: flex;
  flex-direction: column;
  animation: lightboxIn 0.45s var(--ease-out);
}
.lightbox::backdrop {
  background: rgba(2, 6, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightboxFade 0.3s ease;
}
@keyframes lightboxIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.lightbox__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.lightbox__counter {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.lightbox__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease;
}
.lightbox__close:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem 4rem;
  background: #0b1222;
  touch-action: pan-y;
}
body.light-mode .lightbox__stage {
  background: #eef2f7;
}
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  min-height: 0;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 2rem - 260px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18),
    0 24px 60px -24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.5s var(--ease-out);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__img.is-ready {
  opacity: 1;
  transform: none;
}
.lightbox__caption {
  font-size: 0.9rem;
  color: var(--ink-2);
  text-align: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-hover);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}
.lightbox__nav:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}
.lightbox__nav--prev { left: 0.85rem; }
.lightbox__nav--next { right: 0.85rem; }

.lightbox__thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}
.lightbox__thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  overflow: hidden;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.lightbox__thumb:hover {
  opacity: 0.9;
}
.lightbox__thumb[aria-current="true"] {
  border-color: var(--brand);
  opacity: 1;
}
.lightbox.is-single :is(.lightbox__nav, .lightbox__thumbs) {
  display: none;
}

@media (max-width: 640px) {
  .lightbox__stage {
    padding: 0.75rem;
  }
  .lightbox__nav {
    top: auto;
    bottom: 0.75rem;
    width: 38px;
    height: 38px;
    transform: none;
  }
  .lightbox__img {
    max-height: calc(100dvh - 2rem - 240px);
  }
  .lightbox__figure {
    padding-bottom: 3rem;
  }
  .lightbox__thumb {
    width: 72px;
  }
}

/* View-transition timing for the filter reflow */
::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Collaborate CTA --------------------------------------------- */
#schedule .cta-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem 3rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(
      600px circle at 0% 0%,
      rgba(34, 211, 238, 0.14),
      transparent 60%
    ),
    radial-gradient(
      520px circle at 100% 100%,
      rgba(167, 139, 250, 0.16),
      transparent 60%
    ),
    var(--surface-raised);
  box-shadow: var(--card-shadow);
}
#schedule .cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 50%, #000, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

#schedule .cta-panel h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin-bottom: 0.9rem;
}
#schedule .cta-panel p:not(.eyebrow) {
  max-width: 34em;
  margin: 0;
  padding: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-2);
  text-align: left;
  opacity: 1;
}
#schedule .cta-panel .eyebrow {
  max-width: none;
  margin: 0 0 0.9rem;
  padding: 0;
  font-size: 0.75rem;
  color: var(--ink-2);
}

#schedule .cta-panel__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}
#schedule .schedule-button {
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}
#schedule .cta-panel__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
#schedule .cta-panel__mail:hover {
  color: var(--brand);
}

@media (max-width: 768px) {
  #schedule .cta-panel {
    grid-template-columns: 1fr;
  }
  #schedule .cta-panel__actions {
    align-items: flex-start;
  }
}

/* ---------- Lower sections: shared frame -------------------------------- */
:is(#tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) {
  max-width: none;
  margin: 0;
  padding: var(--section-y) 0;
  min-height: 0;
  border: 0;
  text-align: left;
  background: transparent;
  color: var(--ink-2);
}
:is(#process, #achievements, #case-studies, #fun-facts, #contact) {
  background: var(--band);
  border-block: 1px solid var(--line);
}

/* Shared card look + one calm hover for every lower card */
:is(#tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact)
  :is(.tool-item, .achievement-card, .expertise-card, .case-study-item, .blog-item, .fact-item, .contact-card, .contact-form) {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  text-align: left;
  transform: none;
  animation: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.3s ease, box-shadow 0.4s ease,
    background-color 0.3s ease, transform 0.4s var(--ease-out);
}
:is(#tools, #achievements, #expertise, #case-studies, #blog, #fun-facts, #contact)
  :is(.tool-item, .achievement-card, .expertise-card, .case-study-item, .blog-item, .fact-item, .contact-card):hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  background: var(--surface);
  box-shadow: var(--card-shadow-hover);
}

/* Icon chip used across the lower cards */
:is(#achievements .achievement-icon, #expertise .expertise-icon, #contact .contact-card > i) {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 0 1.25rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.05rem;
  box-shadow: none;
  transform: none;
  -webkit-text-fill-color: currentColor;
  transition: background-color 0.3s ease, color 0.3s ease,
    transform 0.4s var(--ease-out);
}
:is(#achievements .achievement-icon, #expertise .expertise-icon) i {
  color: inherit;
  font-size: inherit;
  background: none;
  -webkit-text-fill-color: currentColor;
}
:is(#achievements .achievement-card, #expertise .expertise-card):hover
  :is(.achievement-icon, .expertise-icon) {
  background: var(--brand);
  color: var(--brand-ink);
  transform: rotate(-6deg);
}

:is(#achievements, #expertise, #case-studies, #blog) h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  text-align: left;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
:is(#achievements, #expertise, #case-studies, #blog) :is(.achievement-card, .expertise-card, .case-study-content, .blog-item) p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-2);
  text-align: left;
  opacity: 1;
}

:is(#achievements, #expertise, #blog, #fun-facts) :is(.achievements-grid, .expertise-grid, .blog-grid, .facts-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: none;
  margin: 0;
  padding: 0;
}
:is(#achievements, #expertise, #blog) :is(.achievement-card, .expertise-card, .blog-item) {
  padding: 1.75rem;
}

/* ---------- Tools ------------------------------------------------------- */
#tools .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
  max-width: none;
  margin: 0;
  padding: 0;
}
#tools .tool-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  height: auto;
  min-height: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  box-shadow: none;
}
#tools .tool-item:hover {
  transform: translateY(-2px);
  box-shadow: none;
}
#tools .tool-item i {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 9px;
  background: var(--brand-soft);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--brand);
  -webkit-text-fill-color: currentColor;
  font-size: 0.95rem;
  transform: none;
}
#tools .tool-ai i {
  background: var(--violet-soft);
  color: var(--violet);
}
#tools .tool-item span {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-2);
  text-align: left;
  transition: color 0.2s ease;
}
#tools .tool-item:hover span {
  color: var(--ink);
}

/* ---------- Process ----------------------------------------------------- */
#process .process-stepper {
  max-width: none;
  margin: 0;
}

/* ---------- Stats: one panel with dividers ------------------------------ */
#stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
#stats .stat-item {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  transform: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 0.3s ease;
}
#stats .stat-item:first-child {
  border-left: 0;
}
#stats .stat-item::before,
#stats .stat-item::after {
  display: none;
}
#stats .stat-item:hover {
  transform: none;
  background: var(--surface-hover);
  box-shadow: none;
}
#stats .stat-item h3 {
  display: inline-block;
  margin: 0 0 0.6rem;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}
#stats .stat-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Expertise --------------------------------------------------- */
#expertise .expertise-card.expertise-featured {
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(160deg, var(--violet-soft), transparent 60%),
    var(--surface);
}
#expertise .expertise-card.expertise-featured:hover {
  border-color: var(--violet);
}
#expertise .expertise-featured .expertise-icon {
  background: var(--violet-soft);
  color: var(--violet);
}
#expertise .expertise-featured:hover .expertise-icon {
  background: var(--violet);
  color: #fff;
}
#expertise .expertise-featured h3 {
  color: var(--ink);
}
#expertise .expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}
#expertise .expertise-tags .tag,
#expertise .expertise-card:hover .expertise-tags .tag {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  transform: none;
}
#expertise .expertise-card:hover .expertise-tags .tag {
  border-color: var(--line-hover);
  color: var(--ink);
}

/* ---------- Case studies: card grid ------------------------------------- */
#case-studies .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
#case-studies .section-heading-block {
  grid-column: 1 / -1;
}
#case-studies .case-study-item {
  display: flex;
  flex-direction: column;
  width: auto;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
#case-studies .case-study-image {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #0b1222;
  box-shadow: none;
}
#case-studies .case-study-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
  transform: none;
  transition: transform 0.9s var(--ease-out);
}
#case-studies .case-study-item:hover .case-study-image img {
  transform: scale(1.04);
}
#case-studies .case-study-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.4rem 1.5rem;
  text-align: left;
}
#case-studies .case-study-content a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-top: auto;
  padding: 1rem 0 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transform: none;
}
#case-studies .case-study-content a::before {
  display: none;
}
#case-studies .case-study-content a::after {
  content: "→";
  position: static;
  width: auto;
  height: auto;
  background: none;
  transition: transform 0.3s var(--ease-out);
}
#case-studies .case-study-content a:hover {
  color: var(--brand-hover);
  background: none;
  transform: none;
}
#case-studies .case-study-content a:hover::after {
  transform: translateX(4px);
}

/* ---------- Fun facts --------------------------------------------------- */
#fun-facts .fact-item {
  --feat: var(--cyan);
  --feat-soft: var(--cyan-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.5rem 1.6rem;
}
#fun-facts .fact-item[data-accent="violet"] { --feat: var(--violet); --feat-soft: var(--violet-soft); }
#fun-facts .fact-item[data-accent="amber"] { --feat: var(--amber); --feat-soft: var(--amber-soft); }
#fun-facts .fact-item[data-accent="emerald"] { --feat: var(--emerald); --feat-soft: var(--emerald-soft); }
#fun-facts .fact-item[data-accent="indigo"] { --feat: #818cf8; --feat-soft: rgba(129, 140, 248, 0.13); }
#fun-facts .fact-item[data-accent="pink"] { --feat: #f472b6; --feat-soft: rgba(244, 114, 182, 0.12); }
body.light-mode #fun-facts .fact-item[data-accent="indigo"] { --feat: #4f46e5; }
body.light-mode #fun-facts .fact-item[data-accent="pink"] { --feat: #db2777; }
#fun-facts .fact-item:hover {
  border-color: var(--feat);
}
#fun-facts .fact-item__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 0 0.9rem;
  border-radius: 11px;
  background: var(--feat-soft);
  color: var(--feat);
  font-size: 1rem;
  box-shadow: none;
  transform: none;
}
#fun-facts .fact-item__value,
#fun-facts .fact-item__value span {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}
#fun-facts .fact-item__value .fact-item__suffix {
  margin-left: 0.1em;
  font-size: 0.65em;
  color: var(--feat);
}
#fun-facts .fact-item__label {
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 1;
}

/* ---------- FAQ: heading beside the accordion --------------------------- */
#faq .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
#faq .section-heading-block {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  margin: 0;
}
#faq .faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#faq .faq-item {
  margin: 0;
  padding: 0;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
  transform: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
#faq .faq-item:hover {
  transform: none;
  border-color: var(--line-hover);
  box-shadow: none;
}
#faq .faq-item[open] {
  border-color: var(--line-accent);
}
#faq .faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  list-style: none;
  cursor: pointer;
  background: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}
#faq .faq-item summary::-webkit-details-marker {
  display: none;
}
#faq .faq-item summary::before {
  display: none;
}
#faq .faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.35s var(--ease-out), background-color 0.25s ease;
}
#faq .faq-item[open] summary::after {
  transform: rotate(45deg);
  background: var(--brand-soft);
}
#faq .faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-2);
  text-align: left;
}
#faq .faq-item[open] p {
  animation: faqIn 0.45s var(--ease-out);
}
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Contact ----------------------------------------------------- */
#contact .contact-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.25rem;
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}
#contact .contact-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}
#contact .contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.25rem;
  min-width: 0;
  padding: 1.4rem;
}
#contact .contact-card::before {
  display: none;
}
#contact .contact-card > i {
  width: 40px;
  height: 40px;
  margin: 0 0 0.9rem;
  font-size: 1rem;
}
#contact .contact-card:hover > i {
  background: var(--brand);
  color: var(--brand-ink);
}
#contact .contact-card h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  -webkit-text-fill-color: currentColor;
}
#contact .contact-card a,
#contact .contact-card p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  text-align: left;
}
#contact .contact-card a:hover {
  color: var(--brand);
}
#contact .copy-email-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: none;
}
#contact .copy-email-btn i {
  -webkit-text-fill-color: currentColor !important;
  color: inherit;
}
#contact .copy-email-btn:hover,
#contact .copy-email-btn.is-copied {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  transform: none;
}

#contact .contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}
#contact .form-group {
  margin: 0;
}
#contact .contact-form input,
#contact .contact-form textarea {
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 6, 16, 0.3);
  box-shadow: none;
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}
body.light-mode #contact .contact-form input,
body.light-mode #contact .contact-form textarea {
  background: #f8fafc;
}
#contact .contact-form textarea {
  min-height: 150px;
  resize: vertical;
}
#contact .contact-form input::placeholder,
#contact .contact-form textarea::placeholder {
  color: var(--muted);
}
#contact .contact-form input:hover,
#contact .contact-form textarea:hover {
  border-color: var(--line-hover);
}
#contact .contact-form input:focus,
#contact .contact-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
#contact .form-submit::before {
  display: none;
}
#contact .form-submit:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}
#contact .form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  text-align: left;
}

/* ---------- Lower sections: responsive --------------------------------- */
@media (max-width: 960px) {
  :is(#achievements, #expertise, #blog, #fun-facts) :is(.achievements-grid, .expertise-grid, .blog-grid, .facts-grid),
  #case-studies .container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #faq .container,
  #contact .contact-container {
    grid-template-columns: 1fr;
  }
  #faq .section-heading-block {
    position: static;
  }
}
@media (max-width: 768px) {
  #stats .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #stats .stat-item:nth-child(3) {
    border-left: 0;
  }
  #stats .stat-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  :is(#achievements, #expertise, #blog, #fun-facts) :is(.achievements-grid, .expertise-grid, .blog-grid, .facts-grid),
  #case-studies .container {
    grid-template-columns: 1fr;
  }
  #tools .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  #contact .contact-info {
    grid-template-columns: 1fr;
  }
}

/* ---------- Light theme: image panels ----------------------------------- */
body.light-mode #portfolio .portfolio-media,
body.light-mode #portfolio button.portfolio-media,
body.light-mode #case-studies .case-study-image {
  background: #eef2f7;
}
body.light-mode #portfolio .portfolio-media--device {
  background: radial-gradient(
      120% 90% at 50% 100%,
      rgba(8, 145, 178, 0.16),
      transparent 70%
    ),
    #eef2f7;
}
body.light-mode #portfolio .portfolio-media--device img {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 -10px 40px -14px rgba(15, 23, 42, 0.3);
}

/* ---------- Footer ------------------------------------------------------ */
body footer.site-footer {
  padding-top: clamp(3rem, 6vw, 4rem);
  padding-inline: 0;
  border-top: 1px solid var(--line);
  background: var(--background-solid);
  color: var(--muted);
  text-align: left;
}
body footer.site-footer::before {
  display: none;
}
.site-footer .footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.site-footer .logo-monogram {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem !important;
  font-weight: 800;
  text-decoration: none;
}
.site-footer .footer-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.site-footer .footer-role {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-footer .footer-nav a {
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer .footer-nav a:hover {
  color: var(--brand);
}
.site-footer .footer-social {
  display: flex;
  gap: 0.5rem;
}
.site-footer .footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease, transform 0.3s var(--ease-out);
}
.site-footer .footer-social a:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0 2rem;
}
.site-footer .footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .site-footer .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Back to top --------------------------------------------- */
body .back-to-top {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-hover);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 0.95rem;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, visibility 0.3s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.3s var(--ease-out);
}
body .back-to-top:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 14px 30px -12px rgba(34, 211, 238, 0.6);
}

/* ---------- Reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }
  :is(#experience, #skills, #services, #portfolio, #about, #tools, #process, #stats, #achievements, #expertise, #case-studies, #blog, #fun-facts, #faq, #contact) *,
  #home .btn-hire,
  #home .btn-projects {
    transition-duration: 0.01ms !important;
  }
}


/* ---------- Hero portrait: gradient-ring frame with glass chips ---------- */
@property --ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
#home .hero-image-wrapper {
  max-width: 400px;
  aspect-ratio: 4 / 5;
  filter: none;
  overflow: visible;
}
#home .hero-image-border {
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 34px;
  background: conic-gradient(
    from var(--ring-angle),
    var(--brand),
    var(--brand-2),
    transparent 40%,
    var(--brand) 75%,
    var(--brand-2)
  );
  transform: none;
  animation: ringSpin 8s linear infinite;
}
#home .hero-image-border::before {
  content: "";
  position: absolute;
  inset: -26px;
  z-index: -1;
  border-radius: 56px;
  background: radial-gradient(circle at 30% 20%, var(--brand-soft), transparent 60%),
    radial-gradient(circle at 80% 85%, rgba(167, 139, 250, 0.22), transparent 60%);
  filter: blur(22px);
}
#home .hero-image-border::after {
  content: "";
  position: absolute;
  inset: 34px -30px -30px 34px;
  z-index: -2;
  border-radius: 34px;
  border: 1px dashed var(--line-hover);
}
@keyframes ringSpin {
  to { --ring-angle: 360deg; }
}
#home .hero-image {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 31px;
  box-shadow: none;
  animation: none;
}
#home .hero-image:hover {
  transform: none;
  box-shadow: none;
}
#home .hero-floating-card {
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  background: rgba(10, 16, 30, 0.62);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.light-mode #home .hero-floating-card {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.08);
}
#home .hero-floating-card.card-top {
  top: 10%;
  left: -12%;
}
#home .hero-floating-card.card-bottom {
  right: -10%;
  bottom: 24%;
}
#home .hero-floating-card.card-status {
  left: 6%;
  bottom: -3%;
  animation-delay: -3.5s;
}
#home .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: statusPulse 2s ease-out infinite;
}
@keyframes statusPulse {
  to { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #home .hero-image-border,
  #home .status-dot { animation: none; }
}


/* ---------- Hero portrait v2: arch frame over a tinted panel ------------- */
#home .hero-image-wrapper {
  max-width: 380px;
  aspect-ratio: 4 / 5;
}
#home .hero-image-border {
  inset: 0;
  border-radius: 999px 999px 28px 28px;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%);
  animation: none;
  transform: none;
  opacity: 0.9;
}
#home .hero-image-border::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  border-radius: 999px 999px 48px 48px;
  background: radial-gradient(circle at 50% 30%, var(--brand-soft), transparent 70%);
  filter: blur(26px);
}
#home .hero-image-border::after {
  content: "";
  position: absolute;
  inset: auto -34px -26px auto;
  z-index: -2;
  width: 62%;
  height: 46%;
  border-radius: 20px;
  background: radial-gradient(var(--line-hover) 1.4px, transparent 1.6px) 0 0 / 14px 14px;
  border: 0;
}
#home .hero-image {
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-position: 50% 15%;
  border-radius: 999px 999px 22px 22px;
  background: var(--surface-raised);
}
#home .hero-floating-card.card-top { top: 16%; left: -14%; }
#home .hero-floating-card.card-bottom { right: -12%; bottom: 28%; }
#home .hero-floating-card.card-status { left: 50%; bottom: -4%; margin-left: -80px; }

/* ---------- Hero bento: photo tile with stat / status / stack tiles ---------- */
#home .hero-bento {
  width: 100%;
  max-width: 440px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr auto auto;
  gap: 0.85rem;
}
#home .bento-tile {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-raised);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
#home .bento-photo {
  grid-column: 1;
  grid-row: 1 / 4;
  min-height: 340px;
  padding: 0;
  border-color: var(--line-accent);
  box-shadow: 0 30px 60px -28px rgba(8, 145, 178, 0.55), 0 0 0 5px var(--brand-soft);
}
#home .bento-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}
#home .bento-stat {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
}
#home .bento-stat strong {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
#home .bento-stat span {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink-2);
}
#home .bento-stat--accent {
  border: 0;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
}
#home .bento-stat--accent strong,
#home .bento-stat--accent span {
  color: #ffffff;
}
#home .bento-status {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
#home .bento-stack {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.7rem;
}
#home .bento-stack span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
}
#home .bento-stack i {
  color: var(--brand);
}
#home .status-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  animation: statusPulse 2s ease-out infinite;
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #home .status-dot { animation: none; }
}
@media (max-width: 480px) {
  #home .bento-photo { min-height: 280px; }
  #home .bento-stat strong { font-size: 1.7rem; }
}
