/* ============================================
   DESIGN SYSTEM - CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --accent: #5B5DE6;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --gradient: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom cursor only on devices with fine pointer (mouse) */
@media (hover: hover) and (pointer: fine) {
    * { cursor: none; }
}

@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: smooth;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-display { font-family: 'Space Grotesk', sans-serif; }

::selection {
    background: var(--accent);
    color: white;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.cursor-ring.hover {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.8);
}

.cursor-ring.click {
    width: 32px;
    height: 32px;
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preloader-left,
.preloader-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 2;
}

.preloader-left { left: 0; }
.preloader-right { right: 0; }

.preloader-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.preloader-counter {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.preloader-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    margin-top: 1.5rem;
    overflow: hidden;
    white-space: nowrap;
}

.preloader-name .char {
    display: inline-block;
    opacity: 0;
}

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--gradient);
    z-index: 9999;
    transform-origin: left;
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   GRADIENT MESH BACKGROUND
   ============================================ */
.gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float-blob 20s ease-in-out infinite;
}

.gradient-blob:nth-child(1) {
    width: 600px;
    height: 600px;
    background: #6366f1;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.gradient-blob:nth-child(2) {
    width: 500px;
    height: 500px;
    background: #a855f7;
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.gradient-blob:nth-child(3) {
    width: 400px;
    height: 400px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float-blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.05); }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.25rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--accent);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
}

.nav-cta:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-2px);
}

/* Language Dropdown */
.lang-flag {
    border-radius: 50%;
    flex-shrink: 0;
}

.lang-dropdown {
    position: relative;
}

.mobile-lang {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.375rem;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 10;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.lang-option:hover,
.lang-option.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu .mobile-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px);
    transition: color 0.3s;
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu .mobile-link:hover {
    color: var(--accent);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 2rem 4rem;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

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

@keyframes blink {
    50% { opacity: 0; }
}

.hero-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-headline .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.hero-headline .word-inner {
    display: inline-block;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.hero-stat {
    text-align: left;
}

.hero-stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #4F51D0;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

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

.btn-primary .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to { transform: scale(4); opacity: 0; }
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s;
}

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

/* Hero Image */
.hero-image {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 360px;
    height: 360px;
}

.hero-image-blob {
    position: absolute;
    inset: -20px;
    background: var(--gradient);
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
    opacity: 0.15;
    animation: morph-blob 8s ease-in-out infinite;
}

@keyframes morph-blob {
    0%, 100% { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; }
    25% { border-radius: 50% 60% 40% 50% / 40% 50% 60% 50%; }
    50% { border-radius: 40% 50% 60% 50% / 60% 40% 50% 50%; }
    75% { border-radius: 50% 50% 40% 60% / 50% 50% 60% 40%; }
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
    animation: morph-blob 8s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: grayscale(30%);
    transition: filter 0.5s;
}

.hero-image-wrapper:hover img {
    filter: grayscale(0%);
}

.hero-image-float {
    animation: float-image 6s ease-in-out infinite;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-hover);
    border-radius: 12px;
    position: relative;
}

.scroll-mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll-mouse-anim 2s ease-in-out infinite;
}

@keyframes scroll-mouse-anim {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-title .char {
    display: inline-block;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
    margin: 0 auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    padding: 6rem 2rem;
}

/* ---- ABOUT: TOP ROW (Photo + Bio) ---- */
.about-row {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
    min-height: 420px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.bento-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.08);
}

/* Photo card */
.bento-photo {
    padding: 0;
    position: relative;
}

.bento-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    filter: grayscale(15%);
    transition: filter 0.5s;
}

.bento-photo:hover img {
    filter: grayscale(0%);
}

.bento-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bento-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.bento-role {
    font-size: 0.875rem;
    color: var(--accent-hover);
    font-weight: 500;
}

/* Bio card */
.bento-bio {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

.bento-bio-top {
    flex: 1;
}

.bento-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.bento-bio h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.bento-bio p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    margin: 0;
}

