/* ═══════════════════════════════════════════════════════
   DIEGO HERNÁN NOGUEIRA — PORTFOLIO
   Design System & Core Styles
   ═══════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
    /* Color Palette — Institutional Navy + Warm Gold */
    --navy-950: #0a0f1e;
    --navy-900: #0d1528;
    --navy-800: #131d36;
    --navy-700: #1a2744;
    --navy-600: #243354;
    --navy-500: #334a6e;
    --navy-400: #4a6690;
    --navy-300: #7a9ac0;
    --navy-200: #afc4de;
    --navy-100: #dce6f0;
    --navy-50: #f0f4f8;

    --gold-500: #c9a84c;
    --gold-400: #d4b96a;
    --gold-300: #e0ca8a;
    --gold-200: #ecdbb0;
    --gold-100: #f5ecce;

    --accent-cyan: #38bdf8;
    --accent-emerald: #34d399;
    --accent-rose: #fb7185;
    --accent-violet: #a78bfa;

    --text-primary: #f0f4f8;
    --text-secondary: #afc4de;
    --text-muted: #7a9ac0;
    --text-dark: #0d1528;

    --glass-bg: rgba(13, 21, 40, 0.6);
    --glass-border: rgba(122, 154, 192, 0.15);
    --glass-hover: rgba(201, 168, 76, 0.08);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Sizing */
    --section-padding: clamp(60px, 10vh, 120px);
    --container-max: 1200px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* 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-spring: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--navy-950);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: var(--gold-500);
    color: var(--navy-950);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--gold-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold-300);
}

/* ─── Background Ambient ─── */
.bg-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-ambient .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-ambient .orb-1 {
    width: 600px;
    height: 600px;
    background: var(--gold-500);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.bg-ambient .orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.bg-ambient .orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-violet);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -40px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }
}

/* Dot grid overlay */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(122, 154, 192, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ─── Navigation ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-smooth);
}

.nav.scrolled {
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.nav-brand span {
    color: var(--gold-500);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-500);
    transition: width var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-400);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile menu button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 0;
    transition: var(--transition-fast);
}

.nav-toggle span:nth-child(1) {
    top: 0;
}

.nav-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle span:nth-child(3) {
    bottom: 0;
}

.nav-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ─── Container ─── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

/* ─── Section ─── */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--gold-500);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ─── Hero Section ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-eyebrow::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--gold-500);
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    /* Reduced by ~5% from (3rem, 7vw, 5.5rem) */
    font-weight: 700;
    line-height: 1.2;
    padding-bottom: 10px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-400) 50%, var(--text-primary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-role {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.hero-role strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold-500), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Geometric decorations in hero */
.hero-geo {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 80%;
    z-index: 1;
    pointer-events: none;
}

.geo-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    animation: geoRotate 30s linear infinite;
}

.geo-ring-1 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.geo-ring-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-direction: reverse;
    animation-duration: 25s;
}

.geo-ring-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(201, 168, 76, 0.15);
}

.geo-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-500);
    opacity: 0.6;
}

.geo-dot-1 {
    top: 20%;
    right: 30%;
}

.geo-dot-2 {
    bottom: 30%;
    right: 10%;
}

.geo-dot-3 {
    top: 40%;
    right: 60%;
}

@keyframes geoRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-950);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.35);
    color: var(--navy-950);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--gold-500);
    color: var(--gold-400);
    background: var(--glass-hover);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
    transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
    transform: translateX(3px);
}

/* ─── Glass Cards ─── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: all var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(201, 168, 76, 0.25);
    background: rgba(13, 21, 40, 0.75);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ─── Quote Section ─── */
.quote-section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.quote-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 40px;
}

.quote-wrapper::before {
    content: '"';
    font-family: var(--font-display);
    font-size: 12rem;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-500);
    opacity: 0.1;
    line-height: 1;
    pointer-events: none;
}

