/* Shared styles for all CV pages */
:root {
    --main-color: #2C8AD3; /* user-provided main color */
    --secondary-color: #D3752C; /* user-provided secondary color */
    --bg-light: #f4f4f9;
    --text-dark: #333;
    --header-bg: var(--main-color);
    --header-text: #fff;
    --nav-bg: var(--main-color);
    --nav-text: #fff;
    --container-bg: #fff;
    --container-shadow: 0 2px 5px rgba(0,0,0,0.08);
    --section-border: var(--main-color);
    --footer-bg: var(--main-color);
    --footer-text: #fff;
    --link: var(--main-color);
    --link-hover: var(--secondary-color);
}

/* Base */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Header */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 0.7rem 0 1.2rem 0;
    text-align: center;
    position: relative;
}
header h1 { margin: 0; font-size: 1.7rem; font-weight: 500; color: var(--header-text); }
header h2 { margin: 0; font-size: 1.1rem; font-weight: 400; color: var(--header-text); }

.headshot {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.22);
    margin-bottom: 1rem;
    background: #fff;
}

/* Header buttons: language and version */
.language-switch {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s ease;
}
.language-switch:hover { opacity: 0.9; }

.version-switch {
    position: absolute;
    top: 1rem;
    right: 8.5rem;
    background: rgba(255,255,255,0.12);
    color: var(--header-text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s ease;
    margin-right: 2em;
}
.version-switch:hover { background: rgba(255,255,255,0.18); }

/* Social links bar */
.social-links { display:flex; justify-content:center; gap:1rem; margin:1rem 0; }
.social-links a { color: var(--link); background: var(--container-bg); padding:0.5rem 1rem; border-radius:20px; text-decoration:none; font-weight:500; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: background 0.2s, color 0.2s; }
.social-links a:hover { color: var(--link-hover); background: var(--bg-light); }

/* Nav */
nav { background: var(--nav-bg); color: var(--nav-text); padding:0.5rem; text-align:center; }
nav a { color: var(--nav-text); text-decoration:none; margin: 0 1rem; transition: color 0.2s; }
nav a:hover { color: var(--link-hover); text-decoration: underline; }

/* Container */
.container { max-width: 800px; margin: 1.25rem auto; padding: 1rem; background: var(--container-bg); box-shadow: var(--container-shadow); }

h3 { border-bottom: 2px solid var(--section-border); padding-bottom: 0.5rem; margin-bottom: 1rem; color: var(--main-color); }
.section-title { font-size: 1.1rem; font-weight: 500; color: var(--main-color); margin-top: 1rem; margin-bottom: 0.5rem; }
.subsection-title { font-size: 1rem; font-weight: 500; color: rgba(0,0,0,0.7); margin-top: 1.2rem; margin-bottom: 0.3rem; }

ul { list-style:none; padding:0; }
ul li { margin-bottom:0.5rem; }

a { color: var(--link); transition: color 0.2s; }
a:hover { color: var(--link-hover); }

footer { text-align:center; padding:1rem 0; background: var(--footer-bg); color: var(--footer-text); margin-top:2rem; }

/* Header small titles used in some pages */
.cv-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--header-text);
    margin-top: 0.4rem;
}
.cv-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--header-text);
    margin-bottom: 0.4rem;
}

/* Small screens tweaks */
@media (max-width:520px) {
    .headshot { width:90px; height:90px; }
    .language-switch, .version-switch { padding:0.4rem 0.7rem; font-size:0.9rem; }
    .version-switch { right: 6.5rem; }
}

/* Index page specific styles (moved from inline index.html) */
.index-page .wrap {
    max-width: 720px;
    margin: 2.5rem auto;
    padding: 1.25rem;
    text-align: center;
    background: var(--container-bg);
    box-shadow: var(--container-shadow);
}
.index-page .headshot {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.06);
    display: inline-block;
}
.index-page h1 { margin: .6rem 0 .15rem 0; font-size: 1.5rem; }
.index-page p.lead { margin: 0 0 1rem 0; color: rgba(0,0,0,0.7); }
.index-page .buttons { display:flex; flex-wrap:wrap; justify-content:center; gap:.75rem; margin:1.25rem 0; }
.index-page .small-row { display:flex; gap:.5rem; justify-content:center; margin-top:.5rem; }

/* Generic button styles used on index */
.btn {
    display: inline-block;
    padding: .75rem 1.05rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    background: var(--main-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--main-color); color: var(--header-text); border: none; }
.btn.secondary { background: transparent; color: var(--main-color); border: 2px solid var(--main-color); box-shadow: none; }
.btn.small { padding: .45rem .7rem; font-size: .95rem; border-radius: 8px; }

/* Ensure footer links are readable on any footer background */
footer a { color: inherit; text-decoration: underline; }
footer a:hover { color: var(--link-hover); }

/* Make index responsive */
@media (max-width:520px) {
    .index-page .wrap { margin: 1rem; padding: .75rem; }
    .index-page .buttons { gap: .5rem; }
    .index-page .headshot { width: 110px; height: 110px; }
}

/* Quick tag box used on short CV pages */
.tag-box {
    border-left: 4px solid var(--section-border);
    background: linear-gradient(180deg, rgba(44,138,211,0.03), rgba(44,138,211,0.01));
    padding: 0.75rem 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}
.tag {
    display: inline-block;
    background: var(--container-bg);
    color: var(--main-color);
    border: 1px solid rgba(44,138,211,0.12);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    max-width: 260px;
    white-space: normal;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow-wrap: anywhere;
}
@media (max-width:520px) {
    .tag { font-size: 0.9rem; padding: 0.3rem 0.5rem; }
}