/* ========================================
   PUBLIC SITE - Estilos
   Tema oscuro minimalista
   ======================================== */

/* --- Reset & Variables --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12121f;
    --bg-card: #16162a;
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --accent: #22d3ee;
    --accent-hover: #06b6d4;
    --accent-glow: rgba(34, 211, 238, 0.12);
    --border: #1e1e3a;
    --success: #22c55e;
    --error: #ef4444;
    --nav-height: 70px;
    --radius: 8px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn--primary {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.95);
    border-bottom-color: var(--border);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar__logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

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

.navbar__menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.navbar__link {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.navbar__link:hover,
.navbar__link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Hamburger */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.navbar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

/* 6. Gradient animado en hero */
.hero--animated-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 20% 50%, rgba(34, 211, 238, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 300px at 80% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    animation: gradientShift 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { opacity: 0.4; transform: scale(1) translateX(0); }
    50% { opacity: 1; transform: scale(1.1) translateX(30px); }
    100% { opacity: 0.6; transform: scale(1.05) translateX(-20px); }
}

/* 4. Glow cursor */
.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    visibility: hidden; /* JS lo muestra al iniciar typing */
    min-height: 1.2em;
}

/* 1. Typing cursor */
.typing-cursor {
    color: var(--accent);
    font-weight: 300;
    animation: blink 0.7s step-end infinite;
    margin-left: 2px;
}

.typing-cursor--done {
    animation: blink 0.7s step-end 3;
    animation-fill-mode: forwards;
    opacity: 0;
}

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

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.hero__text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero__cta {
    font-size: 1.05rem;
    padding: 14px 40px;
}

.hero__anchor {
    margin-top: 48px;
    padding: 20px 28px;
    border-left: 3px solid var(--accent);
    background: rgba(34, 211, 238, 0.04);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECTIONS GENERALES --- */
.section {
    padding: 100px 0;
}

.section--alt {
    background: var(--bg-secondary);
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
}

/* --- SERVICIOS --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all var(--transition);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.service-card__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
    filter: grayscale(0.1);
    display: inline-block;
}

/* Animaciones por tipo de icono */
.service-card:nth-child(1) .service-card__icon {
    animation: iconSpin 6s linear infinite;
}

.service-card:nth-child(2) .service-card__icon {
    animation: iconGear 3s ease-in-out infinite;
}

.service-card:nth-child(3) .service-card__icon {
    animation: iconBounce 2s ease-in-out infinite;
}

.service-card:nth-child(4) .service-card__icon {
    animation: iconPulse 2s ease-in-out infinite;
}

.service-card:nth-child(5) .service-card__icon {
    animation: iconSwing 3s ease-in-out infinite;
}

.service-card:nth-child(6) .service-card__icon {
    animation: iconVibrate 2.5s ease-in-out infinite;
}

/* 🌐 Giro orbital lento */
@keyframes iconSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* ⚙️ Rotacion de engranaje */
@keyframes iconGear {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(120deg); }
}

/* 🛒 Rebote */
@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(-4px); }
}

/* ⚡ Pulso flash */
@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* 🧭 Oscilacion brujula */
@keyframes iconSwing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* 📱 Vibracion */
@keyframes iconVibrate {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px) rotate(-1deg); }
    20% { transform: translateX(2px) rotate(1deg); }
    30% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    50% { transform: translateX(0); }
}

.service-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-card__desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* --- PROCESO --- */
.process-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 80px;
}

/* Linea vertical conectora */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 35px;
    width: 2px;
    background: var(--border);
}

/* 3. Process line animated */
.process-line-progress {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 35px;
    width: 2px;
    background: var(--accent);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
}

.process-line-progress.animate {
    transform: scaleY(1);
}

.process-step {
    position: relative;
    padding: 28px 0 28px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.process-step:last-child {
    border-bottom: none;
}

.process-step:hover {
    padding-left: 12px;
}

.process-step__number {
    position: absolute;
    left: -80px;
    top: 28px;
    width: 52px;
    font-size: 2rem;
    font-weight: 900;
    color: var(--border);
    text-align: center;
    line-height: 1;
    z-index: 2;
    transition: all 0.5s ease;
    font-variant-numeric: tabular-nums;
}

.process-step:hover .process-step__number {
    color: var(--accent);
    text-shadow: 0 0 25px var(--accent-glow);
}

/* Dot on the line */
.process-step::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 36px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    z-index: 2;
    transition: all 0.4s ease;
}

.process-step:hover::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.process-step__content {
    /* empty, just structure */
}

.process-step__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.process-step:hover .process-step__title {
    color: var(--accent);
}

.process-step__desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.process-step__tag {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.15);
    border-radius: 4px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Scan line que recorre el tag */
.process-step__tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.15), transparent);
    animation: tagScan 3s ease-in-out infinite;
}

.process-step:nth-child(1) .process-step__tag::after { animation-delay: 0s; }
.process-step:nth-child(2) .process-step__tag::after { animation-delay: 0.6s; }
.process-step:nth-child(3) .process-step__tag::after { animation-delay: 1.2s; }
.process-step:nth-child(4) .process-step__tag::after { animation-delay: 1.8s; }
.process-step:nth-child(5) .process-step__tag::after { animation-delay: 2.4s; }

@keyframes tagScan {
    0% { left: -100%; }
    40% { left: 100%; }
    100% { left: 100%; }
}

