/* ============================================
   1. RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   2. CUSTOM PROPERTIES — DARK THEME (default)
   ============================================ */
:root,
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1c1c1c;
    --border: #222222;
    --text-primary: #fafafa;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --nav-bg: rgba(10, 10, 10, 0.6);
    --nav-border: rgba(255, 255, 255, 0.06);
    --badge-bg: rgba(16, 185, 129, 0.1);
    --badge-border: rgba(16, 185, 129, 0.3);
    --badge-text: #34d399;
    --badge-dot: #10b981;
    --shadow-card: rgba(0, 0, 0, 0.3);
    --hero-bg: #0a0a0a;
    --hero-glow-primary: rgba(129, 140, 248, 0.12);
    --hero-glow-secondary: rgba(167, 139, 250, 0.08);
    --hero-surface: rgba(255, 255, 255, 0.03);
    --hero-text-gradient-from: #e0e7ff;
    --hero-text-gradient-to: #c7d2fe;
    --hero-accent-soft: #a5b4fc;
    --hero-border-btn: rgba(255, 255, 255, 0.12);
    --hero-border-btn-hover: rgba(165, 180, 252, 0.4);
}

/* ============================================
   2b. CUSTOM PROPERTIES — LIGHT THEME
   ============================================ */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    --border: #e0e0e0;
    --text-primary: #1a1a2e;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.1);
    --nav-bg: rgba(248, 249, 250, 0.6);
    --nav-border: rgba(0, 0, 0, 0.06);
    --badge-bg: rgba(16, 185, 129, 0.08);
    --badge-border: rgba(16, 185, 129, 0.25);
    --badge-text: #059669;
    --badge-dot: #10b981;
    --shadow-card: rgba(0, 0, 0, 0.08);
    --hero-bg: #f8f9fa;
    --hero-glow-primary: rgba(99, 102, 241, 0.07);
    --hero-glow-secondary: rgba(139, 92, 246, 0.05);
    --hero-surface: rgba(99, 102, 241, 0.02);
    --hero-text-gradient-from: #312e81;
    --hero-text-gradient-to: #4338ca;
    --hero-accent-soft: #6366f1;
    --hero-border-btn: rgba(0, 0, 0, 0.1);
    --hero-border-btn-hover: rgba(99, 102, 241, 0.4);
}

/* ============================================
   2c. SHARED DESIGN TOKENS
   ============================================ */
:root {
    /* Typography — fluid scale */
    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --fs-base: clamp(1rem, 0.925rem + 0.4vw, 1.125rem);
    --fs-md: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    --fs-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --fs-2xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --fs-3xl: clamp(2.5rem, 1.75rem + 3.75vw, 4.5rem);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-section: clamp(4rem, 3rem + 5vw, 8rem);

    /* Layout */
    --container-max: 1100px;
    --container-padding: clamp(1rem, 0.5rem + 2.5vw, 2rem);
    --nav-height: 3.25rem;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   3. LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.section {
    padding-block: var(--space-section);
}

.section__title {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    text-align: center;
}

.section__subtitle {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ============================================
   4. NAVIGATION — compact glass
   ============================================ */
.header {
    position: sticky;
    top: 0.75rem;
    z-index: 1000;
    height: var(--nav-height);
    max-width: 720px;
    margin-inline: auto;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--nav-border);
    border-radius: 999px;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding-inline: 1.25rem;
}

.nav__logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-xs);
    font-weight: 600;
    display: flex;
    gap: 0.1em;
    background: linear-gradient(90deg, #6366f1, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter var(--transition-fast);
}

.nav__logo-bracket {
    -webkit-text-fill-color: var(--accent);
}

.nav__logo:hover {
    filter: brightness(1.2);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav__link {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
    color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* Hamburger */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
}

.nav__toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav__toggle.active .nav__toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav__toggle.active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active .nav__toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ============================================
   4b. THEME TOGGLE
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-toggle__icon--sun { display: none; }
[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* ============================================
   5. HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--hero-bg, var(--bg-primary));
    margin-top: calc(-1 * var(--nav-height));
}

/* --- Background layers --- */
.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    will-change: transform;
}

.hero__glow--primary {
    width: clamp(400px, 50vw, 800px);
    height: clamp(400px, 50vw, 800px);
    background: radial-gradient(circle, var(--hero-glow-primary) 0%, transparent 70%);
    top: -15%;
    right: -10%;
}

.hero__glow--secondary {
    width: clamp(300px, 35vw, 600px);
    height: clamp(300px, 35vw, 600px);
    background: radial-gradient(circle, var(--hero-glow-secondary) 0%, transparent 70%);
    bottom: -10%;
    left: -5%;
}

