/* ============================================
   SANTORO GABRIELE - PREMIUM DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ── */
:root {
    /* Primary Palette */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --primary-glow: rgba(124, 58, 237, 0.4);

    /* Accent */
    --accent: #06b6d4;
    --accent-light: #67e8f9;
    --accent-glow: rgba(6, 182, 212, 0.3);

    /* Surfaces */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.12);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --gradient-hero: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(6, 182, 212, 0.7) 100%);
    --gradient-card: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
    --gradient-text: linear-gradient(135deg, #a78bfa 0%, #67e8f9 100%);

    /* Spacing */
    --section-padding: 100px;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

/* ── Navbar ── */
.navbar {
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    background: transparent;
}

.navbar-color {
    background: rgba(10, 10, 15, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0 !important;
}

.navbar-brand img {
    transition: var(--transition-smooth);
}

.navbar-color .navbar-brand img {
    height: 38px !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    transition: var(--transition-smooth);
    letter-spacing: 0.01em;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-light) !important;
}

/* Hamburger */
.navbar-toggler {
    border: none;
    outline: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler span {
    display: block;
    background-color: #f5f5f5;
    height: 2px;
    width: 24px;
    margin: 5px 0;
    position: relative;
    transition: all 0.35s ease-out;
    transform-origin: center left;
    border-radius: 2px;
}

/* Hide the main hamburger button when offcanvas is open to prevent overlapping with the offcanvas close button */
.navbar-toggler:not(.collapsed),
.navbar-toggler[aria-expanded="true"] {
    opacity: 0 !important;
    pointer-events: none;
}

/* ── Hero Section ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 10, 15, 0.94) 0%,
            rgba(90, 40, 180, 0.25) 50%,
            rgba(6, 140, 180, 0.15) 100%);
    z-index: 1;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
    animation: meshMove 12s ease-in-out infinite alternate;
}

@keyframes meshMove {
    0% {
        opacity: 0.4;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.05) translateY(-20px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content .hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

/* Typing Effect */
.typing-wrapper {
    display: inline-block;
    min-height: 1.3em;
}

.typing-text {
    border-right: 3px solid var(--primary-light);
    animation: blink 0.75s step-end infinite;
    white-space: nowrap;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: scrollBounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.scroll-indicator .arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--primary-light);
    border-bottom: 2px solid var(--primary-light);
    transform: rotate(45deg);
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ── Buttons ── */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-glow-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-glow-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
    color: #fff;
    text-decoration: none;
}

.btn-glow-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-glow-primary:hover::before {
    opacity: 1;
}

.btn-glow-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.btn-glow-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-glow:active {
    transform: translateY(1px) scale(0.98);
}

/* Legacy btn-primary override */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
    border: none;
}

.btn-outline-light {
    border-radius: var(--radius-xl);
    padding: 0.7rem 1.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-color: var(--border-glass);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

/* ── Glass Cards ── */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px var(--primary-glow);
}

.glass-card .card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-subtle);
}

.glass-card:hover .card-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: var(--primary);
}

.glass-card h5,
.glass-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.glass-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── About Avatar ── */
.about-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 40px var(--primary-glow);
    border: 3px solid transparent;
    background-image: var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.about-avatar::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    opacity: 0.3;
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ── Tech Stack Marquee ── */
.marquee-wrapper {
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    margin-top: 1rem;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: default;
    flex-shrink: 0;
}

.marquee-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
    transform: scale(1.05);
}

