:root {
    --ink: #172033;
    --muted: #5d6678;
    --line: #d9e2ec;
    --paper: #ffffff;
    --soft: #f3f7fb;
    --blue: #155f8f;
    --blue-dark: #07364f;
    --cyan: #28a6c7;
    --green: #21745b;
    --red: #b42318;
    --gold: #b7791f;
    --orange: #d96819;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--soft);
}

a {
    color: inherit;
}

.hero {
    min-height: 72vh;
    color: #fff;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(7, 54, 79, 0.98), rgba(21, 95, 143, 0.82)),
        url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12vw -18vw auto;
    width: 42vw;
    max-width: 520px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 196, 102, 0.18), transparent 62%);
    pointer-events: none;
}

.topnav {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.topnav div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.topnav a {
    color: #e8f4ff;
    text-decoration: none;
    font-weight: 600;
}

.language-switch {
    position: fixed;
    top: 50%;
    right: 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateY(-50%);
}

.language-switch a {
    min-width: 42px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 850;
    background: rgba(7, 54, 79, 0.78);
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.18);
    backdrop-filter: blur(8px);
}

.language-switch a.active {
    background: #fff;
    color: var(--blue-dark);
}

.brand {
    font-size: 1.05rem;
}

.hero-content {
    width: min(1120px, calc(100% - 32px));
    margin: 10vh auto 0;
    max-width: 860px;
    position: relative;
    z-index: 2;
}

.profile-photo {
    width: 142px;
    height: 176px;
    object-fit: cover;
    object-position: center top;
    background: #fff;
    border: 4px solid rgba(255, 255, 255, 0.76);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    margin-bottom: 18px;
}

.kicker {
    margin: 0 0 8px;
    color: #f5c466;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 5.3vw, 4.25rem);
    line-height: 1.04;
    font-weight: 850;
    letter-spacing: 0;
}

.hero h1 span {
    display: block;
}

.hero h2 {
    margin: 0 0 18px;
    color: #cfe9ff;
    font-size: 1.45rem;
}

.summary {
    max-width: 760px;
    font-size: 1.08rem;
    line-height: 1.7;
}

.hero-quote {
    max-width: 680px;
    margin: 22px 0 0;
    padding: 16px 18px;
    border-left: 4px solid #f5c466;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}

.hero-quote p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.55;
    font-weight: 750;
}

.hero-quote cite {
    display: block;
    margin-top: 6px;
    color: #cfe9ff;
    font-size: 0.92rem;
    font-style: normal;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.contact-row a,
.contact-row span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.content-section {
    margin-bottom: 48px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.7rem;
}

.section-heading > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 16px;
}

.section-formacion-idiomas .resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section-formacion-idiomas .resource-card {
    padding: 16px;
}

.section-formacion-idiomas .resource-card h3 {
    font-size: 1rem;
}

.section-formacion-idiomas .resource-card p {
    font-size: 0.9rem;
}

.resource-card,
.panel,
.login-box {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.07);
}

.resource-card {
    padding: 20px;
    display: grid;
    align-content: start;
    gap: 12px;
    position: relative;
}

.resource-card .resource-mark {
    margin-bottom: 2px;
}

.resource-card h3 {
    margin: 0;
    font-size: 1.12rem;
}

.resource-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

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

.tag-row span,
.tag-row a {
    padding: 4px 9px;
    border-radius: 999px;
    background: #e9f4fb;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.tag-row a:hover {
    background: var(--blue);
    color: #fff;
}

.field-list {
    margin: 0;
    display: grid;
    gap: 7px;
}

.field-list div {
    display: grid;
    grid-template-columns: minmax(92px, 42%) minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
}

.field-list dt {
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.field-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--blue);
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.button.light {
    background: #fff;
    border-color: #fff;
    color: var(--blue-dark);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.34);
    color: #fff;
}