.hero__noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

.hero__grid-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
}

/* --- Content layout --- */
.hero__content {
    z-index: 1;
    text-align: center;
    padding-block: clamp(6rem, 4rem + 6vw, 10rem) clamp(4rem, 3rem + 4vw, 7rem);
}

.hero__status {
    margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

/* --- Badge --- */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--badge-text);
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--badge-dot);
    position: relative;
    flex-shrink: 0;
}

.hero__badge-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--badge-dot);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.8); }
}

/* --- Headline --- */
.hero__headline {
    margin-bottom: clamp(1.5rem, 1rem + 1vw, 2rem);
}

.hero__intro {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    perspective: 600px;
}

.hero__intro-flipper {
    position: relative;
    display: inline-block;
    padding-bottom: 0.25em;
    line-height: 1.1;
}

.hero__intro-greet {
    display: inline-block;
    transform-origin: 50% 100%;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity   280ms cubic-bezier(0.22, 1, 0.36, 1);
    background: linear-gradient(120deg, #6366f1 0%, #a78bfa 25%, #818cf8 50%, #c084fc 75%, #6366f1 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hero-intro-shimmer 6s ease-in-out 2s infinite;
    text-shadow: 0 4px 16px rgba(99, 102, 241, 0.22);
}

.hero__intro-greet.is-exiting {
    transform: rotateX(-90deg) translateY(-4px);
    opacity: 0;
}

[data-theme="light"] .hero__intro-greet {
    background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 25%, #6366f1 50%, #a855f7 75%, #4f46e5 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 4px 16px rgba(79, 70, 229, 0.18);
}

.hero__intro-squiggle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    width: 100%;
    height: 10px;
    overflow: visible;
    pointer-events: none;
}

.hero__intro-squiggle path {
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
}

.hero__intro-squiggle.is-drawn path {
    animation: squiggle-draw 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__intro-soft {
    opacity: 0.6;
    font-weight: 500;
}

.hero__wave {
    display: inline-block;
    font-size: 1.1em;
    transform-origin: 70% 70%;
    animation: hero-wave 2.6s ease-in-out 1.2s infinite;
    filter: drop-shadow(0 3px 10px rgba(99, 102, 241, 0.3));
}

@keyframes hero-wave {
    0%, 65%, 100% { transform: rotate(0deg) translateY(0); }
    10% { transform: rotate(14deg)  translateY(-2px); }
    20% { transform: rotate(-8deg)  translateY(0); }
    30% { transform: rotate(14deg)  translateY(-2px); }
    40% { transform: rotate(-4deg)  translateY(0); }
    50% { transform: rotate(10deg)  translateY(-1px); }
}

@keyframes hero-intro-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes squiggle-draw {
    from { stroke-dashoffset: 160; }
    to   { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__wave,
    .hero__intro-greet { animation: none; }
    .hero__intro-greet { transition: none; }
    .hero__intro-squiggle.is-drawn path { animation-duration: 0.01ms; }
}

.hero__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 2rem + 5vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero__name-line {
    display: block;
    width: fit-content;
    margin-inline: auto;
    background: linear-gradient(120deg, #6366f1 0%, #a78bfa 25%, #818cf8 50%, #c084fc 75%, #6366f1 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.4s ease, letter-spacing 0.4s ease, transform 0.4s ease;
    cursor: default;
}

.hero__name-line:hover {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)) drop-shadow(0 0 40px rgba(167, 139, 250, 0.3));
    letter-spacing: 0.04em;
    transform: scale(1.03);
}

.hero__name-accent {
    -webkit-text-fill-color: var(--accent);
}

/* --- Descriptor row --- */
.hero__descriptor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 1rem + 1vw, 2rem);
    flex-wrap: wrap;
}

.hero__role-static {
    font-family: 'Sora', sans-serif;
    font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.125rem);
    font-weight: 500;
    color: var(--hero-accent-soft);
    letter-spacing: 0.02em;
}

.hero__role-divider {
    width: 1px;
    height: 1.25rem;
    background: var(--border);
    flex-shrink: 0;
}

.hero__role-dynamic {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.hero__role-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Tagline --- */
.hero__tagline {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 540px;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

.hero__tagline-break {
    display: none;
}

@media (min-width: 768px) {
    .hero__tagline-break {
        display: inline;
    }
}

/* --- CTA Buttons --- */
.hero__cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}

.hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: 'Sora', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    isolation: isolate;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 300ms ease,
                background 300ms ease;
}

.hero__btn:active {
    transform: scale(0.97) !important;
}

