/* ============================================================
   CuevasLab — Unified Design System
   ============================================================ */

/* ── Tokens ── */
:root {
    /* Background */
    --bg:        #07070f;
    --surface:   rgba(245,240,232,0.03);
    --surface-2: rgba(245,240,232,0.06);
    --border:    rgba(245,240,232,0.07);
    --border-2:  rgba(245,240,232,0.12);

    /* Text */
    --text:      #F5F0E8;
    --muted:     #8A8A7A;
    --muted-2:   rgba(245,240,232,0.45);

    /* Accents */
    --gold:      #D4A853;
    --copper:    #C8956C;
    --warm-rose: #B87D6B;
    --green:     #10b981;
    --error:     #e06060;

    /* Typography */
    --display:   'Clash Display', system-ui, sans-serif;
    --body:      'Satoshi', system-ui, sans-serif;
}

/* ── Light mode ── */
[data-theme="light"] {
    --bg:        #FAFAF7;
    --surface:   rgba(0,0,0,0.03);
    --surface-2: rgba(0,0,0,0.05);
    --border:    rgba(0,0,0,0.08);
    --border-2:  rgba(0,0,0,0.14);

    --text:      #1A1A1A;
    --muted:     #6B6B6B;
    --muted-2:   rgba(26,26,26,0.55);

    --gold:      #B8892E;
    --copper:    #A06F48;
    --warm-rose: #956050;
    --error:     #c44040;
}

/* ── Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    background: var(--bg);
    background-image: radial-gradient(ellipse at 85% 15%, rgba(212,168,83,0.06) 0%, transparent 55%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image: radial-gradient(ellipse at 85% 15%, rgba(212,168,83,0.08) 0%, transparent 55%);
}

a, button { -webkit-tap-highlight-color: transparent; }

/* ── Effects ── */
.noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

[data-theme="light"] .noise { opacity: 0.025; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.3; transform: scale(0.75); }
}

/* ── Layout ── */
.page {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 clamp(1.5rem, 6vw, 5rem);
}

.page--cv {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    min-height: auto;
}

/* ── Nav ── */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.2rem 0;
    animation: fade-up 0.6s ease 0.05s both;
}