/* Cursor blink al final del tag */
.process-step__tag::before {
    content: '▋';
    position: absolute;
    right: 6px;
    font-size: 0.7rem;
    animation: tagBlink 1s step-end infinite;
    opacity: 0.6;
}

@keyframes tagBlink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0; }
}

/* Tag aparece cuando el step es visible (reveal) */
.process-step.visible .process-step__tag {
    opacity: 0.7;
}

.process-step:hover .process-step__tag {
    opacity: 1;
    border-color: rgba(34, 211, 238, 0.4);
}

/* --- PROYECTOS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.project-card__img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-secondary);
}

.project-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card__img img {
    transform: scale(1.05);
}

.project-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a1a3a 50%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.project-card__placeholder::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--accent-glow);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
}

.placeholder__name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 30px var(--accent-glow);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

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

.project-card__overlay span {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
}

.project-card__info {
    padding: 20px;
}

.project-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.project-card__desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__tag {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background var(--transition);
}

.modal__close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal__image:empty {
    display: none;
}

.modal__info {
    padding: 32px;
}

.modal__title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal__description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
    white-space: pre-line;
}

.modal__meta {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.modal__meta p {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.modal__meta strong {
    color: var(--text-primary);
}

.modal__technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.modal__technologies:empty {
    display: none;
}

.modal__tech-tag {
    font-size: 0.8rem;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.modal__link {
    display: none;
}

.modal__link.visible {
    display: inline-block;
}

/* --- CONTACTO --- */
.contact-form {
    max-width: 650px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

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

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

.contact-form__submit {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* Alertas */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.95rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alert--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

/* --- CONTEXT / OPORTUNIDAD BOLIVIA --- */
.section--context {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* Grid de fondo tech */
.context-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.section__label {
    display: inline-block;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.15);
    padding: 4px 14px;
    border-radius: 4px;
    margin-bottom: 20px;
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
}

.section__label::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.12), transparent);
    animation: tagScan 4s ease-in-out infinite;
}

/* Stats grid */
.context-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.context-stat {
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px 20px;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.context-stat:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.08);
}

.context-stat__value {
    margin-bottom: 8px;
}

.context-stat__number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.context-stat__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.context-stat__bar {
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.context-stat__fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.context-stat.visible .context-stat__fill {
    width: 100%;
}

/* Bottom quote + CTA */
.context-bottom {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.context-quote {
    margin-bottom: 32px;
    padding: 24px 28px;
    border-left: 3px solid var(--accent);
    background: rgba(34, 211, 238, 0.03);
    border-radius: 0 var(--radius) var(--radius) 0;
    text-align: left;
}

.context-quote p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.context-quote p:last-child {
    margin-bottom: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 1.05rem;
}

/* --- PARTICLES (hero canvas) --- */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* --- TERMINAL --- */
.terminal-metrics {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.terminal {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

.terminal__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
}

.terminal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #484f58;
}

.terminal__body {
    padding: 16px 18px;
    line-height: 1.9;
    min-height: 240px;
}

.terminal__line {
    opacity: 0;
    white-space: nowrap;
}

.terminal__line.typed {
    opacity: 1;
}

.terminal__prompt {
    color: var(--accent);
    font-weight: 700;
}

.terminal__cmd {
    color: #c9d1d9;
}

.terminal__output {
    color: #8b949e;
    padding-left: 16px;
}

.terminal__output--success {
    color: var(--accent);
    font-weight: 600;
}

/* --- METRICS --- */
.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.metric {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition);
}

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

.metric__number {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.metric__label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* --- FOOTER --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
}

.footer__inner {
    text-align: center;
}

.footer__text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.footer__contact {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer__contact a {
    color: var(--text-secondary);
}

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

.footer__social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.footer__social-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.footer__social-link:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

.footer__bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.footer__admin {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.78rem;
}

.footer__admin:hover {
    opacity: 1;
    color: var(--accent);
}

/* --- SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0ms; /* JS overrides for stagger */
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered cards get a slight scale too */
.services-grid .reveal,
.projects-grid .reveal {
    transform: translateY(40px) scale(0.97);
}

.services-grid .reveal.visible,
.projects-grid .reveal.visible {
    transform: translateY(0) scale(1);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar__toggle {
        display: flex;
    }

    .navbar__menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition);
    }

    .navbar__menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .navbar__link {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .hero {
        min-height: 80vh;
        padding-top: calc(var(--nav-height) + 20px);
    }

    .section {
        padding: 70px 0;
    }

    .section__header {
        margin-bottom: 40px;
    }

    .process-timeline {
        padding-left: 60px;
    }

    .process-timeline::before {
        left: 24px;
    }

    .process-line-progress {
        left: 24px;
    }

    .process-step__number {
        left: -60px;
        font-size: 1.6rem;
        width: 40px;
    }

    .process-step::before {
        left: -40px;
    }

    .process-step {
        padding: 20px 0;
    }

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

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

    .modal__content {
        width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .modal__info {
        padding: 20px;
    }

    .modal__title {
        font-size: 1.3rem;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 8px;
    }

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

    .context-stat__number {
        font-size: 1.8rem;
    }

    .terminal-metrics {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .terminal__body {
        font-size: 0.78rem;
        min-height: auto;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__title {
        font-size: 1.9rem;
    }

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

    .service-card {
        padding: 24px 20px;
    }

    .section__title {
        font-size: 1.6rem;
    }

    .context-stats {
        grid-template-columns: 1fr;
    }
}