.hero__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.hero__btn-icon {
    display: inline-flex;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__btn:hover .hero__btn-icon {
    transform: translateX(3px);
}

.hero__btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.3),
        0 2px 8px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.5),
        0 4px 20px rgba(99, 102, 241, 0.3),
        0 8px 32px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero__btn--primary:hover .hero__btn-icon {
    transform: translate(2px, -2px);
}

.hero__btn--secondary {
    color: var(--text-primary);
    background: var(--hero-surface);
    border: 1px solid var(--hero-border-btn);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero__btn--secondary:hover {
    transform: translateY(-2px);
    border-color: var(--hero-border-btn-hover);
    background: rgba(99, 102, 241, 0.06);
    box-shadow:
        0 0 0 1px var(--hero-border-btn-hover),
        0 4px 16px rgba(99, 102, 241, 0.1);
}

/* --- Social links --- */
.hero__socials {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.hero__social-link {
    color: var(--brand-color, var(--text-muted));
    transition: color 300ms ease, transform 300ms ease, filter 300ms ease;
    animation: social-float 3s ease-in-out infinite;
}

.hero__social-link:nth-child(1) { --brand-color: #181717; animation-delay: 0s; }
[data-theme="dark"] .hero__social-link:nth-child(1) { --brand-color: #ffffff; }
.hero__social-link:nth-child(2) { --brand-color: #0A66C2; animation-delay: 0.5s; }
.hero__social-link:nth-child(3) { --brand-color: #FF0000; animation-delay: 1s; }
.hero__social-link:nth-child(4) { --brand-color: #1F8ACB; animation-delay: 1.5s; }

.hero__social-link:hover {
    transform: translateY(-3px) scale(1.2);
    filter: drop-shadow(0 0 8px var(--brand-color));
}

@keyframes social-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.hero__social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* --- Scroll indicator --- */
.hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.hero__scroll-text {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Hero Animations --- */
@keyframes hero-blur-in {
    0% {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

@keyframes hero-clip-reveal {
    0% { clip-path: inset(0 100% 0 0); }
    100% { clip-path: inset(0 0% 0 0); }
}

@keyframes hero-name-shimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hero-glow-in {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes hero-glow-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.03); }
    66% { transform: translate(-10px, 15px) scale(0.97); }
}

@keyframes hero-social-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Apply entrance animations */
.hero__badge,
.hero__intro,
.hero__descriptor,
.hero__tagline,
.hero__cta,
.hero__socials,
.hero__scroll-indicator {
    opacity: 0;
}

.hero__badge        { animation: hero-blur-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards; }
.hero__intro        { animation: hero-blur-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards; }
.hero__descriptor   { animation: hero-blur-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards; }
.hero__tagline      { animation: hero-blur-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.3s forwards; }
.hero__cta          { animation: hero-blur-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards; }
.hero__socials      { animation: hero-blur-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 1.7s forwards; }
.hero__scroll-indicator { animation: hero-blur-in 0.6s ease-out 2.1s forwards; }

/* Name clip-path reveal + shimmer */
.hero__name-line {
    clip-path: inset(0 100% 0 0);
    animation: hero-clip-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               hero-name-shimmer 6s ease-in-out 2s infinite;
}
.hero__name-line--first { animation-delay: 0.6s; }
.hero__name-line--last  { animation-delay: 0.8s; }

/* Social icon stagger */
.hero__social-link {
    opacity: 0;
    animation: hero-social-in 0.4s ease-out forwards,
               social-float 3s ease-in-out 2.5s infinite;
}
.hero__social-link:nth-child(1) { animation-delay: 1.7s, 2.2s; }
.hero__social-link:nth-child(2) { animation-delay: 1.8s, 2.7s; }
.hero__social-link:nth-child(3) { animation-delay: 1.9s, 3.2s; }
.hero__social-link:nth-child(4) { animation-delay: 2.0s, 3.7s; }

/* Glow entrance + continuous float */
.hero__glow--primary {
    opacity: 0;
    animation: hero-glow-in 1.2s ease-out 0s forwards,
               hero-glow-float 12s ease-in-out 1.2s infinite;
}

.hero__glow--secondary {
    opacity: 0;
    animation: hero-glow-in 1.2s ease-out 0.2s forwards,
               hero-glow-float 15s ease-in-out 1.4s infinite reverse;
}

/* --- Light theme hero specifics --- */
[data-theme="light"] .hero__noise {
    opacity: 0.15;
    mix-blend-mode: multiply;
}

[data-theme="light"] .hero__grid-pattern {
    opacity: 0.25;
}

[data-theme="light"] .hero__name-line {
    background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 25%, #6366f1 50%, #8b5cf6 75%, #4f46e5 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .hero__btn--primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.3),
        0 2px 8px rgba(79, 70, 229, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .hero__btn--primary:hover {
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.5),
        0 4px 20px rgba(79, 70, 229, 0.2),
        0 8px 32px rgba(79, 70, 229, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .hero__btn--secondary {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.15),
        0 4px 16px rgba(79, 70, 229, 0.08);
}

/* ============================================
   6. BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn--primary {
    background: var(--accent);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--outline {
    border: 1px solid var(--border);
    color: var(--text-primary);
    background: transparent;
}

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.btn--outline:active {
    transform: translateY(0);
}

.btn__icon {
    flex-shrink: 0;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ============================================
   7. ABOUT
   ============================================ */
.about__grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.about__image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 3px solid rgba(99, 102, 241, 0.4);
    outline: 3px solid rgba(99, 102, 241, 0.15);
    outline-offset: 6px;
    border-radius: var(--border-radius-lg);
    transition: border-color var(--transition-base), outline-color var(--transition-base);
}

.about__image:hover {
    border-color: rgba(99, 102, 241, 0.7);
    outline-color: rgba(99, 102, 241, 0.35);
}

.about__text {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.about__yt-link {
    color: #FF0000;
    text-decoration: none;
    font-weight: 600;
    transition: color 300ms ease, filter 300ms ease;
}

.about__yt-link svg {
    vertical-align: -2px;
    margin-right: 2px;
}

.about__yt-link:hover {
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.4));
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.about__stat {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-base), transform var(--transition-base),
                box-shadow var(--transition-base), background var(--transition-base);
}

.about__stat:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15),
                0 8px 30px rgba(99, 102, 241, 0.1),
                0 20px 50px rgba(0, 0, 0, 0.25);
}

.about__stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent-light);
    transition: transform var(--transition-base), background var(--transition-base);
}

.about__stat:hover .about__stat-icon {
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.25);
}

.about__stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
}

.about__stat-number::after {
    content: '+';
    -webkit-text-fill-color: var(--accent-light);
}

.about__stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Stat link variant */
a.about__stat--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}

a.about__stat--link:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.about__stat-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: var(--space-sm);
    font-size: 0.7rem;
    color: var(--accent-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity var(--transition-base), color var(--transition-base);
}

a.about__stat--link:hover .about__stat-cta {
    opacity: 1;
    color: #818cf8;
}

/* Staggered entrance */
.about__stat:nth-child(1) { transition-delay: 0s; }
.about__stat:nth-child(2) { transition-delay: 0.1s; }
.about__stat:nth-child(3) { transition-delay: 0.2s; }
.about__stat:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   8. SKILLS — glass card grid
   ============================================ */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.skills__card {
    padding: var(--space-xl) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.4s ease;
}

.skills__card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 8px 30px rgba(99, 102, 241, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

.skills__card--wide {
    grid-column: 1 / -1;
}

.skills__card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.skills__card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-light);
}

