:root {
    /* Light Mode Variables */
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-alt: #f1f3f5;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-color: #0d6efd; /* Bootstrap Primary */
    --accent-glow: rgba(13, 110, 253, 0.3);
    --neon-color: #0d6efd;
    --border-color: #e9ecef;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    /* Dark Mode Variables */
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-alt: #181818;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent-color: #6ea8fe;
    --accent-glow: rgba(110, 168, 254, 0.2);
    --neon-color: #00f2ff; /* Cyan Neon */
    --border-color: #333;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.text-muted {
    color: var(--text-secondary) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--neon-color);
}

section {
    position: relative;
    overflow: hidden;
}

.section-padding {
    padding: 5rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
    background-color: rgba(18, 18, 18, 0.9);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--neon-color);
    box-shadow: 0 0 5px var(--neon-color);
}

/* Controls (Theme/Lang) */
.controls-wrapper {
    display: flex;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.btn-icon:hover {
    color: var(--neon-color);
    text-shadow: 0 0 8px var(--neon-color);
}

.btn-lang {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-lang:hover {
    border-color: var(--neon-color);
    color: var(--neon-color);
    box-shadow: 0 0 5px var(--accent-glow);
}

/* Hero */
[data-theme="dark"] #hero h2 {
    color: #d0e1ff !important; /* Light blue for dark mode subtitle */
}

#hero {
    padding-top: 80px; /* Navbar height */
}

.hero-image-wrapper {
    position: relative;
    display: inline-block;
    padding: 20px;
}

.hero-photo-placeholder {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background-color: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
}

.hero-photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.monogram {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    background-color: var(--bg-alt);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chip:hover {
    border-color: var(--neon-color);
    color: var(--text-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Buttons */
.btn-primary {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-body);
    font-family: var(--font-body);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-outline-primary {
    color: var(--text-primary);
    border-color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: transparent;
    color: var(--neon-color);
    border-color: var(--neon-color);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

/* Cards */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(var(--neon-color), 0.3);
}

[data-theme="dark"] .card-custom:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--neon-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Fix for Bootstrap List Group Items (Publicaciones) */
.list-group-item {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.list-group-item-action:hover, 
.list-group-item-action:focus {
    background-color: var(--bg-alt);
    color: var(--text-primary);
    border-color: var(--neon-color);
}

[data-theme="dark"] .list-group-item-action:hover, 
[data-theme="dark"] .list-group-item-action:focus {
    background-color: #2c2c2c !important; /* Dark grey, not white */
    color: var(--text-primary) !important;
    border-color: var(--neon-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2.6rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--bg-body);
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    border-color: var(--neon-color);
    background-color: var(--neon-color);
    box-shadow: 0 0 10px var(--neon-color);
}

.timeline-content .date {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Year Badge */
.year-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: var(--bg-alt);
    color: var(--text-primary);
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Neon Underline */
.neon-underline {
    position: relative;
    display: inline-block;
}

.neon-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--neon-color);
    transform-origin: bottom right;
    transition: transform 0.4s ease-out;
    box-shadow: 0 0 5px var(--neon-color);
}

.neon-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Footer */
footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
}

.photo-dot {
    cursor: default;
    color: var(--bg-alt); /* Hidden by default */
    user-select: none;
    transition: color 0.3s;
}

.photo-dot:hover {
    color: var(--text-secondary); /* Slightly visible on hover */
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-content {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="light"] .btn-close-white {
    filter: none;
}

/* Responsive */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-photo-placeholder {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -2.1rem;
    }
}