.bento-bio-bottom {
    display: flex;
    gap: 1.5rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.bento-bio-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bento-bio-stat i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* ---- EXPERIENCE ROW ---- */
.about-exp-row {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 4rem;
}

.exp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.bento-exp {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

.bento-exp-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: background 0.3s, transform 0.3s;
}

.bento-exp:hover .bento-exp-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.bento-exp-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.bento-exp h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.bento-exp-company {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.bento-exp p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Tech Marquee */
.marquee-wrap {
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.marquee-group {
    display: flex;
    gap: 3rem;
    flex-shrink: 0;
    padding-right: 3rem;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    transition: color 0.3s;
}

.marquee-item:hover {
    color: var(--text-primary);
}

.marquee-item i {
    font-size: 1.25rem;
    color: var(--accent);
}

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

/* Experience Timeline (old horizontal - unused) */
.timeline-h-unused {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.timeline-h::-webkit-scrollbar { display: none; }

.timeline-card {
    min-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.timeline-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.timeline-card .year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-card h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-card .company {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Experience Vertical Timeline */
.timeline-v {
    position: relative;
    padding-left: 2rem;
    margin-top: 0.5rem;
}

.timeline-v::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-hover), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    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.25);
    z-index: 1;
    transition: box-shadow 0.3s, transform 0.3s;
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.35);
    transform: scale(1.2);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.3s, transform 0.3s;
}

.timeline-content:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.timeline-content .year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.skills-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--accent-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover::before {
    opacity: 0.15;
}

.skill-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -15px var(--accent-glow);
    z-index: 2;
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    border-radius: 0.75rem;
    position: relative;
    z-index: 1;
}

.skill-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* ============================================
   SKILL POPUP
   ============================================ */
.skill-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
}

.skill-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.skill-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7) rotateX(15deg);
    max-width: 440px;
    width: 90%;
    z-index: 10001;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    perspective: 800px;

    /* Glassmorphism card */
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(20, 20, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem 2rem;
}

/* Animated gradient border */
.skill-popup::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.5rem;
    padding: 1.5px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    animation: popup-border-spin 4s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

@keyframes popup-border-spin {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glow blobs behind popup - contained inside border-radius */
.skill-popup::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background: radial-gradient(circle at 25% 25%, var(--accent-glow), transparent 55%),
                radial-gradient(circle at 75% 75%, rgba(168, 85, 247, 0.12), transparent 55%);
    z-index: -2;
    pointer-events: none;
}

.skill-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) rotateX(0deg);
}

.skill-popup-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
    z-index: 2;
}

.skill-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: rotate(90deg);
    border-color: var(--accent);
}

.skill-popup-icon {
    width: 80px;
    height: 80px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: popup-icon-float 3s ease-in-out infinite;
}

@keyframes popup-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.skill-popup h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
}

.skill-popup p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.skill-card[data-skill] {
    cursor: pointer;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */
.portfolio {
    padding: 6rem 2rem;
}

.portfolio-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.project-card-image {
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card-image img {
    transform: scale(1.08);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.88) 50%, rgba(5, 5, 5, 0.45) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-overlay .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-hover);
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.project-card-overlay h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-card-overlay p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.project-card-overlay .tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-card-overlay .tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Project Modal - Slide-in Panel */
.project-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    max-width: 640px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 10001;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-panel.active {
    transform: translateX(0);
}

.project-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.project-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.project-panel-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s;
    font-size: 1rem;
}

.project-panel-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.project-panel-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.project-panel-content {
    padding: 2rem;
}

/* Panel header — title + live preview button */
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-panel-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.project-panel-content .category {
    color: #818cf8;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Top preview button — round outline */
.preview-btn-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    flex-shrink: 0;
}
.preview-btn-top svg {
    width: 44px;
    height: 44px;
    padding: 12px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    transition: all var(--transition-fast);
}
.preview-btn-top:hover svg {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}
.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #22c55e;
}
.live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Description — readable paragraphs */
.project-panel-content .description p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.project-panel-content .description p:first-child {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.project-panel-content .description p:last-child {
    margin-bottom: 0;
}
.project-panel-content .description {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.project-panel-content h4 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Features — with SVG icons */
.project-panel-content .features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    display: grid;
    gap: 0.25rem;
}

.project-panel-content .features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background var(--transition-fast);
}
.project-panel-content .features-list li:hover {
    background: rgba(255, 255, 255, 0.03);
}

.feature-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.375rem;
    color: var(--accent);
}
.feature-icon-wrap .feature-icon {
    display: block;
}

/* Tech tags */
.project-panel-content .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.project-panel-content .tech-tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Gallery — polished bento layout */
/* Gallery — premium bento grid */
.project-panel-content .gallery {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 150px 150px;
    gap: 4px;
    margin-bottom: 0.5rem;
    border-radius: 1rem;
    overflow: hidden;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.3s ease;
    filter: brightness(0.78) saturate(0.9);
}
/* Gradient overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    opacity: 1;
    transition: 0.25s ease;
    pointer-events: none;
}
/* Number badge — glassmorphism */
.gallery-num {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    z-index: 2;
    transition: 0.25s ease;
}
/* View icon hint */
.gallery-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    z-index: 2;
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: none;
}