.skills__card:hover .skills__card-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.skills__card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.skills__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skills__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    cursor: default;
    transition: border-color var(--transition-base), color var(--transition-base),
                transform var(--transition-base), background var(--transition-base);
}

.skills__pill svg {
    color: var(--accent-light);
    flex-shrink: 0;
}

.skills__pill:hover {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

/* Light theme stat overrides */
[data-theme="light"] .about__stat {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--border);
}

[data-theme="light"] .about__stat:hover {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.1),
                0 8px 30px rgba(79, 70, 229, 0.08),
                0 20px 50px rgba(0, 0, 0, 0.06);
}

/* Light theme card overrides */
[data-theme="light"] .skills__card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .skills__card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.1),
        0 8px 30px rgba(79, 70, 229, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .skills__card-icon {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.15);
}

/* Light theme pill overrides */
[data-theme="light"] .skills__pill {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .skills__pill:hover {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.3);
}

/* ============================================
   9. WORK — carousel sub-headings
   ============================================ */
.carousel__heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    padding-left: var(--space-xs);
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.carousel__heading::before {
    content: '';
    width: 3px;
    height: 1.2em;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.carousel__heading + .packages__carousel {
    /* extra space when heading follows projects carousel */
}

/* Add spacing between the two carousels */
.projects__carousel + .carousel__heading {
    margin-top: var(--space-3xl);
}

/* ============================================
   9a. PROJECTS CAROUSEL
   ============================================ */
.projects__carousel {
    overflow: hidden;
    margin-inline: calc(-1 * var(--container-padding));
    padding-inline: var(--container-padding);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.projects__track {
    display: flex;
    gap: var(--space-xl);
    width: max-content;
    animation: projects-scroll 90s linear infinite;
}

.projects__carousel:hover .projects__track {
    animation-play-state: paused;
}

@keyframes projects-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.project-card {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.4s ease;
}

.project-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 8px 30px rgba(99, 102, 241, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

/* App icon */
.project-card__icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-secondary);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
}

.project-card:hover .project-card__icon-wrap {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.project-card__icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback SVG icon (for projects without image) */
.project-card__icon-wrap svg {
    width: 40px;
    height: 40px;
    color: var(--accent-light);
    margin: auto;
    display: block;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.project-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    width: 100%;
}

.project-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.project-card:hover .project-card__title {
    color: var(--accent-light);
}

.project-card__role {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.project-card__description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    flex: 1;
}

/* Circular action buttons */
.project-card__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.project-card__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card__btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--accent-light);
    transform: translateY(-3px);
}