.quick-panel {
    margin-top: -76px;
    margin-bottom: 42px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.quick-panel a {
    min-height: 110px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d8e4ee;
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(23, 32, 51, 0.11);
    text-decoration: none;
}

.quick-panel span {
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 850;
}

.quick-panel strong {
    color: var(--blue-dark);
    font-size: 1.02rem;
}

.specialty-strip,
.featured-section {
    margin-bottom: 48px;
}

.visual-cv {
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: stretch;
}

.visual-cv-main {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid #cddfea;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 244, 251, 0.9)),
        linear-gradient(90deg, #ffffff, #e8f4fb);
    box-shadow: 0 18px 38px rgba(23, 32, 51, 0.09);
}

.visual-cv-main h2 {
    max-width: 760px;
    margin: 0 0 12px;
    color: var(--blue-dark);
    font-size: clamp(1.65rem, 4vw, 2.55rem);
    line-height: 1.08;
}

.visual-cv-main > p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.metric-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.metric-tile {
    min-height: 118px;
    padding: 16px;
    display: grid;
    align-content: space-between;
    border: 1px solid #d8e4ee;
    border-radius: 8px;
    background: #fff;
}

.metric-tile strong {
    color: var(--orange);
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1;
}

.metric-tile span {
    color: var(--blue-dark);
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 750;
}

.visual-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.location-pill {
    min-height: 40px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cddfea;
    border-radius: 8px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
}

.focus-stack {
    display: grid;
    gap: 12px;
}

.focus-card {
    min-height: 142px;
    padding: 18px;
    display: grid;
    grid-template-columns: 8px 1fr;
    gap: 14px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.07);
}

.focus-card > span {
    width: 8px;
    height: 100%;
    min-height: 94px;
    border-radius: 999px;
    background: var(--blue);
}

.focus-card h3 {
    margin: 0 0 8px;
    color: var(--blue-dark);
    font-size: 1.08rem;
}

.focus-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.focus-card.accent-green > span {
    background: var(--green);
}

.focus-card.accent-orange > span {
    background: var(--orange);
}

.focus-card.accent-gold > span {
    background: var(--gold);
}

.timeline-section {
    margin-bottom: 48px;
}

.timeline-list {
    display: grid;
    gap: 0;
    position: relative;
    max-width: 980px;
    margin: 0 auto;
}

.timeline-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #cddfea;
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 5px 0;
    position: relative;
}

.timeline-axis {
    grid-column: 2;
    display: grid;
    justify-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.timeline-axis span {
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--orange);
    font-weight: 850;
    font-size: 0.76rem;
    text-align: center;
}

.timeline-mark,
.resource-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 38px;
    border-radius: 8px;
    background: #e9f4fb;
    color: var(--blue-dark);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
}

.timeline-content {
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.timeline-left .timeline-content {
    grid-column: 1;
    text-align: right;
}

.timeline-right .timeline-content {
    grid-column: 3;
}

.timeline-work.timeline-left .timeline-content {
    border-right: 4px solid var(--orange);
}

.timeline-work.timeline-right .timeline-content {
    border-left: 4px solid var(--orange);
}

.timeline-training.timeline-left .timeline-content {
    border-right: 4px solid var(--blue);
}

.timeline-training.timeline-right .timeline-content {
    border-left: 4px solid var(--blue);
}

.timeline-item h3 {
    margin: 0 0 4px;
    color: var(--blue-dark);
    font-size: 0.9rem;
}

.timeline-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.32;
    font-size: 0.84rem;
}

.specialty-strip {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
    gap: 24px;
    align-items: start;
    padding: 28px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(7, 54, 79, 0.96), rgba(33, 116, 91, 0.9)),
        linear-gradient(90deg, #07364f, #21745b);
    color: #fff;
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.12);
}

.specialty-strip h2 {
    margin: 0;
    font-size: 1.7rem;
}

.specialty-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.specialty-chips a {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 750;
    text-decoration: none;
}

.specialty-chips a.active,
.specialty-chips a:hover {
    background: #fff;
    color: var(--blue-dark);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.featured-card {
    min-height: 270px;
    padding: 22px;
    display: grid;
    align-content: start;
    gap: 14px;
    color: #fff;
    border-radius: 8px;
    background:
        linear-gradient(150deg, rgba(7, 54, 79, 0.95), rgba(21, 95, 143, 0.86)),
        url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=900&q=80") center/cover;
    box-shadow: 0 18px 34px rgba(23, 32, 51, 0.15);
}

.featured-card:nth-child(2) {
    background:
        linear-gradient(150deg, rgba(7, 54, 79, 0.92), rgba(217, 104, 25, 0.84)),
        url("https://images.unsplash.com/photo-1509391366360-2e959784a276?auto=format&fit=crop&w=900&q=80") center/cover;
}

.featured-card:nth-child(3) {
    background:
        linear-gradient(150deg, rgba(7, 54, 79, 0.93), rgba(33, 116, 91, 0.84)),
        url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80") center/cover;
}

.featured-card h3,
.featured-card p {
    margin: 0;
}

.featured-card p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.featured-card .tag-row span,
.featured-card .tag-row a {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.featured-card .button {
    align-self: end;
    background: #fff;
    border-color: #fff;
    color: var(--blue-dark);
}

.button.secondary {
    background: #fff;
    color: var(--blue-dark);
}

.button.danger {
    background: #fff;
    border-color: #d92d20;
    color: #b42318;
}

.pending,
.empty,
.muted {
    color: var(--muted);
}

.login-body,
.admin-body {
    min-height: 100vh;
}

.viewer-body {
    min-height: 100vh;
    background: #111827;
    color: #f8fafc;
}

.viewer-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px clamp(16px, 4vw, 44px);
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.viewer-header h1 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.35rem);
}