.quote-text {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.quote-text .highlight {
    color: var(--gold-400);
    font-weight: 700;
}

.quote-line {
    width: 60px;
    height: 2px;
    background: var(--gold-500);
    margin: 30px auto 0;
}

/* ─── Services Grid ─── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--gold-500);
    transition: height var(--transition-smooth);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.15);
}

.service-card:nth-child(1) .service-icon {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.15);
}

.service-card:nth-child(2) .service-icon {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.15);
}

.service-card:nth-child(3) .service-icon {
    background: rgba(201, 168, 76, 0.08);
    border-color: rgba(201, 168, 76, 0.15);
}

.service-card:nth-child(4) .service-icon {
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.15);
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Experience Timeline ─── */
.timeline {
    position: relative;
    margin-top: 48px;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold-500), var(--glass-border), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -44px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 0 4px var(--navy-950), 0 0 0 5px var(--gold-500);
}

.timeline-date {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-org {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold-400);
    border: 1px solid rgba(201, 168, 76, 0.15);
}

/* ─── Education ─── */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.edu-card {
    padding: 28px;
}

.edu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.15);
    margin-bottom: 16px;
}

.edu-degree {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edu-institution {
    font-size: 0.88rem;
    color: var(--gold-400);
    margin-bottom: 8px;
}

.edu-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Stats Row ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
    padding: 28px 16px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--gold-400);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ─── Tech Stack ─── */
.tech-marquee {
    overflow: hidden;
    padding: 40px 0;
    position: relative;
}

.tech-marquee::before,
.tech-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
}

.tech-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--navy-950), transparent);
}

.tech-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--navy-950), transparent);
}

.tech-track {
    display: flex;
    gap: 48px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.tech-item:hover {
    opacity: 1;
    color: var(--text-secondary);
}

.tech-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-500);
    opacity: 0.5;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ─── Contact Section ─── */
.contact-section {
    padding: var(--section-padding) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 48px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.15);
    flex-shrink: 0;
}

.contact-info-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact Form */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(13, 21, 40, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ─── Footer ─── */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold-400);
}

/* ─── Reveal Animations ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-geo {
        display: none;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 15, 30, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 24px;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle {
        display: block;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        justify-content: center;
    }
}

/* ─── Demo de Productos ─── */
.demo-grid {
    margin-top: 48px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.demo-card {
    padding: 40px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--gold-500);
}

.demo-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.demo-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--accent-emerald);
    animation: livePulse 2.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }
}

.demo-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.demo-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.demo-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 32px;
    max-width: 780px;
}

.demo-desc strong {
    color: var(--text-primary);
}

.demo-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.demo-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(13, 21, 40, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    transition: all var(--transition-fast);
}

.demo-features li:hover {
    border-color: rgba(201, 168, 76, 0.25);
    background: rgba(201, 168, 76, 0.04);
    transform: translateY(-2px);
}

.demo-features li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feature-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Extensible highlight block */
.demo-extensible {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.07), rgba(201, 168, 76, 0.02));
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--border-radius);
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.demo-extensible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-500), var(--gold-300));
    border-radius: 4px 0 0 4px;
}

.extensible-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.demo-extensible strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-400);
    margin-bottom: 8px;
}

.demo-extensible p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
}

.demo-btn {
    font-size: 1rem;
    padding: 16px 36px;
}

/* ─── Video Card ─── */
.demo-badge-video {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--accent-cyan);
    animation: none;
}

.demo-video-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: flex-start;
    margin-top: 8px;
}

.demo-video-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16 / 10;
}

.demo-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.demo-video-desc {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Single-column features list inside the video card */
.demo-features-video {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}


@media (max-width: 768px) {
    .demo-features {
        grid-template-columns: 1fr;
    }

    .demo-card {
        padding: 28px 20px;
    }

    .demo-extensible {
        flex-direction: column;
        gap: 12px;
    }

    .demo-video-layout {
        grid-template-columns: 1fr;
    }

    .demo-video-wrapper {
        aspect-ratio: 16 / 9;
    }
}