/* ============================================
   9b. PACKAGES
   ============================================ */
.packages__carousel {
    overflow: hidden;
    margin-inline: calc(-1 * var(--container-padding));
    padding-inline: var(--container-padding);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.packages__track {
    display: flex;
    gap: var(--space-xl);
    width: max-content;
    animation: packages-scroll 35s linear infinite reverse;
}

.packages__carousel:hover .packages__track {
    animation-play-state: paused;
}

@keyframes packages-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.package-card {
    width: 320px;
    flex-shrink: 0;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.4s ease;
}

.package-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 8px 30px rgba(99, 102, 241, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

.package-card__accent {
    height: 3px;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    width: 60%;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.package-card:hover .package-card__accent {
    width: 100%;
}

.package-card__content {
    padding: var(--space-lg);
}

.package-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.package-card__icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s ease,
                border-color 0.3s ease;
}

.package-card:hover .package-card__icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.3);
}

.package-card__version {
    font-size: var(--fs-xs);
    padding: 0.2rem 0.6rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.package-card__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.package-card__description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.package-card__install {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    margin-bottom: var(--space-lg);
    transition: border-color 0.3s ease;
}

.package-card:hover .package-card__install {
    border-color: rgba(99, 102, 241, 0.25);
}

.package-card__command {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.package-card__command::before {
    content: '$ ';
    color: var(--accent);
}

.package-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.package-card__tag {
    font-size: var(--fs-xs);
    font-family: 'JetBrains Mono', monospace;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-light);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s ease,
                border-color 0.3s ease;
}

.package-card:hover .package-card__tag {
    transform: translateY(-1px);
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.package-card__links {
    display: flex;
    gap: var(--space-lg);
}

.package-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    transition: color var(--transition-fast), transform 0.3s ease;
}

.package-card__link:hover {
    color: var(--accent-light);
    transform: translateY(-1px);
}

/* Light theme package overrides */
[data-theme="light"] .package-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .package-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.1),
        0 8px 30px rgba(79, 70, 229, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .package-card__install {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .package-card:hover .package-card__install {
    border-color: rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .package-card__icon {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .package-card:hover .package-card__icon {
    background: rgba(79, 70, 229, 0.14);
    border-color: rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .package-card__version {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .package-card__tag {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .package-card:hover .package-card__tag {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.18);
}

/* Light theme project overrides */
[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .project-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.1),
        0 8px 30px rgba(79, 70, 229, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .project-card__icon-wrap {
    border-color: rgba(0, 0, 0, 0.08);
    background: #f5f5f5;
}

[data-theme="light"] .project-card__btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

[data-theme="light"] .project-card__btn:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.35);
    color: var(--accent);
}

[data-theme="light"] .project-card__role {
    color: var(--accent);
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.15);
}

/* ============================================
   10. EXPERIENCE / TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 2rem;
    max-width: 700px;
    margin-inline: auto;
}

/* Vertical accent line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--accent),
        var(--accent-light) 50%,
        var(--border)
    );
    border-radius: 1px;
}

/* Timeline item */
.timeline__item {
    position: relative;
    padding-bottom: var(--space-2xl);
}

.timeline__item:last-child {
    padding-bottom: 0;
}

/* Dot marker */
.timeline__marker {
    position: absolute;
    left: calc(-2rem - 5px);
    top: var(--space-lg);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    z-index: 1;
    transition: box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Glassmorphic card */
.timeline__card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.4s ease;
}

.timeline__card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 8px 30px rgba(99, 102, 241, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

.timeline__item:hover .timeline__marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.3);
}

/* Current role accent top border */
.timeline__card--current {
    border-top: 2px solid var(--accent);
}

/* Header: date + badge */
.timeline__header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.timeline__date {
    display: inline-block;
    font-size: var(--fs-xs);
    padding: 0.2rem 0.6rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 999px;
}

.timeline__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 999px;
}

.timeline__role {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.timeline__company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.timeline__company-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
}

.timeline__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: var(--space-sm);
    font-size: var(--fs-xs);
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 6px;
    transition: all 0.25s ease;
}

.timeline__link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
    transform: translateX(3px);
}