.marquee-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-light);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.marquee-item:hover .marquee-icon {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.marquee-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.marquee-item:hover span {
    color: var(--text-primary);
}

/* ── Service Cards (Services page) ── */
.service-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(124, 58, 237, 0.15);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card .card-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-card .card-body {
    padding: 1.5rem;
}

.service-card .card-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.service-icon {
    font-size: 1.5rem;
    color: var(--primary-light);
}

/* ── Stats Section ── */
.stats-section {
    padding: 4rem 0;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Sections ── */
.section-padding {
    padding: var(--section-padding) 0;
}

.section-dark {
    background: var(--bg-secondary);
    position: relative;
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* ── Hero Services Page ── */
.hero-section {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 10, 15, 0.9) 0%,
            rgba(124, 58, 237, 0.4) 50%,
            rgba(6, 182, 212, 0.25) 100%);
    z-index: 1;
}

.hero-section>* {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
}

/* ── Contact Page ── */
.contact {
    margin-top: 120px;
}

.card {
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(124, 58, 237, 0.2);
}

.card h3,
.card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card p,
.card ul {
    color: var(--text-secondary);
}

.card ul {
    padding-left: 1.2rem;
}

.card ul li {
    margin-bottom: 0.5rem;
}

/* Forms */
.form-control {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.09);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-check-label {
    color: var(--text-secondary);
}

.form-check-label a {
    color: var(--primary-light) !important;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.input-validation-error .form-control {
    border: 1px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.contact-description p,
.contact-description a {
    color: var(--text-secondary);
}

.contact-description a:hover {
    color: var(--primary-light);
}

#map {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

/* ── Footer ── */
.site-footer {
    background: var(--bg-secondary);
    position: relative;
    padding-top: 3rem;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.site-footer h5 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-secondary) !important;
    text-decoration: none;
    transition: var(--transition-fast);
}

.site-footer a:hover {
    color: var(--primary-light) !important;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px var(--primary-glow);
    color: #fff !important;
}

.footer-divider {
    border-color: var(--border-subtle) !important;
    margin: 2rem 0 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem 0 1.5rem;
}

/* ── CTA Sections ── */
.cta-section {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.cta-section>* {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    max-width: 550px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

/* Curious Section override */
.curious-section {
    background: transparent;
    position: relative;
    padding: 5rem 1.5rem;
    text-align: center;
    margin-top: 0;
}

.curious-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    border-top: 1px solid var(--border-subtle);
}

.curious-section>* {
    position: relative;
    z-index: 1;
}

.curious-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.curious-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.curious-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.2rem;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-xl);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.curious-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
    color: #fff;
    text-decoration: none;
}

/* ── Offcanvas Mobile ── */
.offcanvas {
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-subtle) !important;
    z-index: 1055 !important;
}

.offcanvas-backdrop {
    z-index: 1050 !important;
}

.offcanvas-header {
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
}

.offcanvas-body {
    background: transparent;
    padding: 1.5rem;
}

.offcanvas-body .nav-link {
    color: var(--text-primary) !important;
    font-size: 1.3rem;
    font-weight: 500;
    padding: 1rem 1.2rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.offcanvas-body .nav-link:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--primary-light) !important;
}

.offcanvas-body .nav-link.active {
    color: var(--primary-light) !important;
    background: rgba(124, 58, 237, 0.1);
}

/* ── GSAP Animations ── */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale, .stagger-item {
    will-change: transform, opacity;
}

.reveal-up {
    opacity: 0;
    transform: translateY(60px);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal-up, .reveal-left, .reveal-right, .reveal-scale, .stagger-item, .hero-content > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ── Floating Animation ── */
.float-animation {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ── Particle Grid Background ── */
.particle-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .hero-description {
        font-size: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn-glow {
        justify-content: center;
    }

    .stat-item {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .hero-section {
        padding: 130px 0 70px;
    }
}

@media (max-width: 991px) {
    /* Fix Typewriter overflow on mobile and prevent vertical layout jumping */
    .typing-text {
        white-space: pre-wrap;
        word-break: break-word;
    }
    
    .typing-wrapper {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        min-height: 3em; /* Reserve enough space for 3 lines on mobile */
        margin: 0 auto;
    }

    /* WCAG 2.1 Touch Target Size (44x44) for Mobile and Landscape */
    .btn, .btn-primary, .btn-outline-light, .btn-glow, .nav-link, .cookie-btn-accept, .cookie-btn-reject, .curious-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Removed navbar-toggler from this media query completely to preserve original HTML/CSS animation math */
    
    .offcanvas-body .nav-link {
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero {
        min-height: 100svh;
    }

    .glass-card {
        padding: 1.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}

/* Tablet specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    :root {
        --section-padding: 80px;
    }
}

/* ── Link reset ── */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
    text-decoration: none;
}

/* ── Misc ── */
.container {
    margin-top: 0;
    padding-bottom: 0;
}

.bg-dark {
    background-color: var(--bg-secondary) !important;
}

/* Contact form card override */
.contact-form-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

/* ── Cookie Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-top: 1px solid var(--border-glass);
    padding: 1.2rem 1.5rem;
    transform: translateY(100%);
    animation: slideUp 0.5s 0.5s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.cookie-banner-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 250px;
}

.cookie-banner a {
    color: var(--primary-light);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn-accept {
    padding: 0.55rem 1.5rem;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.cookie-btn-reject {
    padding: 0.55rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-reject:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.cookie-banner.hidden {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    to {
        transform: translateY(100%);
    }
}

@media (max-width: 576px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
}