:root {
    --primary: #c9a050;
    --primary-hover: #b58d3f;
    --bg: #f4f4f4;
    --text-dark: #2c2c2c;
    --text-light: #555;
    --white: #ffffff;
    --dark-bg: #1a1a1a;
    --border-color: #eee;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 4.5rem 2rem 3rem;
}

header h1 {
    font-size: 2.8rem;
    letter-spacing: 3px;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    font-weight: 700;
}

header h1 a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

header h1 a:hover {
    color: var(--primary);
}

header h2 {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: normal;
    margin: 0 0 1.5rem 0;
    letter-spacing: 5px;
    text-transform: uppercase;
}

header p {
    max-width: 650px;
    margin: 0 auto;
    color: #d1d1d1;
    font-size: 1.1rem;
}

.main-nav {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding-bottom: 4px;
    position: relative;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a.active {
    color: var(--primary);
    font-weight: 700;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* Main Container */
.container {
    max-width: 900px;
    width: 100%;
    margin: -2.5rem auto 3rem;
    padding: 0 1.5rem;
    flex: 1;
}

/* Section Box */
section {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
}

.section-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #1a1a1a;
}

.section-header h2 span {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 300;
}

.section-intro {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Project Items */
.project {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    background: #fafafa;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.project:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

.project:last-child {
    margin-bottom: 0;
}

.project-tag {
    display: inline-block;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.3rem 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 1.2rem;
    letter-spacing: 1.5px;
    border-radius: 4px;
}

.project h3 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.project-text-content {
    margin-bottom: 1.5rem;
}

.project-text-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.project-text-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.project-image-container {
    display: none;
    margin-top: 1.5rem;
    width: 100%;
    animation: fadeIn 0.4s ease-in-out;
}

.project.active .project-image-container {
    display: block;
}

.project-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.click-hint {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.project.active .click-hint {
    opacity: 0.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Home Section Cards (Portal / Index Grid) */
.home-intro {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    text-align: center;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.8rem;
    margin-top: 1rem;
}

.hub-card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.hub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.hub-card-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.hub-card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
    background: #ebebeb;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.hub-card h3 {
    font-size: 1.45rem;
    margin: 0 0 0.8rem 0;
    color: #1a1a1a;
}

.hub-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    flex: 1;
}

.hub-card-action {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s;
}

.hub-card:hover .hub-card-action {
    gap: 0.7rem;
}

/* Skills Badges (Sobre Mí) */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.skill-badge {
    background: #f0f0f0;
    color: #333;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #ddd;
}

.skill-badge.highlight {
    background: #fcf8f2;
    border-color: var(--primary);
    color: #8c6a23;
}

/* Contact Page Form / Details */
.contact-container {
    text-align: center;
    padding: 1rem 0;
}

.contact-card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 550px;
    margin: 2rem auto 0;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 3.5rem 2rem 2rem;
    margin-top: auto;
}

footer h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

footer p {
    color: #ccc;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: #fff;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: background 0.3s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.contact:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

.legal-footer {
    border-top: 1px solid #333;
    padding-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-footer a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.legal-footer a:hover {
    color: var(--primary);
}

/* Blog article footer links & comment pill */
.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.blog-read-more {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.blog-read-more:hover {
    color: var(--primary-hover);
}

.blog-comments-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    background-color: #f0f0f0;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e2e2;
}

.blog-comments-pill:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 3rem 1.5rem 2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .main-nav {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .container {
        margin-top: -1.5rem;
        padding: 0 1rem;
    }

    section {
        padding: 2rem 1.5rem;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cookie Consent Banner (RGPD & AdSense Compliance)
   ========================================================================== */
#jg-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(10px);
    color: #f4f4f4;
    padding: 1.25rem 2rem;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    font-size: 0.9rem;
    border-top: 2px solid var(--primary);
    transition: all 0.3s ease;
}

#jg-cookie-banner .cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#jg-cookie-banner .cookie-text {
    flex: 1 1 550px;
}

#jg-cookie-banner .cookie-text p {
    margin: 0;
    line-height: 1.5;
    color: #e0e0e0;
}

#jg-cookie-banner .cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

#jg-cookie-banner .cookie-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn-accept {
    background-color: var(--primary);
    color: #fff;
}

.cookie-btn-accept:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.cookie-btn-essential {
    background-color: transparent;
    color: #fff;
    border: 1px solid #777;
}

.cookie-btn-essential:hover {
    background-color: #333;
    border-color: #aaa;
}

.cookie-btn-info {
    color: #aaa;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.4rem 0.6rem;
}

.cookie-btn-info:hover {
    color: var(--primary);
}

/* ==========================================================================
   Article Component Styles (Author Box, Breadcrumbs, Tables, Callouts)
   ========================================================================== */

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span.separator {
    color: #aaa;
}

/* Article Meta Header */
.article-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #f7f7f7;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.82rem;
    color: #555;
    border: 1px solid #e8e8e8;
}

/* Technical Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.92rem;
    text-align: left;
}

.tech-table th {
    background-color: #1a1a1a;
    color: #fff;
    padding: 0.9rem 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.tech-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #eaeaea;
    color: #444;
}

.tech-table tr:nth-child(even) {
    background-color: #fafafa;
}

.tech-table tr:hover {
    background-color: #f6f3eb;
}

/* Callout Boxes */
.callout {
    padding: 1.25rem 1.5rem;
    margin: 1.8rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.98rem;
    line-height: 1.6;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout-pro {
    background-color: #fcf8f2;
    border-left: 4px solid var(--primary);
    color: #4a3e22;
}

.callout-warning {
    background-color: #fff6f6;
    border-left: 4px solid #d9534f;
    color: #5a2624;
}

.callout-tip {
    background-color: #f2f9f6;
    border-left: 4px solid #3c763d;
    color: #274928;
}

/* Author Box (E-E-A-T) */
.author-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background-color: #fafafa;
    border: 1px solid #eaeaea;
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 1.5rem;
    margin: 3rem 0 2rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #1a1a1a;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-info h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1.15rem;
    color: #1a1a1a;
}

.author-info .author-role {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Code Snippet block */
pre.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    margin: 1.5rem 0;
    line-height: 1.5;
}

code.inline-code {
    background-color: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    color: #a62626;
}

/* Article Navigation Links */
.article-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.article-nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
}

.article-nav-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #fafafa;
}

