:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.15);
    --transition: all .3s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar-custom {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-link-custom {
    color: var(--dark) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link-custom:hover::after { width: 70%; }
.nav-link-custom:hover { color: var(--primary) !important; }

/* HERO */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.3), transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(236,72,153,.2), transparent 70%);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 2; }

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* BOTONES */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: .9rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99,102,241,.4);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,.6);
    color: white;
}

.btn-outline-light-custom {
    border: 2px solid rgba(255,255,255,.3);
    color: white;
    padding: .8rem 2rem;
    border-radius: var(--radius);
    background: transparent;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-light-custom:hover {
    background: rgba(255,255,255,.1);
    border-color: white;
    color: white;
}

/* SECCIONES */
.section { padding: 6rem 0; }
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* SERVICIOS */
.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,.05);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* PORTFOLIO */
.portfolio-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.portfolio-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.8), transparent);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-img::after { opacity: 1; }

.portfolio-body { padding: 1.5rem; }
.portfolio-category {
    display: inline-block;
    background: rgba(99,102,241,.1);
    color: var(--primary);
    padding: .25rem .75rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.portfolio-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.tech-stack {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tech-badge {
    background: var(--light);
    color: var(--gray);
    padding: .25rem .6rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 500;
}

/* ESTADÍSTICAS */
.stats-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color: white;
    padding: 5rem 0;
}

.stat-box {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .5rem;
}

.stat-label {
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 500;
}

/* CONTACTO */
.contact-card {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.form-control-custom {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    padding: .9rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light);
}

.form-control-custom:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99,102,241,.1);
    outline: none;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
}

.contact-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* FOOTER */
.footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 4rem 0 2rem;
}

.footer a { color: #cbd5e1; text-decoration: none; transition: var(--transition); }
.footer a:hover { color: white; }

/* ALERTAS */
.alert-custom {
    border-radius: var(--radius);
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ANIMACIONES */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp .8s ease-out; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero { padding: 5rem 0 3rem; }
    .section { padding: 3rem 0; }
    .section-title { font-size: 2rem; }
}

/* ===== DASHBOARD ===== */
.admin-sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding: 2rem 0;
    color: white;
}

.admin-sidebar .nav-link {
    color: #cbd5e1;
    padding: .9rem 1.5rem;
    border-radius: 8px;
    margin: .25rem 1rem;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(99,102,241,.15);
    color: white;
}

.admin-content {
    padding: 2rem;
    background: var(--light);
    min-height: 100vh;
}

.stat-card-admin {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.table-custom {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.badge-read { background: var(--success); }
.badge-unread { background: var(--warning); }