/* Hover state */
.project-panel-content .gallery-item:hover img {
    transform: scale(1.08) !important;
    filter: brightness(0.95) saturate(1) !important;
}
.project-panel-content .gallery-item:hover::after {
    opacity: 0.3 !important;
}
.project-panel-content .gallery-item:hover .gallery-num {
    opacity: 0 !important;
    transform: translateY(4px) !important;
}
.project-panel-content .gallery-item:hover .gallery-view {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

/* Bento positions */
.gallery-item:nth-child(1) {
    grid-row: 1 / 3;
}
.gallery-item:nth-child(4) {
    grid-column: 1 / -1;
    height: 110px;
}

/* Bottom preview button — premium outline style */
.preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 2rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: 0.25s ease;
    width: 100%;
}
.preview-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}
.preview-btn:hover svg {
    transform: translateX(4px);
}
.preview-btn svg {
    transition: 0.25s ease;
}

/* ============================================
   SERVICES / PRICING
   ============================================ */
.services {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.services-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    position: relative;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -15px var(--accent-glow);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.08));
    position: relative;
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.25rem;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gradient-border 4s linear infinite;
    background-size: 300% 300%;
    pointer-events: none;
}

@keyframes gradient-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.pricing-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pricing-card .price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.pricing-card .price-desc {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.pricing-card ul li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-card ul li i {
    color: var(--accent);
    font-size: 0.8125rem;
}

.pricing-card ul li.disabled {
    color: rgba(136, 136, 136, 0.4);
}

.pricing-card ul li.disabled i {
    color: rgba(136, 136, 136, 0.3);
}

.pricing-card .pricing-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.pricing-card .pricing-btn.outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.pricing-card .pricing-btn.outline:hover {
    background: var(--accent);
    color: white;
}

.pricing-card .pricing-btn.filled {
    background: var(--accent);
    color: white;
    border: none;
}

.pricing-card .pricing-btn.filled:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
    padding: 6rem 2rem;
    overflow: hidden;
}

.testimonials-inner {
    max-width: 800px;
    margin: 0 auto;
}

/* Slider container */
.tm-slider {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 3.5rem 3rem 2rem;
    overflow: hidden;
}

.tm-big-quote {
    position: absolute;
    top: -0.25rem;
    left: 2rem;
    font-size: 8rem;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--accent);
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* Slide area */
.tm-slides {
    position: relative;
}

.tm-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    opacity: 0;
    visibility: hidden;
}

.tm-slide.active {
    opacity: 1;
    visibility: visible;
}

/* Author photo */
.tm-photo-wrap {
    flex-shrink: 0;
}

.tm-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    transition: border-color 0.4s;
}

.tm-slide.active .tm-photo {
    border-color: var(--accent);
}

/* Content side */
.tm-content {
    flex: 1;
}

.tm-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.tm-stars i {
    color: #facc15;
    font-size: 0.85rem;
}

.tm-text {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.tm-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tm-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.tm-divider {
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.tm-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Controls */
.tm-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.tm-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.tm-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.tm-dots {
    display: flex;
    gap: 0.5rem;
}

.tm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.tm-dot.active {
    background: var(--accent);
    transform: scale(1.25);
}

.tm-dot:hover:not(.active) {
    background: var(--text-secondary);
}

/* Progress bar */
.tm-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: 0 0 1.5rem 1.5rem;
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.faq-inner {
    max-width: 720px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    transition: color 0.2s;
}

.accordion-header:hover {
    color: var(--accent);
}

.accordion-header span {
    font-weight: 600;
    font-size: 0.9375rem;
}

.accordion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--text-secondary);
    transition: all 0.3s;
}

.accordion-icon::before {
    width: 12px;
    height: 1.5px;
}

.accordion-icon::after {
    width: 1.5px;
    height: 12px;
}

.accordion-item.active .accordion-icon {
    background: var(--accent);
    border-color: var(--accent);
}

.accordion-item.active .accordion-icon::before,
.accordion-item.active .accordion-icon::after {
    background: white;
}

.accordion-item.active .accordion-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.accordion-content {
    height: 0;
    overflow: hidden;
}

