@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===========================
   THEMES (default = Océan)
=========================== */
:root {
    --sb-bg:          #0f172a;
    --sb-top-bg:      #0a1120;
    --sb-border:      rgba(255,255,255,0.05);
    --accent:         #38bdf8;
    --accent-rgb:     56, 189, 248;
    --electric:       #6366f1;
    --electric-rgb:   99, 102, 241;
    --body-bg:        #dde3ec;
    --main-bg:        #ffffff;
    --main-alt:       #f8fafc;
    --text-dark:      #0f172a;
    --text-mid:       #475569;
    --text-light:     #94a3b8;
    --border:         #e2e8f0;
}

:root[data-theme="foret"] {
    --sb-bg:        #0c1f17;
    --sb-top-bg:    #081310;
    --accent:       #34d399;
    --accent-rgb:   52, 211, 153;
    --electric:     #10b981;
    --electric-rgb: 16, 185, 129;
    --body-bg:      #d2e4da;
}

:root[data-theme="rubis"] {
    --sb-bg:        #1c0d07;
    --sb-top-bg:    #130804;
    --accent:       #f97316;
    --accent-rgb:   249, 115, 22;
    --electric:     #e11d48;
    --electric-rgb: 225, 29, 72;
    --body-bg:      #ecdad2;
}

:root[data-theme="amethyste"] {
    --sb-bg:        #180f2a;
    --sb-top-bg:    #100820;
    --accent:       #a78bfa;
    --accent-rgb:   167, 139, 250;
    --electric:     #7c3aed;
    --electric-rgb: 124, 58, 237;
    --body-bg:      #ddd6ed;
}

/* ===========================
   RESET & BASE
=========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { font-family: 'Poppins', sans-serif; }

body {
    background: var(--body-bg);
    transition: background 0.4s ease;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

/* ===========================
   WRAPPER
=========================== */
.cv-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    max-width: 1080px;
    background: var(--main-bg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    align-self: flex-start;
    overflow: hidden;
}

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
    background: var(--sb-bg);
    transition: background 0.4s ease;
    display: flex;
    flex-direction: column;
}

/* Top identity block */
.sb-top {
    background: var(--sb-top-bg);
    padding: 30px 24px 26px;
    text-align: center;
    border-bottom: 1px solid var(--sb-border);
    position: relative;
    transition: background 0.4s ease;
}

.sb-flags {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 5px;
}

.sb-flags a img {
    width: 22px;
    display: block;
    border-radius: 2px;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.sb-flags a:hover img { opacity: 1; }

.sb-avatar {
    display: inline-block;
    margin-bottom: 14px;
}

.sb-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.12), 0 12px 30px rgba(0,0,0,0.5);
    display: block;
    animation: float 6s ease-in-out infinite;
    transition: border-color 0.4s ease;
}

.sb-name {
    color: #ffffff;
    font-size: 1.05em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.35;
}
.sb-name span { color: var(--accent); transition: color 0.4s ease; }

.sb-role {
    color: rgba(255,255,255,0.38);
    font-size: 0.68em;
    font-weight: 300;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 7px;
}

/* Sidebar sections */
.sb-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--sb-border);
}

.sb-heading {
    font-size: 0.62em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.4s ease;
}
.sb-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(var(--accent-rgb), 0.35), transparent);
}

/* Contact */
.contact-list { list-style: none; }

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 10px;
    font-size: 0.78em;
    font-weight: 300;
    color: rgba(255,255,255,0.58);
    line-height: 1.55;
}
.contact-list li:last-child { margin-bottom: 0; }

.contact-list li i {
    color: var(--accent);
    font-size: 13px;
    margin-top: 2px;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
    transition: color 0.4s ease;
}

.contact-list a {
    color: rgba(255,255,255,0.58);
    text-decoration: none;
    transition: color 0.2s;
}
.contact-list a:hover { color: var(--accent); }

/* Skill bars (sidebar) */
.sb-skill { margin-bottom: 12px; }
.sb-skill:last-child { margin-bottom: 0; }

.sb-skill-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.74em;
    font-weight: 400;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sb-skill-label i { color: var(--accent); font-size: 11px; width: 12px; transition: color 0.4s; }

.sb-bar {
    height: 4px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
}
.sb-fill {
    height: 100%;
    background: linear-gradient(to right, var(--electric), var(--accent));
    border-radius: 2px;
    width: 0;
    transition: width 1.2s ease, background 0.4s ease;
}

/* Languages (stars) */
.lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}
.lang-row:last-child { margin-bottom: 0; }

.lang-row > span {
    color: rgba(255,255,255,0.6);
    font-size: 0.76em;
    font-weight: 300;
}

.lang-row .stars i { font-size: 10px; }

.fa-solid.fa-star  { color: var(--accent); transition: color 0.4s; }
.fa-regular.fa-star { color: rgba(255,255,255,0.12); }

/* Social icons */
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }

.social-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.social-row a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--sb-bg);
    transform: translateY(-2px);
}

/* Theme switcher */
.theme-switcher { display: flex; gap: 10px; align-items: center; }

.theme-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.theme-btn:hover      { transform: scale(1.2); }
.theme-btn.active     { border-color: #fff; transform: scale(1.15); }

.theme-btn[data-theme=""]           { background: #38bdf8; }
.theme-btn[data-theme="foret"]      { background: #34d399; }
.theme-btn[data-theme="rubis"]      { background: #f97316; }
.theme-btn[data-theme="amethyste"]  { background: #a78bfa; }

/* QR Code */
.sb-qr {
    padding: 18px 24px 26px;
    text-align: center;
    margin-top: auto;
}
.sb-qr img {
    width: 75px;
    border-radius: 6px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.sb-qr img:hover { opacity: 0.85; }

/* ===========================
   MAIN CONTENT
=========================== */
.main-content { background: var(--main-bg); }

.cv-section {
    padding: 30px 38px;
    border-bottom: 1px solid var(--border);
}
.cv-section:last-child { border-bottom: none; }
.cv-section:nth-child(even) { background: var(--main-alt); }

/* Section title */
.s-title {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.s-title i { color: var(--electric); font-size: 14px; transition: color 0.4s; }
.s-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--electric), rgba(var(--electric-rgb), 0.06));
    border-radius: 1px;
    transition: background 0.4s;
}

/* Profile */
.profile-text {
    color: var(--text-mid);
    font-size: 0.875em;
    line-height: 1.9;
}

/* Quality tags */
.tags { display: flex; flex-wrap: wrap; gap: 9px; }

.tag {
    font-size: 0.77em;
    font-weight: 500;
    color: var(--electric);
    background: rgba(var(--electric-rgb), 0.07);
    border: 1px solid rgba(var(--electric-rgb), 0.22);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.2s;
}
.tag:hover { background: var(--electric); color: #fff; border-color: var(--electric); }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 28px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--electric), rgba(var(--electric-rgb), 0.08));
    transition: background 0.4s;
}

.tl-item {
    position: relative;
    margin-bottom: 14px;
}
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--electric);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--electric);
    transition: background 0.4s, box-shadow 0.4s;
}

.tl-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.tl-card:hover {
    border-color: rgba(var(--electric-rgb), 0.3);
    box-shadow: 0 4px 18px rgba(var(--electric-rgb), 0.09);
}

.tl-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.tl-org {
    font-size: 0.87em;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}
.tl-org:hover { color: var(--electric); }

.tl-date {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--electric);
    background: rgba(var(--electric-rgb), 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.4s, background 0.4s;
}

.tl-addr {
    font-size: 0.75em;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tl-addr i { color: var(--electric); font-size: 10px; transition: color 0.4s; }

.tl-desc {
    font-size: 0.81em;
    color: var(--text-mid);
    line-height: 1.6;
}

/* Skills 2-column grid */
.skills-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 28px;
}

.sk { display: flex; flex-direction: column; gap: 5px; }

.sk-label {
    font-size: 0.76em;
    font-weight: 500;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 7px;
}
.sk-label i { color: var(--electric); font-size: 12px; transition: color 0.4s; }

.sk-track {
    height: 6px;
    background: #e9edf4;
    border-radius: 3px;
    overflow: hidden;
}
.sk-fill {
    height: 100%;
    background: linear-gradient(to right, var(--electric), var(--accent));
    border-radius: 3px;
    width: 0;
    transition: width 1.2s ease, background 0.4s ease;
}

em {
    font-style: italic;
    color: #f59e0b;
    font-size: 0.8em;
}

/* Hobbies */
.hobby-wrap {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.hobby-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
}

.hobby-card img {
    width: 58px;
    height: 58px;
    padding: 11px;
    border-radius: 14px;
    background: var(--main-alt);
    border: 1px solid var(--border);
    transition: all 0.25s;
    object-fit: contain;
    display: block;
}
.hobby-card:hover img {
    background: rgba(var(--electric-rgb), 0.07);
    border-color: rgba(var(--electric-rgb), 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(var(--electric-rgb), 0.12);
}

.hobby-card span {
    font-size: 0.71em;
    color: var(--text-light);
    font-weight: 500;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 860px) {
    .cv-wrapper { grid-template-columns: 1fr; }

    .sb-flags { position: static; justify-content: center; margin-bottom: 18px; }
    .sb-top { padding: 24px 20px 22px; }
    .sb-section { padding: 18px 20px; }

    .cv-section { padding: 24px 20px; }
    .skills-2col { grid-template-columns: 1fr; }
    .hobby-wrap { grid-template-columns: repeat(3, 1fr); }
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.12), 0 12px 30px rgba(0,0,0,0.5);
    }
    50% {
        transform: translateY(-10px);
        box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.16), 0 22px 30px rgba(0,0,0,0.25);
    }
}