.brand {
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo {
    height: 3rem;
    width: auto;
    border-radius: 5px;
    display: block;
    filter: invert(1);
}

[data-theme="light"] .brand-logo {
    filter: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-link {
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s;
}
.nav-link:hover { color: var(--text); }

.nav-back {
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-back:hover { color: var(--text); }

.lang-toggle,
.theme-toggle {
    font-size: 0.7rem;
    color: var(--muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    font-family: var(--body);
    letter-spacing: 0.08em;
    transition: color 0.25s, border-color 0.25s;
    line-height: 1.4;
}

.lang-toggle:hover,
.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-2);
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.45rem 1rem;
    margin-bottom: 2.8rem;
    width: fit-content;
    animation: fade-up 0.7s ease 0.15s both;
}

.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

/* ── Headline ── */
.headline {
    font-family: var(--display);
    font-size: clamp(3.8rem, 11vw, 9rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    animation: fade-up 0.8s ease 0.25s both;
}

.line-plain { display: block; color: var(--text); }

.line-gradient {
    display: block;
    font-style: italic;
    background: linear-gradient(120deg, var(--gold) 0%, var(--copper) 45%, var(--warm-rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.line-light {
    display: block;
    color: rgba(245,240,232,0.22);
    font-weight: 200;
}

[data-theme="light"] .line-light {
    color: rgba(26,26,26,0.25);
}

/* ── Subtext ── */
.subtext {
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    color: var(--muted);
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 2.8rem;
    font-weight: 300;
    animation: fade-up 0.8s ease 0.38s both;
}

/* ── Contact Form ── */
.contact-form {
    max-width: 520px;
    animation: fade-up 0.8s ease 0.48s both;
}

.contact-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-field--full { grid-column: 1 / -1; }

.contact-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    color: var(--text);
    font-family: var(--body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    letter-spacing: 0.01em;
}

.contact-input::placeholder { color: var(--muted); letter-spacing: 0; }

.contact-input:focus {
    border-color: rgba(212,168,83,0.5);
    box-shadow: 0 0 0 3px rgba(212,168,83,0.08);
}

.contact-input.invalid { border-color: var(--error); }

.contact-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
    line-height: 1.6;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--gold), var(--copper));
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    color: #fff;
    font-family: var(--body);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.25s, transform 0.2s, gap 0.35s ease;
}

.contact-btn:hover { opacity: 0.88; transform: translateY(-1px); gap: 1rem; }
.contact-btn:active { transform: translateY(0); }
.contact-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.contact-btn-arrow { transition: transform 0.35s ease; }
.contact-btn:hover .contact-btn-arrow { transform: translateX(5px); }

.contact-btn-sending { display: none; }
.contact-form.sending .contact-btn-text { display: none; }
.contact-form.sending .contact-btn-sending { display: inline; }
.contact-form.sending .contact-btn-arrow { display: none; }

.contact-status { min-height: 1.4em; margin-top: 0.6rem; }

.contact-success,
.contact-error {
    font-size: 0.78rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
}

.contact-success { color: var(--green); }
.contact-error { color: var(--error); }

.contact-form.success .contact-success { opacity: 1; }
.contact-form.error .contact-error { opacity: 1; }

.captcha-v2-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.contact-note {
    font-size: 0.62rem;
    color: var(--muted);
    opacity: 0.5;
    margin-top: 0.8rem;
    line-height: 1.5;
}

.contact-note a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hide reCAPTCHA badge (legal note shown in form) */
.grecaptcha-badge { visibility: hidden; }

/* ── Hero ── */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0 1.5rem;
    max-width: 1100px;
}

/* ── Bento Grid ── */
.bento {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.4fr;
    gap: 0.875rem;
    padding: 3rem 0 3.5rem;
    animation: fade-up 0.8s ease 0.58s both;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.4rem 1.6rem;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.card-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.card-quote {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.65;
    font-style: italic;
    font-weight: 300;
}

.card-quote em {
    font-style: normal;
    color: var(--muted-2);
    font-weight: 500;
}

/* ── Status ── */
.status-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--green);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

.status-text {
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ── Link List ── */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.link-list a {
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: color 0.2s;
}
.link-list a:hover { color: var(--text); }

.link-icon { font-size: 0.9rem; opacity: 0.7; width: 1em; text-align: center; }

/* ── Footer (landing) ── */
.site-footer {
    padding: 0 0 1.8rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.6rem;
    color: var(--muted);
    opacity: 0.4;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: opacity 0.3s;
}
.footer-link:hover { opacity: 0.7; }

.footer-ai {
    font-size: 0.6rem;
    color: var(--muted);
    opacity: 0.4;
    letter-spacing: 0.1em;
    font-weight: 400;
    text-transform: uppercase;
    transition: opacity 0.3s;
}
.footer-ai:hover { opacity: 0.7; }

/* ── Privacy Policy ── */
.policy {
    max-width: 680px;
    padding: 2rem 0 4rem;
}

.policy-title {
    font-family: var(--display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.policy-updated {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h2 {
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.policy-section p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.policy-section ul {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0.8rem;
}

.policy-section li {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--muted);
    padding-left: 1.2rem;
    position: relative;
}

.policy-section li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--gold);
}

.policy-section a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.25s;
}

.policy-section a:hover {
    color: var(--copper);
}


/* ── CV Header ── */
.cv-header {
    padding: 2rem 0 3rem;
    animation: fade-up 0.7s ease 0.1s both;
}

.cv-header-top {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.cv-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-2);
    flex-shrink: 0;
}

.cv-name {
    font-family: var(--display);
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.cv-title {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    font-style: italic;
    background: linear-gradient(120deg, var(--gold) 0%, var(--copper) 45%, var(--warm-rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    margin-bottom: 1.6rem;
}

.cv-about {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.75;
    color: var(--text);
    max-width: 72ch;
}

.cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
}

.cv-contact a, .cv-contact span {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}
.cv-contact a:hover { color: var(--text); }

.contact-icon { font-size: 0.9rem; opacity: 0.7; width: 1em; text-align: center; }

/* ── Divider ── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0 2.5rem;
}

/* ── CV Section ── */
.cv-section {
    margin-bottom: 3rem;
    animation: fade-up 0.7s ease both;
}

.section-label {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 1.4rem;
}

/* ── Summary Bento (Stats) ── */
.summary-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    transition: border-color 0.25s, background 0.25s;
}

.stat-card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
}

.stat-number {
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--gold), var(--copper));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
}

/* ── Timeline ── */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline::after {
    content: '';
    position: absolute;
    left: calc(160px + 2rem);
    top: 0.55rem;
    bottom: 2rem;
    width: 1px;
    background: var(--border);
    pointer-events: none;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 2rem;
    position: relative;
}

.timeline-meta {
    padding-top: 0.15rem;
    padding-bottom: 2rem;
}

