:root {
    --cv-accent: #1f4e79;
    --cv-muted: #4b5563;
    --cv-border: rgba(0, 0, 0, 0.12);
    --cv-panel: rgba(0, 0, 0, 0.03);
}

body.theme-dark {
    --cv-accent: #93c5fd;
    --cv-muted: #94a3b8;
    --cv-border: rgba(148, 163, 184, 0.22);
    --cv-panel: rgba(148, 163, 184, 0.12);
}

.cv-container {
    max-width: 850px;
    margin: 1.5rem auto 2.5rem;
    padding: 0 2px;
}

.quarto-title-block {
    max-width: 848px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

.cv-header {
    padding-bottom: 0.2rem;
    margin-bottom: 0.8rem;
}

.cv-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cv-name {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.cv-tagline {
    color: var(--cv-muted);
    font-weight: 600;
    margin-top: 0.2rem;
}

.cv-subtag {
    color: var(--cv-muted);
    margin-top: 0.2rem;
}

.cv-contact {
    color: var(--cv-muted);
    font-size: 0.95rem;
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.1rem;
}

.cv-contact a,
.cv-contact .cv-contact-item {
    color: var(--cv-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.cv-contact a:hover {
    color: #163a5b;
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(31, 78, 121, 0.35);
    color: var(--cv-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(31, 78, 121, 0.08);
}

.cv-button:hover {
    background: rgba(31, 78, 121, 0.22);
    border-color: rgba(31, 78, 121, 0.6);
    color: #163a5b;
}

.cv-section {
    margin-top: 1.1rem;
}

.cv-section h2 {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cv-accent);
    border-bottom: 1px solid rgba(31, 78, 121, 0.35);
    padding-bottom: 0.35rem;
    margin-bottom: 0.75rem;
}

.cv-section p {
    color: #1f2937;
    line-height: 1.55;
}

body.theme-dark .cv-section p {
    color: #e5e7eb;
}

.cv-section .cv-justify {
    text-align: justify;
    text-justify: inter-word;
}

.cv-skill-grid {
    display: grid;
    gap: 0.6rem;
}

.cv-skill {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.75rem;
    align-items: baseline;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--cv-panel);
    border: 1px solid var(--cv-border);
}

.cv-skill-label {
    font-weight: 700;
    color: #111827;
}

.cv-skill-text {
    color: #374151;
    line-height: 1.45;
}

body.theme-dark .cv-skill {
    background: #0f172a;
}

body.theme-dark .cv-skill-label {
    color: #e5e7eb;
}

body.theme-dark .cv-skill-text {
    color: #cbd5f5;
}

.cv-entry {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--cv-border);
    background: #fff;
    margin-bottom: 0.85rem;
}

body.theme-dark .cv-entry {
    background: #0f172a;
}

.cv-entry-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
}

.cv-entry-date {
    color: var(--cv-muted);
    font-weight: 600;
    white-space: nowrap;
}

.cv-entry-meta {
    color: var(--cv-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.cv-entry ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #1f2937;
    text-align: justify;
    text-justify: inter-word;
}

body.theme-dark .cv-entry ul {
    color: #e5e7eb;
}

.cv-entry li {
    margin: 0.35rem 0;
}

.cv-pubs {
    display: grid;
    gap: 0.7rem;
}

.cv-pub {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--cv-panel);
    border: 1px solid var(--cv-border);
}

.cv-pub-title {
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: #111827;
}

.cv-pub-title a {
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.cv-pub-title a:hover {
    color: #1f4e79;
}

.cv-pub-title a::after {
    content: "↗";
    font-size: 0.85em;
    margin-left: 0.35rem;
    color: #6b7280;
}

.cv-pub-title a:hover::after {
    color: #1f4e79;
}

.cv-pub-meta {
    color: var(--cv-muted);
    line-height: 1.45;
}

.cv-pub-meta .me {
    font-weight: 700;
    color: #111827;
}

body.theme-dark .cv-pub {
    background: #0f172a;
}

body.theme-dark .cv-pub-title {
    color: #e5e7eb;
}

body.theme-dark .cv-pub-title a {
    color: #93c5fd;
}

body.theme-dark .cv-pub-title a:hover {
    color: #bfdbfe;
}

body.theme-dark .cv-pub-title a::after {
    color: #94a3b8;
}

body.theme-dark .cv-pub-title a:hover::after {
    color: #93c5fd;
}

body.theme-dark .cv-pub-meta {
    color: #cbd5f5;
}

body.theme-dark .cv-pub-meta .me {
    color: #e5e7eb;
}

@media (max-width: 700px) {
    .cv-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cv-entry-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cv-skill {
        grid-template-columns: 1fr;
    }
}
