:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --bg-light: #f8fafc;
    --bg-alt: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --success: #10b981;
    --iso: #8b5cf6;
    --seguridad: #ef4444;
    --devops: #f59e0b;
    --redes: #06b6d4;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 50%, #0f172a 100%);
    color: var(--white);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: 1px;
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: 0.3s;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 160px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 1;
}

.saludo {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.titulo {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    display: inline-block;
}

.subtitulo {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-window {
    background: #0d1117;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
}

.code-header {
    background: #161b22;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #8b949e;
}

.code-content {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    color: #c9d1d9;
}

.keyword { color: #ff7b72; }
.var { color: #79c0ff; }
.prop { color: #7ee787; }
.str { color: #a5d6ff; }
.num { color: #79c0ff; }

/* Sections */
.section {
    padding: 100px 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

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

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.value-props {
    list-style: none;
    margin-top: 32px;
}

.value-props li {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.prop-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-props h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.value-props p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    background: var(--white);
    padding: 28px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    padding-right: 50px;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 50px;
}

.timeline-marker {
    position: absolute;
    top: 24px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--bg-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
    right: auto;
}

.timeline-content {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
}

.company {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    background: rgba(59, 130, 246, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
}

.period {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.achievements {
    list-style: none;
    margin-bottom: 16px;
}

.achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags .tag {
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-alt);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s;
    cursor: default;
}

.tag:hover {
    background: var(--accent);
    color: var(--white);
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.education-card {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.1);
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #06b6d4);
}

.edu-badge {
    display: inline-block;
    background: var(--bg-alt);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.education-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.edu-institution {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.edu-period {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.certifications h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 32px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cert-item {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.cert-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.cert-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.cert-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Blog */
.blog-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.cat-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.4s, box-shadow 0.4s;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.blog-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255,255,255,0.8), transparent);
}

.blog-image.iso {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-image.seguridad {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-image.devops {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-image.redes {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.3;
}

.blog-content {
    padding: 24px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.blog-category {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-category.iso {
    background: rgba(139, 92, 246, 0.1);
    color: var(--iso);
}

.blog-category.seguridad {
    background: rgba(239, 68, 68, 0.1);
    color: var(--seguridad);
}

.blog-category.devops {
    background: rgba(245, 158, 11, 0.1);
    color: var(--devops);
}

.blog-category.redes {
    background: rgba(6, 182, 212, 0.1);
    color: var(--redes);
}

.blog-readtime {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.blog-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.blog-tags {
    display: flex;
    gap: 6px;
}

.blog-tags span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-alt);
    padding: 3px 8px;
    border-radius: 4px;
}

.blog-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.cta-content > p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s;
    min-width: 200px;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
}

.contact-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 32px 0;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-tag {
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .subtitulo {
        margin: 0 auto 32px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        padding-left: 30px;
        padding-right: 0;
        margin-left: 0;
    }
    
    .timeline-marker,
    .timeline-item:nth-child(even) .timeline-marker {
        left: -10px;
        right: auto;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-categories {
        gap: 8px;
    }
    
    .cat-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}
/* Responsive Fixes for Hero */
@media (max-width: 768px) {
    .code-window {
        max-width: 100%;
        margin: 0 16px;
    }
    
    .hero-visual {
        order: 1;
        margin-bottom: 20px;
    }
    
    .hero-text {
        order: 2;
    }
    
    .code-content {
        font-size: 0.7rem;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .code-window {
        margin: 0 8px;
    }
    
    .code-header {
        padding: 10px 12px;
    }
    
    .code-title {
        font-size: 0.65rem;
    }
    
    .code-content {
        font-size: 0.6rem;
        padding: 12px;
        line-height: 1.5;
    }
}

/* Blog Post Page Styles */
.post-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-content .featured-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .post-featured-image {
        height: 250px;
    }
    
    .post-content .featured-img {
        height: 200px;
    }
}

/* Extra responsive fixes for small screens */
@media (max-width: 480px) {
    .code-window {
        max-width: calc(100% - 16px);
        margin: 0 8px;
        border-radius: 8px;
    }
    
    .code-header {
        padding: 8px 10px;
    }
    
    .code-title {
        font-size: 0.6rem;
        display: none;
    }
    
    .code-content {
        font-size: 0.55rem;
        padding: 8px;
        line-height: 1.4;
    }
    
    .code-content code {
        white-space: pre-wrap;
        word-break: break-all;
    }
}

@media (max-width: 360px) {
    .code-window {
        display: none;
    }
    
    .hero-visual {
        display: none;
    }
}

/* Hero visual - hide on mobile first, show on larger screens */
.hero-visual {
    display: none;
}

@media (min-width: 769px) {
    .hero-visual {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Blog cards - real images instead of gradients */
.blog-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.blog-image {
    display: none; /* hide old gradient divs if any remain */
}

/* Blog card improved styling */
.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.4s, box-shadow 0.4s;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.15);
}

.blog-content {
    padding: 24px;
}

/* Article post page - improved styles */
.blog-post {
    padding-top: 100px;
    padding-bottom: 60px;
}

.post-featured-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 48px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 48px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin: 36px 0 18px;
}

.post-content p {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.post-content a:hover {
    border-bottom-color: var(--accent);
}

.post-content pre {
    background: #0d1117;
    color: #c9d1d9;
    padding: 24px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 32px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    border: 1px solid rgba(255,255,255,0.1);
}

.post-content code {
    background: var(--bg-alt);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content ul, .post-content ol {
    margin: 24px 0;
    padding-left: 28px;
}

.post-content li {
    margin-bottom: 14px;
    line-height: 1.7;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.post-content th, .post-content td {
    padding: 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.post-content td {
    background: var(--white);
}

.post-content tr:hover td {
    background: var(--bg-alt);
}

/* Article page navigation */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 32px;
    padding: 12px 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.back-link:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateX(-4px);
}

/* Post header styles */
.post-header {
    text-align: center;
    margin-bottom: 48px;
}

.post-category {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.post-category.iso {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.post-category.seguridad {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.post-category.devops {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.post-category.redes {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .post-featured-img {
        height: 280px;
        border-radius: 12px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content pre {
        padding: 16px;
        font-size: 0.85rem;
        border-radius: 12px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 12px;
    }
}

/* Blog Card Image - fix sizing and lazy loading */
.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
    min-height: 200px;
}

.blog-image {
    display: none;
}

/* Blog card container styling */
.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.blog-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Blog card meta - better spacing */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.blog-category {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Blog card title */
.blog-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog card description */
.blog-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read time badge */
.blog-readtime {
    display: inline-block;
    font-size: 0.75rem;
    color: #666;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* Blog footer with tags and link */
.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.blog-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.blog-tags span {
    font-size: 0.7rem;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Blog link button - improved styling */
.blog-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.blog-link:hover {
    background: var(--accent);
    color: white;
    padding: 8px 20px;
}

/* Article page featured image - always visible and styled */
.post-featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 40px;
    background: #f0f0f0;
    display: block;
}

/* Article page styles - ensure styles load properly */
.blog-post {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 48px 0 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin: 32px 0 16px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.post-content th, .post-content td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-alt);
    font-weight: 600;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 10px 18px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

@media (max-width: 768px) {
    .post-featured-img {
        height: 250px;
    }
    .post-title {
        font-size: 1.8rem;
    }
}

/* Ensure all blog cards have same height and structure */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-footer {
    margin-top: auto;
}

/* Fix all cards to have read more button */
.blog-card .blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Post page - ensure styles are consistent */
.post-category {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
}

.post-featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 40px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
    margin: 40px 0 20px;
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin: 30px 0 15px;
}

.post-content pre {
    background: #1e1e1e;
    color: #c9d1d9;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
}

.post-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-featured-img {
        height: 250px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
}

/* Professional Blog Card Design */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.blog-card-cat.iso { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.blog-card-cat.seguridad { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.blog-card-cat.devops { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.blog-card-cat.redes { background: rgba(16, 185, 129, 0.1); color: #059669; }

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    transition: all 0.3s;
}

.blog-card-link:hover {
    background: #3b82f6;
    color: white;
    padding: 8px 20px;
}
