/* Ricardo Fuentes – personal site */

:root {
    --bg: #ffffff;
    --bg-alt: #f6f7f9;
    --text: #111827;
    --muted: #5b6472;
    --border: #e5e7eb;
    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --radius: 10px;
    --max: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --bg-alt: #151a22;
        --text: #e6e8eb;
        --muted: #9aa3ae;
        --border: #262d38;
        --accent: #6c9cff;
        --accent-hover: #8fb3ff;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
}

.brand { font-weight: 700; letter-spacing: -0.01em; }

.nav { display: flex; gap: 28px; margin-left: auto; }

.nav a {
    font-size: 15px;
    color: var(--muted);
    transition: color 0.15s;
}

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

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switcher {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px;
}

.lang-btn {
    border: 0;
    background: none;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.lang-btn.active { background: var(--text); color: var(--bg); }

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 20px;
    padding: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }

/* Hero */
.hero { padding: 96px 0 88px; border-bottom: 1px solid var(--border); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.lead {
    font-size: 18px;
    color: var(--muted);
    max-width: 60ch;
    margin-bottom: 32px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
    margin: 0;
    border-left: 1px solid var(--border);
    padding-left: 40px;
    display: grid;
    gap: 24px;
}

.fact dt { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.fact dd { margin: 0; color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 32px; font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 8px; }

.subhead { font-size: 20px; margin: 64px 0 24px; }
.subhead-first { margin-top: 0; }

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

.item {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.item h3 { font-size: 17px; margin-bottom: 6px; }
.item p { color: var(--muted); font-size: 15px; }
.item-icon { color: var(--accent); font-size: 18px; margin-bottom: 16px; }
.item .item-kicker { font-size: 13px; font-weight: 500; margin-bottom: 4px; }

.tags {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags li {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--muted);
}

.tags-sm { margin-top: 20px; }
.tags-sm li { font-size: 13px; padding: 4px 10px; }

/* About */
.about-text { font-size: 18px; max-width: 75ch; }
.tags-title { font-size: 15px; color: var(--muted); font-weight: 600; margin-top: 32px; }
.tags-title + .tags { margin-top: 12px; }

/* Experience */
.roles { display: grid; gap: 16px; }

.role {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.role-date { font-weight: 600; }
.role-location { color: var(--muted); font-size: 14px; }
.role-body h3 { font-size: 20px; margin-bottom: 12px; }
.role-company { color: var(--muted); font-weight: 500; }

.achievements { margin: 16px 0 0; padding-left: 20px; }
.achievements li { margin-bottom: 6px; }
.achievements li::marker { color: var(--accent); }

/* Travel albums */
.albums {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.album {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--bg-alt);
    text-align: left;
}

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

.album:hover img { transform: scale(1.04); }

.album-info {
    position: absolute;
    inset: auto 0 0 0;
    padding: 40px 16px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
    display: flex;
    flex-direction: column;
}

.album-name { font-weight: 600; }
.album-count,
.album-memory { font-size: 13px; opacity: 0.85; }

/* Passions */
.passions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.music {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    padding: 28px 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.music-icon { font-size: 28px; color: var(--accent); }
.music-text { flex: 1; }
.music-text h3 { font-size: 20px; margin-bottom: 4px; }
.music-text p { color: var(--muted); }

/* Contact */
.contact { text-align: center; max-width: 640px; }
.contact h2 { font-size: 32px; margin-bottom: 8px; }
.contact > p { color: var(--muted); margin-bottom: 28px; }
.contact .contact-url { font-size: 14px; margin: 12px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.footer-inner a { font-size: 18px; }
.footer-inner a:hover { color: var(--text); }

/* Lightbox */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
}

.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }

.lightbox figure { margin: 0; text-align: center; }
.lightbox [hidden] { display: none; }

.lightbox img,
.lightbox video {
    max-width: 88vw;
    max-height: 82vh;
    margin: 0 auto;
    border-radius: 4px;
}

.lightbox figcaption { margin-top: 12px; font-size: 14px; opacity: 0.8; }

.lb-btn {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Responsive */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .facts {
        border-left: 0;
        padding-left: 0;
        grid-template-columns: repeat(2, 1fr);
    }
    .music { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
}

@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .header-inner { gap: 12px; }
    .menu-toggle { display: block; }
    .header-actions { margin-left: auto; }

    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 8px 16px;
    }

    .nav.open { display: flex; }
    .nav a { padding: 12px 0; font-size: 16px; }

    .hero { padding: 56px 0; }
    .section { padding: 64px 0; }
    .cols-3, .passions { grid-template-columns: 1fr; }
    .albums { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .role { grid-template-columns: 1fr; gap: 12px; padding: 24px; }
    .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}