.timeline__description {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

/* Skill tags */
.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.timeline__tag {
    font-size: var(--fs-xs);
    font-family: 'JetBrains Mono', monospace;
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-light);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s ease,
                border-color 0.3s ease;
}

.timeline__card:hover .timeline__tag {
    transform: translateY(-1px);
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Stagger entrance */
.timeline__item:nth-child(1).slide-in-left { transition-delay: 0s; }
.timeline__item:nth-child(2).slide-in-left { transition-delay: 0.15s; }
.timeline__item:nth-child(3).slide-in-left { transition-delay: 0.3s; }
.timeline__item:nth-child(4).slide-in-left { transition-delay: 0.45s; }

/* --- Light theme timeline overrides --- */
[data-theme="light"] .timeline__marker {
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

[data-theme="light"] .timeline__item:hover .timeline__marker {
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .timeline__card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .timeline__card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.1),
        0 8px 30px rgba(79, 70, 229, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .timeline__date {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .timeline__tag {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .timeline__card:hover .timeline__tag {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.18);
}

/* ============================================
   10b. EDUCATION (Wide Horizontal Cards)
   ============================================ */
.edu__group-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.edu__stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 700px;
    margin-inline: auto;
}

.edu-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease,
                background 0.4s ease,
                box-shadow 0.4s ease;
}

.edu-card__stripe {
    width: 4px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--accent) 0%, #7c3aed 100%);
    opacity: 0.5;
    transition: opacity 0.4s ease, width 0.4s ease;
}

.edu-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.07),
                0 12px 35px rgba(0, 0, 0, 0.12);
}

.edu-card:hover .edu-card__stripe {
    opacity: 1;
    width: 5px;
}

.edu-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    gap: var(--space-lg);
}

.edu-card__left {
    flex: 1;
    min-width: 0;
}

.edu-card__date {
    display: inline-block;
    font-size: var(--fs-xs);
    padding: 0.15rem 0.55rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.edu-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.edu-card__institution {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin: 0;
}


.edu-card__right {
    flex-shrink: 0;
}

.edu-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.edu-card__tag {
    font-size: var(--fs-xs);
    font-family: 'JetBrains Mono', monospace;
    padding: 0.2rem 0.5rem;
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.edu-card:hover .edu-card__tag {
    background: rgba(99, 102, 241, 0.12);
}

/* Education animation stagger */
.edu-card:nth-child(2).fade-in { transition-delay: 0.12s; }
.edu-card:nth-child(3).fade-in { transition-delay: 0.24s; }

/* Education — Light theme */
[data-theme="light"] .edu-card {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .edu-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(79, 70, 229, 0.18);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.05),
                0 12px 35px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .edu-card__date {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .edu-card__tag {
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .edu-card:hover .edu-card__tag {
    background: rgba(79, 70, 229, 0.1);
}

/* Education — Self Study Pill Cloud */
.study-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 750px;
    margin-inline: auto;
}

.study-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 999px;
    padding: 0.5rem 1.1rem 0.5rem 0.85rem;
    cursor: default;
    position: relative;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.study-pill svg {
    color: var(--accent-light);
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.study-pill:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.study-pill:hover svg {
    opacity: 1;
    transform: scale(1.15);
}

/* Pill Cloud — Light theme */
[data-theme="light"] .study-pill {
    color: var(--text-secondary);
    background: rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .study-pill svg {
    color: var(--accent);
}

[data-theme="light"] .study-pill:hover {
    color: var(--text-primary);
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.22);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

/* ── Education Group Wrappers ── */
.edu-group {
    margin-bottom: var(--space-2xl);
}

.edu-group:last-child {
    margin-bottom: 0;
}

.edu__group-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.edu__group-title svg {
    color: var(--accent-light);
    flex-shrink: 0;
}


/* ============================================
   10c. CERTIFICATE SHOWCASE GRID
   ============================================ */
.cert__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
    margin-inline: auto;
}

.cert-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.cert-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12),
                0 20px 50px rgba(0, 0, 0, 0.15);
}

.cert-card__image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.2);
}

.cert-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(-2deg) scale(1.05);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.4s ease;
    filter: brightness(0.9) saturate(0.95);
}

.cert-card:hover .cert-card__image {
    transform: rotate(0deg) scale(1.0);
    filter: brightness(1) saturate(1);
}