.viewer-page {
    height: calc(100vh - 82px);
}

.viewer-page iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #1f2937;
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-box {
    width: min(420px, 100%);
    padding: 26px;
}

.login-box h1 {
    margin: 0 0 10px;
}

.login-box p {
    color: var(--muted);
    line-height: 1.55;
}

.login-box form {
    display: grid;
    gap: 12px;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--blue);
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
}

.admin-header h1 {
    margin: 0;
    font-size: 1.45rem;
}

.admin-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 64px;
    display: grid;
    gap: 18px;
}

.panel {
    padding: 22px;
}

.panel h2 {
    margin: 0 0 16px;
    color: var(--blue-dark);
    font-size: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #c8d3df;
    border-radius: 8px;
    padding: 10px 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
}

textarea {
    resize: vertical;
}

.span-2 {
    grid-column: span 2;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid;
}

.alert.success {
    border-color: #a6d8c4;
    background: #ecfdf3;
    color: var(--green);
}

.alert.error {
    border-color: #fecdca;
    background: #fff1f0;
    color: var(--red);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #344054;
    font-size: 0.86rem;
}

.icon-button {
    border: 1px solid #fecdca;
    border-radius: 8px;
    background: #fff;
    color: var(--red);
    padding: 7px 10px;
    cursor: pointer;
}

@media (max-width: 760px) {
    .topnav,
    .admin-header,
    .section-heading,
    .form-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .topnav div,
    .admin-header nav {
        justify-content: start;
    }

    .topnav div {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .topnav div a {
        white-space: nowrap;
    }

    .hero-content {
        margin-top: 7vh;
    }

    .language-switch {
        top: auto;
        right: 12px;
        bottom: 12px;
        flex-direction: row;
        transform: none;
    }

    .profile-photo {
        width: 112px;
        height: 140px;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .hero h2 {
        font-size: 1.18rem;
    }

    .summary {
        font-size: 1rem;
    }

    .hero-quote {
        padding: 14px 15px;
    }

    .hero-quote p {
        font-size: 1rem;
    }

    .contact-row a,
    .contact-row span,
    .hero-actions .button,
    .button {
        width: 100%;
    }

    .quick-panel,
    .visual-cv,
    .metric-grid,
    .specialty-strip,
    .featured-grid,
    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-list::before {
        left: 22px;
    }

    .timeline-axis,
    .timeline-left .timeline-content,
    .timeline-right .timeline-content {
        grid-column: 1;
    }

    .timeline-item {
        padding-left: 48px;
    }

    .timeline-axis {
        justify-items: start;
    }

    .timeline-left .timeline-content {
        text-align: left;
        border-right: 1px solid var(--line);
    }

    .timeline-work.timeline-left .timeline-content,
    .timeline-work.timeline-right .timeline-content {
        border-left: 4px solid var(--orange);
    }

    .timeline-training.timeline-left .timeline-content,
    .timeline-training.timeline-right .timeline-content {
        border-left: 4px solid var(--blue);
    }

    .quick-panel {
        margin-top: -48px;
    }

    .quick-panel a {
        min-height: 82px;
    }

    .specialty-strip {
        padding: 22px;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }

    .section-formacion-idiomas .resource-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .hero {
        min-height: 78vh;
    }
}

@media (max-width: 420px) {
    .page,
    .admin-page,
    .topnav,
    .hero-content {
        width: min(100% - 24px, 1120px);
    }

    .resource-card,
    .panel,
    .login-box {
        padding: 16px;
    }
}