.timeline-dates {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
    margin-bottom: 0.2rem;
}

.timeline-company {
    font-size: 0.78rem;
    color: var(--muted-2);
    font-weight: 500;
}

.timeline-logo {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 0.6rem;
    background: #f0ede8;
    padding: 4px;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.timeline-item:hover .timeline-logo { opacity: 1; }

.timeline-body {
    padding-top: 0.15rem;
    padding-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.timeline-body::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0.55rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212,168,83,0.5);
}

.timeline-role {
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.timeline-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.timeline-bullets li {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 300;
    padding-left: 1rem;
    position: relative;
}

.timeline-bullets li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--border-2);
    font-size: 0.75rem;
}

/* ── Read More (expandable timeline items) ── */
.timeline-more { display: none; }
.timeline-body.expanded .timeline-more { display: block; }

.timeline-expand {
    font-size: 0.78rem;
    color: var(--gold);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0 0 1rem;
    font-family: var(--body);
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}
.timeline-expand:hover { color: var(--copper); }

/* ── Skills ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
}

.skills-group-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    font-size: 0.72rem;
    color: var(--muted-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.28rem 0.75rem;
    font-weight: 400;
    transition: border-color 0.2s, color 0.2s;
}

.skill-tag:hover {
    border-color: rgba(212,168,83,0.35);
    color: var(--text);
}

.skill-tag--primary {
    border-color: rgba(212,168,83,0.3);
    color: var(--text);
    font-weight: 500;
}

.skill-tag--ai {
    border-color: rgba(160, 130, 210, 0.4);
    color: #b09fd4;
    font-weight: 500;
}

[data-theme="light"] .skill-tag--ai {
    border-color: rgba(100, 70, 160, 0.3);
    color: #6e50b8;
}

.skills-group--ai {
    background: rgba(160, 130, 210, 0.06);
    border: 1px solid rgba(160, 130, 210, 0.18);
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

[data-theme="light"] .skills-group--ai {
    background: rgba(100, 70, 160, 0.05);
    border-color: rgba(100, 70, 160, 0.18);
}

.skills-group--ai .skills-group-label {
    color: #b09fd4;
}

[data-theme="light"] .skills-group--ai .skills-group-label {
    color: #6e50b8;
}

.skills-group--ai .skills-group-label::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f544'; /* fa-robot */
    margin-right: 0.4em;
}

/* ── Languages ── */
.lang-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.lang-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.lang-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.lang-level {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 300;
}

.lang-bar {
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.lang-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--gold), var(--copper));
}

/* ── Education ── */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.edu-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 2rem;
}

.edu-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin-top: 0.5rem;
    background: #f0ede8;
    padding: 3px;
    opacity: 0.85;
}
.edu-item:hover .edu-logo { opacity: 1; }

.edu-logos {
    display: flex;
    gap: 0.4rem;
}

.edu-dates {
    font-size: 0.72rem;
    color: var(--muted);
    padding-top: 0.12rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.edu-degree {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.edu-school {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 300;
}

/* ── Certifications ── */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
}

.cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    transition: border-color 0.25s, background 0.25s;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cert-logo {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f0ede8;
    padding: 3px;
    opacity: 0.85;
}
.cert-card:hover .cert-logo { opacity: 1; }

.cert-card a.cert-link {
    font-size: 0.68rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}
.cert-card a.cert-link:hover { color: var(--copper); }

.cert-card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
}

.cert-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.cert-meta {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 300;
}