.cert-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-card:hover .cert-card__overlay {
    opacity: 1;
}

.cert-card__zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background var(--transition-fast),
                transform var(--transition-fast);
}

.cert-card__zoom-btn:hover {
    background: rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

.cert-card__zoom-btn:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

.cert-card__ribbon {
    position: absolute;
    top: 12px;
    right: -2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    padding: 0.25rem 0.75rem 0.25rem 0.6rem;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    z-index: 2;
}

.cert-card__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.cert-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.cert-card__provider {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.cert-card__verify-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-base),
                box-shadow var(--transition-base);
}

.cert-card__verify-link:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

.cert-card__verify-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cert-card__arrow {
    transition: transform var(--transition-base);
    opacity: 0.7;
}

.cert-card__verify-link:hover .cert-card__arrow {
    transform: translate(2px, -2px);
    opacity: 1;
}

[data-theme="light"] .cert-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .cert-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08),
                0 20px 50px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .cert-card__image {
    filter: brightness(0.95) saturate(0.98);
}

[data-theme="light"] .cert-card:hover .cert-card__image {
    filter: brightness(1) saturate(1);
}

[data-theme="light"] .cert-card__overlay {
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .cert-card__verify-link {
    color: var(--accent);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.18);
}

[data-theme="light"] .cert-card__verify-link:hover {
    background: rgba(79, 70, 229, 0.14);
    border-color: rgba(79, 70, 229, 0.35);
}

.cert-card:nth-child(2) { transition-delay: 0.08s; }
.cert-card:nth-child(3) { transition-delay: 0.16s; }

/* ============================================
   10d. CERTIFICATE LIGHTBOX MODAL
   ============================================ */
.cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.cert-lightbox[hidden] {
    display: none;
}

.cert-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: certFadeIn 0.3s ease;
}

.cert-lightbox__content {
    position: relative;
    max-width: 900px;
    width: 100%;
    animation: certSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cert-lightbox__image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cert-lightbox__title {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: #fff;
    margin-top: var(--space-md);
    opacity: 0.9;
}

.cert-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.cert-lightbox__close:hover {
    color: #fff;
    transform: scale(1.15);
}

.cert-lightbox__close:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 4px;
    border-radius: 2px;
}

@keyframes certFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes certSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

[data-theme="light"] .cert-lightbox__backdrop {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .cert-lightbox__title {
    color: var(--text-primary);
}

[data-theme="light"] .cert-lightbox__close {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .cert-lightbox__close:hover {
    color: var(--text-primary);
}

[data-theme="light"] .cert-lightbox__image {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ============================================
   11. CONTACT
   ============================================ */

/* --- Gradient title --- */
.contact__title {
    background: linear-gradient(120deg, #6366f1 0%, #a78bfa 25%, #818cf8 50%, #c084fc 75%, #6366f1 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hero-name-shimmer 6s ease-in-out infinite;
}

.contact__content {
    text-align: center;
    max-width: 700px;
    margin-inline: auto;
}

.contact__text {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

/* --- CTA Cards Grid --- */
.contact__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.contact__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    position: relative;
    overflow: hidden;
}

.contact__card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 0;
}

.contact__card--email::before {
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.contact__card--whatsapp::before {
    background: radial-gradient(circle at 50% 0%, rgba(37, 211, 102, 0.08) 0%, transparent 70%);
}

.contact__card:hover::before {
    opacity: 1;
}

.contact__card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--accent-glow), 0 0 0 1px var(--accent-glow);
}

.contact__card--whatsapp:hover {
    border-color: #25d366;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.15), 0 0 0 1px rgba(37, 211, 102, 0.1);
}

.contact__card:active {
    transform: translateY(-2px) scale(1.01);
}

/* Stagger card entrance */
.contact__card:nth-child(2).fade-in { transition-delay: 0.15s; }

/* --- Card Icon --- */
.contact__card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.contact__card--email .contact__card-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
}

.contact__card--whatsapp .contact__card-icon {
    background: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

/* Pulsing glow on icons */
@keyframes contact-pulse-email {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3); }
    50%      { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
}

@keyframes contact-pulse-whatsapp {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.3); }
    50%      { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
}

.contact__card--email .contact__card-icon {
    animation: contact-pulse-email 2.5s ease-in-out infinite;
}

.contact__card--whatsapp .contact__card-icon {
    animation: contact-pulse-whatsapp 2.5s ease-in-out infinite 1.25s;
}

/* --- Card Text --- */
.contact__card-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.contact__card-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.contact__card-address {
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    position: relative;
    z-index: 1;
}