.accordion-content p {
    padding-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* ============================================
   BLOG
   ============================================ */
.blog {
    padding: 6rem 2rem;
}

.blog-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.blog-card.featured {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

.blog-card-image {
    width: 100%;
    overflow: hidden;
}

.blog-card.featured .blog-card-image {
    flex: 1;
    min-height: 200px;
}

.blog-card:not(.featured) .blog-card-image {
    height: 180px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card .meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.blog-card .meta .tag {
    color: var(--accent);
    font-weight: 500;
}

.blog-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.blog-card:hover h3 {
    color: var(--accent);
}

.blog-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-card.featured h3 {
    font-size: 1.5rem;
}

.blog-card[data-blog] {
    cursor: pointer;
}

/* ============================================
   BLOG PANEL (Article Reader)
   ============================================ */
.blog-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.blog-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.blog-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 60%;
    max-width: 800px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 10001;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-panel.active {
    transform: translateX(0);
}

.blog-panel-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s;
    font-size: 1rem;
}

.blog-panel-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

.blog-panel-hero {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.blog-panel-content {
    padding: 2.5rem 2.5rem 4rem;
}

.blog-panel-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.blog-panel-tag {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 2rem;
}

/* Panel "Read full article" button */
.blog-panel-read-btn,
.blog-article-body .blog-panel-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding: 1rem 2.5rem;
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.blog-panel-read-btn:hover,
.blog-article-body .blog-panel-read-btn:hover {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.blog-panel-read-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.blog-panel-read-btn svg {
    transition: transform 0.2s ease;
}

.blog-panel-read-btn:hover svg {
    transform: translateX(4px);
}

/* Article body typography */
/* ============================================
   BLOG ARTICLE BODY — World-class typography
   ============================================ */
.blog-article-body {
    max-width: 680px;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.85;
}

/* Lead paragraph — slightly larger and lighter */
.blog-article-body > p:first-child {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.78);
}

/* H2 — section headings with separator line */
.blog-article-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.022em;
    line-height: 1.25;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}

/* H3 — sub-headings */
.blog-article-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.blog-article-body p { margin-bottom: 1.375rem; }

/* Images */
.blog-article-body img {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    object-fit: cover;
    max-height: 400px;
    display: block;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Blockquote */
.blog-article-body blockquote {
    position: relative;
    border-left: 3px solid var(--accent);
    padding: 1.125rem 1.5rem 1.125rem 1.875rem;
    margin: 2.25rem 0;
    background: rgba(91, 93, 230, 0.07);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
    font-size: 1.05rem;
}
.blog-article-body blockquote::before {
    content: '\201C';
    position: absolute;
    top: 0.1rem;
    left: 0.875rem;
    font-size: 2.75rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.3;
    font-style: normal;
    font-family: Georgia, serif;
}

/* Lists — custom bullets */
.blog-article-body ul,
.blog-article-body ol {
    padding-left: 0;
    margin-bottom: 1.375rem;
    list-style: none;
}
.blog-article-body li {
    position: relative;
    padding-left: 1.625rem;
    margin-bottom: 0.65rem;
    line-height: 1.75;
}
.blog-article-body ul > li::before {
    content: '';
    position: absolute;
    left: 0.125rem;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.blog-article-body ol { counter-reset: ol-counter; }
.blog-article-body ol > li { counter-increment: ol-counter; }
.blog-article-body ol > li::before {
    content: counter(ol-counter) '.';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.75;
}

.blog-article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Links inside article */
.blog-article-body a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.35);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.blog-article-body a:hover {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* ── Tables ─────────────────────────────────── */
.blog-article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 420px;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.blog-article-body thead th {
    background: rgba(91, 93, 230, 0.14);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.875rem 1.125rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}
.blog-article-body thead th:first-child { border-radius: 11px 0 0 0; }
.blog-article-body thead th:last-child  { border-radius: 0 11px 0 0; }

.blog-article-body tbody td {
    padding: 0.75rem 1.125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.55;
}
.blog-article-body tbody tr:last-child td { border-bottom: none; }
.blog-article-body tbody tr:last-child td:first-child { border-radius: 0 0 0 11px; }
.blog-article-body tbody tr:last-child td:last-child  { border-radius: 0 0 11px 0; }

/* Zebra striping */
.blog-article-body tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.018);
}
.blog-article-body tbody tr:hover td {
    background: rgba(91, 93, 230, 0.05);
    transition: background 0.15s;
}
/* First column emphasis */
.blog-article-body tbody td:first-child {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(99, 102, 241, 0.08), transparent 60%),
                radial-gradient(ellipse at bottom left, rgba(168, 85, 247, 0.06), transparent 60%);
    pointer-events: none;
}

.contact-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.contact-info h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.contact-detail .label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.contact-detail .value {
    font-weight: 600;
    font-size: 0.9375rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.social-link:hover {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.social-link .tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.social-link:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s;
}

.form-group textarea ~ label {
    top: 1rem;
    transform: none;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: 0.375rem;
    transform: none;
    font-size: 0.6875rem;
    color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Custom Select Dropdown */
.custom-select-group {
    z-index: 10;
}

.custom-select-group label {
    top: 0.375rem;
    transform: none;
    font-size: 0.6875rem;
    color: var(--accent);
}

.custom-select {
    position: relative;
}

button.custom-select-trigger {
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
}

.custom-select-trigger {
    width: 100%;
    padding: 1.25rem 2.75rem 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-trigger:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(91, 93, 230, 0.04);
}

/* Arrow icon */
.custom-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    opacity: 0.5;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

/* Dropdown panel */
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1e1e2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.99);
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 16px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(91, 93, 230, 0.12);
    padding: 0.3rem;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Individual option */
.custom-select-option {
    padding: 0.7rem 0.875rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.custom-select-option::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.custom-select-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    padding-left: 1rem;
}

.custom-select-option:hover::before {
    opacity: 0.5;
}

.custom-select-option.active {
    color: var(--text-primary);
    background: rgba(91, 93, 230, 0.12);
    font-weight: 500;
}

.custom-select-option.active::before {
    opacity: 1;
    background: var(--accent);
}

/* Separator between options */
.custom-select-option + .custom-select-option {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.submit-btn {
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 24px var(--accent-glow);
    transform: translateY(-2px);
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Separator */
.footer-sep {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-hover), transparent);
    margin-bottom: 2rem;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toast-in 0.3s ease;
    min-width: min(300px, calc(100vw - 40px));
    font-size: 0.875rem;
}

@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid var(--accent); }

/* ============================================
   AVAILABILITY BADGE
   ============================================ */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 9999px;
    color: #22c55e;
    font-size: 0.8125rem;
    font-weight: 500;
}