/* ── CV Footer ── */
.cv-footer {
    padding: 2rem 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.footer-note {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 300;
}

.footer-email {
    font-size: 0.78rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-email:hover { color: var(--text); }

/* ── 404 Page ── */
.four-oh-four {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 3rem 0;
}

.four-oh-four h1 {
    font-family: var(--display);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 700;
    background: linear-gradient(120deg, var(--gold), var(--copper), var(--warm-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.four-oh-four p {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--muted);
    font-weight: 300;
    max-width: 360px;
    line-height: 1.6;
}

.four-oh-four a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--gold), var(--copper));
    border-radius: 12px;
    padding: 0.75rem 1.8rem;
    color: #fff;
    font-family: var(--body);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.25s, transform 0.2s;
    margin-top: 0.5rem;
}
.four-oh-four a:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Print ── */
@media print {
    .noise, nav, .cv-footer { display: none !important; }
    body { background: #fff; color: #000; }
    .cv-name, .timeline-role, .edu-degree, .cert-name, .stat-number,
    .lang-name, .status-text { color: #000; }
    .cv-title { -webkit-text-fill-color: #333; color: #333; }
    .stat-number { -webkit-text-fill-color: #333; }
    .muted, .timeline-dates, .timeline-company, .timeline-bullets li,
    .stat-label, .section-label, .edu-dates, .edu-school, .cert-meta,
    .lang-level, .cv-contact a, .cv-contact span { color: #555; }
    .card, .stat-card, .cert-card, .skill-tag { border-color: #ddd; background: #f9f9f9; }
    .skill-tag { color: #333; }
    .cv-photo { width: 100px; height: 100px; border-color: #ccc; }
    .timeline::after { background: #ccc; }
    .timeline-body::before { background: #666; box-shadow: none; }
    .lang-fill { background: #666; }
    .divider { background: #ccc; }
    .timeline-logo, .edu-logo, .cert-logo { opacity: 1; filter: grayscale(1); }
    .timeline-more { display: block !important; }
    .timeline-expand { display: none !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .bento { grid-template-columns: 1fr 1fr; }
    .bento .card:last-child { grid-column: 1 / -1; }
    .cert-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    nav { padding: 1.4rem 0; }
    .brand { font-size: 1.2rem; }
    .brand-logo { height: 1.8rem; }
    .nav-right { gap: 1rem; }
    .lang-toggle, .theme-toggle { padding: 0.4rem 0.9rem; }

    /* CV header */
    .cv-header { padding: 1.5rem 0 2rem; }
    .cv-header-top { gap: 1.2rem; }
    .cv-photo { width: 100px; height: 100px; }
    .cv-name { letter-spacing: -0.025em; }
    .cv-contact { gap: 0.5rem 1rem; }

    /* Stats */
    .summary-bento { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
    .stat-number { font-size: 1.3rem; }

    /* Timeline: stack vertically */
    .timeline-item { grid-template-columns: 1fr; }
    .timeline-meta {
        padding-bottom: 0.5rem;
        display: grid;
        grid-template-columns: 28px 1fr;
        grid-template-rows: auto auto;
        gap: 0 0.5rem;
        align-items: center;
    }
    .timeline-logo {
        margin-top: 0;
        width: 28px; height: 28px;
        min-width: 28px; max-width: 28px; max-height: 28px;
        grid-row: 1 / 3;
        grid-column: 1;
        padding: 3px;
    }
    .timeline-dates { grid-column: 2; font-size: 0.68rem; margin-bottom: 0; }
    .timeline-company { grid-column: 2; font-size: 0.68rem; }
    .timeline-body { padding-left: 1.4rem; }
    .timeline::after { left: 0; }

    /* Education: stack vertically */
    .edu-item { grid-template-columns: 1fr; }
    .edu-dates {
        flex-direction: row;
        align-items: center;
        gap: 0.4rem;
        padding-bottom: 0.3rem;
    }
    .edu-logo { margin-top: 0; width: 22px; height: 22px; min-width: 22px; max-width: 22px; max-height: 22px; padding: 2px; }
    .edu-logos { gap: 0.25rem; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }

    /* Certs */
    .cert-grid { grid-template-columns: 1fr; }
    .cert-card { flex-direction: row; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; }
    .cert-logo { width: 28px; height: 28px; min-width: 28px; max-width: 28px; max-height: 28px; padding: 2px; }

    /* Lang bars */
    .lang-list { max-width: 100% !important; }

    /* Footer */
    .cv-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 520px) {
    .nav-email { display: none; }

    .hero { padding: 1.8rem 0 1rem; }
    .badge { margin-bottom: 1.8rem; font-size: 0.64rem; }

    .headline {
        font-size: clamp(2.6rem, 12vw, 4rem);
        line-height: 0.95;
        letter-spacing: -0.03em;
        margin-bottom: 1.4rem;
    }

    .subtext {
        max-width: 100%;
        font-size: 0.9rem;
        line-height: 1.65;
        margin-bottom: 2rem;
    }

    .contact-fields { grid-template-columns: 1fr; }
    .contact-form { max-width: 100%; }

    .bento {
        grid-template-columns: 1fr;
        padding: 1.5rem 0 3rem;
        gap: 0.75rem;
    }
    .bento .card:last-child { grid-column: auto; }
    .card { padding: 1.2rem 1.4rem; border-radius: 14px; }

    .link-list a { font-size: 0.85rem; padding: 0.25rem 0; }
}

@media (max-width: 380px) {
    .contact-btn { width: 100%; justify-content: center; }
    .summary-bento { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: 1fr; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