.contact__card-cta {
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-top: var(--space-sm);
    position: relative;
    z-index: 1;
    transition: letter-spacing var(--transition-fast);
}

.contact__card--email .contact__card-cta {
    color: var(--accent-light);
}

.contact__card--whatsapp .contact__card-cta {
    color: #25d366;
}

.contact__card:hover .contact__card-cta {
    letter-spacing: 0.5px;
}

/* --- Colorful Social Links --- */
.contact__socials {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.contact__social-link {
    color: var(--brand-color, var(--text-muted));
    transition: color 300ms ease, transform 300ms ease, filter 300ms ease;
    animation: social-float 3s ease-in-out infinite;
}

.contact__social-link:nth-child(1) { --brand-color: #181717; animation-delay: 0s; }
.contact__social-link:nth-child(2) { --brand-color: #0A66C2; animation-delay: 0.5s; }
.contact__social-link:nth-child(3) { --brand-color: #FF0000; animation-delay: 1s; }

[data-theme="dark"] .contact__social-link:nth-child(1) { --brand-color: #ffffff; }

.contact__social-link:hover {
    transform: translateY(-3px) scale(1.2);
    filter: drop-shadow(0 0 8px var(--brand-color));
}

.contact__social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   12. FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding-block: var(--space-xl);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__copyright {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.footer__back-to-top {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    opacity: 0;
    visibility: hidden;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    background: var(--bg-card);
}

.footer__back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.footer__back-to-top:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

.footer__back-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ============================================
   13. SCROLL ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* Slide-in from left (for timeline items) */
.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale-in (for skill tags) */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   14. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .contact__cards {
        grid-template-columns: 1fr;
    }

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

    .skills__card--wide {
        grid-column: 1;
    }

    .header {
        top: 0;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .nav__toggle {
        display: flex;
        order: 3;
    }

    .theme-toggle {
        margin-left: auto;
    }

    .nav__menu {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        height: calc(100dvh - var(--nav-height));
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-2xl);
        transition: right var(--transition-base);
    }

    .nav__menu.open {
        right: 0;
    }

    .nav__link {
        font-size: var(--fs-lg);
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .about__image {
        max-width: 200px;
        margin-inline: auto;
    }

    .projects__carousel {
        mask-image: none;
        -webkit-mask-image: none;
        margin-inline: 0;
        overflow: visible;
    }

    .projects__track {
        flex-direction: column;
        width: 100%;
        animation: none;
    }

    .project-card {
        width: 100%;
    }

    /* Hide cloned cards on mobile */
    .project-card[aria-hidden="true"] {
        display: none;
    }

    .packages__carousel {
        mask-image: none;
        -webkit-mask-image: none;
        margin-inline: 0;
        overflow: visible;
    }

    .packages__track {
        flex-direction: column;
        width: 100%;
        animation: none;
    }

    .package-card {
        width: 100%;
    }

    .package-card[aria-hidden="true"] {
        display: none;
    }

    .package-card__command {
        white-space: normal;
        word-break: break-all;
        text-overflow: unset;
    }

    /* Timeline mobile layout */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline__marker {
        left: calc(-1.5rem - 5px);
    }

    /* Education cards — stack body on mobile */
    .edu-card__body {
        flex-direction: column;
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-sm);
    }

    .edu-card__tags {
        justify-content: flex-start;
    }



    /* Certificate grid — 1 column on tablet/mobile */
    .cert__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .cert-card__image {
        transform: rotate(0deg) scale(1);
    }

    .hero__descriptor {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero__role-divider {
        display: none;
    }

    .hero__cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__btn {
        justify-content: center;
    }

    .footer__content {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .about__stats {
        grid-template-columns: 1fr;
    }


    .cert-card__body {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }

    .cert-lightbox {
        padding: var(--space-sm);
    }

    .cert-lightbox__close {
        top: -32px;
    }
}

/* ============================================
   15. ACCESSIBILITY: REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-in,
    .slide-in-left,
    .scale-in {
        opacity: 1;
        transform: none;
    }

    .hero__badge,
    .hero__intro,
    .hero__name-line,
    .hero__descriptor,
    .hero__tagline,
    .hero__cta,
    .hero__socials,
    .hero__scroll-indicator {
        opacity: 1;
        transform: none;
        animation: none;
        filter: none;
        clip-path: none;
    }

    .hero__social-link {
        opacity: 1;
        animation: none;
    }

    .hero__role-cursor {
        animation: none;
        opacity: 1;
    }

    .hero__scroll-line {
        animation: none;
    }

    .hero__glow {
        animation: none;
        opacity: 1;
    }

    .hero__badge-dot::after {
        animation: none;
    }
}