.availability-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

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

/* ============================================
   SKIP LINK
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4F51D0;
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100000;
    transition: top 0.3s;
}

.skip-link:focus { top: 0; }

/* ============================================
   FOCUS VISIBLE
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* No extra hover elements needed — pure CSS transitions */

/* Hide hero elements until GSAP entry animations run */
.hero-pre-hidden {
    opacity: 0;
    visibility: hidden;
}

/* ============================================
   UTILITY ANIMATIONS (CSS-driven scroll reveals)
   ============================================ */
.reveal-up,
.section-title,
.skill-card,
.project-card,
.pricing-card,
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed,
.section-title.revealed,
.skill-card.revealed,
.project-card.revealed,
.pricing-card.revealed,
.blog-card.revealed {
    opacity: 1;
    transform: none;
}

/* Restore hover transitions on cards after reveal */
.skill-card.revealed,
.project-card.revealed,
.pricing-card.revealed,
.blog-card.revealed {
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger effect for cards in same row */
.skill-card:nth-child(2) { transition-delay: 0.05s; }
.skill-card:nth-child(3) { transition-delay: 0.1s; }
.skill-card:nth-child(4) { transition-delay: 0.15s; }
.skill-card:nth-child(5) { transition-delay: 0.2s; }
.skill-card:nth-child(6) { transition-delay: 0.25s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }
.pricing-card:nth-child(2) { transition-delay: 0.1s; }
.pricing-card:nth-child(3) { transition-delay: 0.2s; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Touch device overrides */
@media (hover: none) and (pointer: coarse) {
    * { cursor: auto !important; }
    .cursor-dot, .cursor-ring { display: none !important; }
    .magnetic { transition: none; }

    /* Project cards on touch: show content below image, not as overlay */
    .project-card-overlay {
        position: static;
        background: none;
        opacity: 1;
        padding: 1.25rem 1.25rem 1.5rem;
        border-top: 1px solid var(--border);
    }
    .project-card-overlay h3 { font-size: 1.15rem; }
    .project-card-overlay p { color: var(--text-secondary); }
    .project-card:hover { transform: none; }
    .project-card:hover .project-card-image img { transform: none; }

    /* Disable hover transforms on skill cards */
    .skill-card:hover { transform: none; box-shadow: none; }
    .skill-card:hover::before { opacity: 0; }

    /* Hide social link tooltips (they need hover) */
    .social-link .tooltip { display: none; }
}

/* Mobile: < 768px */
@media screen and (max-width: 767px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-inner { padding: 0 1.25rem; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
        font-size: 1rem;
    }
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-buttons { justify-content: center; }

    .hero-image-wrapper {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    .hero-image { order: -1; }

    /* Hide scroll indicator on mobile - content stacks long */
    .scroll-indicator { display: none; }

    .about-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .bento-photo {
        min-height: 260px;
    }

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

    .bento-bio-bottom {
        flex-direction: column;
        gap: 0.75rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-card {
        padding: 1rem;
    }

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

    .project-card-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }

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

    .pricing-card .price {
        font-size: 2rem;
    }

    .tm-slider {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .tm-slide {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .tm-photo {
        width: 80px;
        height: 80px;
    }

    .tm-text {
        font-size: 1rem;
    }

    .tm-stars {
        justify-content: center;
    }

    .tm-author {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tm-big-quote {
        font-size: 5rem;
        left: 1rem;
    }

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

    .blog-card.featured {
        grid-row: auto;
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Fix textarea for mobile (can't resize on touch) */
    .form-group textarea {
        min-height: 160px;
        resize: none;
    }

    /* Custom select adjustments for mobile */
    .custom-select-trigger {
        font-size: 0.875rem;
    }

    .custom-select-group label {
        top: 0.25rem;
        font-size: 0.625rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .project-panel {
        width: 100%;
        max-width: 100%;
    }

    .project-panel-content {
        padding: 1.5rem;
    }

    .project-panel-content .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-panel-content .gallery img {
        height: 120px;
    }

    .blog-panel {
        width: 100%;
        max-width: 100%;
    }

    .blog-panel-hero {
        height: 220px;
    }

    .blog-panel-content {
        padding: 1.5rem 1.25rem 3rem;
    }

    .blog-panel-title {
        font-size: 1.5rem;
    }

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

    .hero {
        padding: 6rem 1.25rem 3rem;
    }

    .about, .skills, .portfolio, .services, .testimonials, .faq, .blog, .contact {
        padding: 3rem 1.25rem;
    }

    .preloader-counter { font-size: 3rem; }

    /* Skill popup mobile */
    .skill-popup {
        padding: 1.5rem;
        width: 92%;
    }
}

/* Extra-small screens: < 375px */
@media screen and (max-width: 374px) {
    .hero-stats { gap: 1rem; }
    .hero-stat-number { font-size: 1.25rem; }
    .hero-stat-label { font-size: 0.75rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn-primary, .btn-outline { width: 100%; justify-content: center; }
    .skills-grid { grid-template-columns: 1fr; }
    .tm-slides { /* height set by JS */ }
    .social-links { flex-wrap: wrap; justify-content: center; }
}

/* Tablet: 768px - 1023px */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* Hide desktop nav, show hamburger on tablet too */
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-stats { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .hero-image { justify-content: center; }

    .hero-image-wrapper {
        width: 300px;
        height: 300px;
    }

    .about-row {
        grid-template-columns: 1fr 1fr;
        min-height: 380px;
    }

    .exp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

    .project-panel {
        width: 85%;
        max-width: 85%;
    }

    .blog-panel {
        width: 85%;
        max-width: 85%;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print */
/* ============================================
   CONFIGURATOR PANEL
   ============================================ */
.config-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.config-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.config-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 55%;
    max-width: 700px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
}

.config-panel.active {
    transform: translateX(0);
}

.config-panel-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.config-panel-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.config-panel-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2.5rem 2rem;
    padding-bottom: 1rem;
}

.config-panel-content::-webkit-scrollbar {
    width: 6px;
}

.config-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.config-panel-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.config-header {
    margin-bottom: 2rem;
}

.config-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.config-header .config-base-price {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
}

.config-section {
    margin-bottom: 1.75rem;
}

.config-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-section-title i {
    font-size: 0.8rem;
}

/* Radio card group */
.config-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-radio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.25s;
}

.config-radio:hover {
    border-color: var(--accent);
}

.config-radio.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.config-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}

.config-radio.selected .config-radio-dot {
    border-color: var(--accent);
}

.config-radio.selected .config-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.config-radio-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.config-radio-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 0.75rem;
    white-space: nowrap;
}

.config-radio.selected .config-radio-price {
    color: var(--accent);
}

/* Checkbox items */
.config-check-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.config-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.25s;
}

.config-check:hover {
    border-color: var(--accent);
}

.config-check.checked {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.config-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}

.config-check.checked .config-checkbox {
    border-color: var(--accent);
    background: var(--accent);
}

.config-check.checked .config-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    color: white;
}

.config-check-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.config-check-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 0.75rem;
    white-space: nowrap;
}

.config-check.checked .config-check-price {
    color: var(--accent);
}

.config-included {
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
}

/* Contact fields inside configurator */
.config-form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.config-form-section .config-section-title {
    margin-bottom: 1rem;
}

.config-field {
    margin-bottom: 1rem;
}

.config-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.config-field input,
.config-field textarea,
.config-field select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.config-field input:focus,
.config-field textarea:focus,
.config-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.config-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Custom config dropdowns (enterprise form) */
.config-dropdown {
    position: relative;
}

.config-dropdown-trigger {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.config-dropdown-trigger:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.config-dropdown-trigger:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.config-dropdown.open .config-dropdown-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.config-dropdown-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.config-dropdown-value.placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.config-dropdown-chevron {
    flex-shrink: 0;
    color: #666;
    transition: transform 0.25s ease, color 0.2s;
}

.config-dropdown.open .config-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.config-dropdown-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    z-index: 60;
    list-style: none;
    margin: 0;
    padding: 0.3rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.config-dropdown.open .config-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.config-dropdown-option {
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: 0.35rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.config-dropdown-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.config-dropdown-option.selected {
    color: var(--accent);
    background: rgba(91, 93, 230, 0.1);
}

.config-dropdown-option.selected::after {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* Sticky summary bar */
.config-summary {
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.config-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.config-summary-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.config-summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.config-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: #4F51D0;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.config-submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 24px var(--accent-glow);
    transform: translateY(-1px);
}

.config-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Enterprise panel - no summary bar, just form */
.config-panel.enterprise .config-summary {
    display: none;
}

/* Responsive */
@media (max-width: 767px) {
    .config-panel {
        width: 100%;
        max-width: none;
    }

    .config-panel-content {
        padding: 2rem 1.25rem;
        padding-bottom: 0.5rem;
    }

    .config-summary {
        padding: 1rem 1.25rem;
    }

    .config-radio-label,
    .config-check-label {
        font-size: 0.85rem;
    }

    .config-radio-price,
    .config-check-price {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .config-panel {
        width: 75%;
    }
}

@media print {
    .preloader, .cursor-dot, .cursor-ring, .scroll-progress, .toast-container, .gradient-mesh, .mobile-menu { display: none !important; }
    body { background: white; color: black; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
    }
    .gradient-blob, .marquee-track, .marquee-group, .hero-image-blob, .hero-image-wrapper img {
        animation: none !important;
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), background var(--transition-fast);
    z-index: 90;
    backdrop-filter: blur(10px);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.back-to-top:active {
    transform: scale(0.95);
}

/* ============================================
   GALLERY LIGHTBOX
   ============================================ */
.gallery img {
    cursor: pointer;
}
/* ============================================
   LIGHTBOX GALLERY
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    visibility: hidden;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease, visibility 0s 0.3s;
    cursor: auto;
}
.lightbox-overlay.active {
    pointer-events: auto;
    visibility: visible;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.3s ease, visibility 0s 0s;
}
/* Restore cursor inside lightbox */
.lightbox-overlay, .lightbox-overlay * {
    cursor: auto !important;
}

/* Top bar — counter + close */
.lightbox-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    padding-top: max(1rem, env(safe-area-inset-top, 1rem));
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}
.lightbox-overlay.active .lightbox-top {
    opacity: 1;
}
.lightbox-counter {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}
.lightbox-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body — arrows + image */
.lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.5rem 2rem;
    min-height: 0;
}

/* Arrows */
.lightbox-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    opacity: 0;
    position: relative;
}
/* Hit area spans full image height */
.lightbox-arrow::before {
    content: '';
    position: absolute;
    top: -50vh;
    bottom: -50vh;
    left: -1.5rem;
    right: -1.5rem;
}
.lightbox-overlay.active .lightbox-arrow {
    opacity: 1;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, opacity 0.3s ease 0.15s;
}
.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}
.lightbox-prev:hover { transform: translateX(-2px); }
.lightbox-next:hover { transform: translateX(2px); }

/* Image */
.lightbox-overlay img {
    max-width: calc(100% - 10rem);
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-overlay.active img {
    transform: scale(1);
    opacity: 1;
}

/* Nav row + swipe hint — hidden on desktop, visible on mobile */
.lightbox-nav-row {
    display: none;
}
.lightbox-swipe-hint {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.lightbox-swipe-hint svg {
    opacity: 0.5;
}

/* Mobile — arrows + swipe hint below image */
@media screen and (max-width: 767px) {
    .lightbox-body {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem 1.5rem;
    }
    .lightbox-overlay img {
        max-width: 100%;
        max-height: 60vh;
    }
    /* Nav row: prev — swipe hint — next */
    .lightbox-nav-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }
    .lightbox-swipe-hint {
        display: flex;
    }
    /* Hide arrows from body flow on mobile — they're inside nav-row */
    .lightbox-body > .lightbox-arrow {
        display: none;
    }
}

/* Blog card "Read article" button */
.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1.125rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-hover);
    text-decoration: none;
    letter-spacing: 0.02em;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.blog-read-more:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
    transform: translateX(2px);
}

/* ============================================
   BLOG STATIC PAGES
   ============================================ */

/* Disable custom cursor on blog pages */
.blog-page-body,
.blog-page-body * { cursor: auto !important; }

/* Reading progress bar */
.blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 9999;
    transition: width 80ms linear;
}

/* Header */
.blog-page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.blog-page-header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.blog-logo-link {
    text-decoration: none;
    flex-shrink: 0;
}

.blog-logo-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb .breadcrumb-sep { color: rgba(255,255,255,0.2); }

/* Hero — full-bleed image with overlay */
.blog-page-hero {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
}

.blog-page-hero-img-wrap {
    position: absolute;
    inset: 0;
}

.blog-page-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.97) 0%, rgba(10,10,10,0.65) 40%, rgba(10,10,10,0.25) 100%);
}

.blog-page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 5rem 1.5rem 3rem;
    width: 100%;
}

.blog-page-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.blog-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-hover);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.blog-date {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.blog-read-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

.blog-read-time::before {
    content: '·';
    margin-right: 0.75rem;
}

.blog-page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.875rem, 5vw, 3rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.12;
    letter-spacing: -0.03em;
    max-width: 660px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* Author bar */
.blog-author-bar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.blog-author-bar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(91, 93, 230, 0.4);
    box-shadow: 0 0 0 3px rgba(91, 93, 230, 0.1);
}

.blog-author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.blog-author-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.blog-author-role {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* Article */
.blog-page-article {
    padding: 4rem 1.5rem 5rem;
    background: var(--bg-primary);
}

.blog-page-article-inner {
    max-width: 720px;
    margin: 0 auto;
}

/* CTA */
.blog-page-cta {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 5rem 1.5rem;
    text-align: center;
}

.blog-cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.blog-page-cta-inner {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.blog-page-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.blog-page-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Footer */
.blog-page-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
}

.blog-page-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.blog-back-link:hover { color: var(--accent); }

.blog-footer-copy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Blog page responsive */
@media (max-width: 600px) {
    .blog-page-hero { min-height: 300px; }
    .blog-page-hero-inner { padding: 3.5rem 1.25rem 2.25rem; }
    .blog-author-role { display: none; }
    .blog-page-article { padding: 2.5rem 1.25rem 4rem; }
    .blog-article-body { font-size: 1rem; }
    .blog-article-body h2 { font-size: 1.2rem; margin-top: 2.25rem; }
    .blog-article-body h3 { font-size: 1.05rem; }
    .blog-article-body table { font-size: 0.825rem; }
    .blog-article-body thead th,
    .blog-article-body tbody td { padding: 0.625rem 0.875rem; }
    .blog-page-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 768px) {
    .blog-page-hero { min-height: 500px; }
}

/* ============================================
   BLOG POST PAGE (standalone article page)
   ============================================ */
.blog-post-page {
    min-height: 100vh;
    background: var(--bg-primary);
    padding-top: 80px;
}

.blog-post-hero {
    position: relative;
    width: 100%;
    height: clamp(240px, 45vw, 480px);
    overflow: hidden;
}

.blog-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 60%);
}

.blog-post-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.blog-post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s;
}
.blog-post-back:hover { color: var(--text-primary); }

.blog-post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.blog-post-author-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.blog-post-author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.15rem;
}

.blog-post-author-role {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 640px) {
    .blog-post-container { padding: 2rem 1.25rem 4rem; }
}
