/* ============================================================
   GUIDO FRISSAER — CV / Portfolio
   Theme: Terminal × Network × AI
   ============================================================ */

/* Google Fonts loaded via HTML: Inter (body) + JetBrains Mono (code) */

/* ── CSS Custom Properties ── */
:root {
    /* Dark (default) */
    --bg:          #060b14;
    --bg-surface:  #0d1627;
    --bg-card:     rgba(13, 22, 39, 0.85);
    --text:        #cdd6f4;
    --text-muted:  #6c7a9b;
    --accent:      #00d4ff;          /* cyan — network packet colour */
    --accent2:     #5eead4;
    --accent3:     #38bdf8;
    --accent-rgb:  0, 212, 255;
    --glow:        rgba(0, 212, 255, 0.25);
    --glow2:       rgba(94, 234, 212, 0.2);
    --border:      rgba(0, 212, 255, 0.18);
    --accent-soft: rgba(0, 212, 255, 0.12);
    --accent-soft-strong: rgba(0, 212, 255, 0.07);
    --accent2-soft: rgba(94, 234, 212, 0.12);
    --accent2-soft-strong: rgba(94, 234, 212, 0.07);
    --accent3-soft: rgba(56, 189, 248, 0.12);
    --accent3-soft-strong: rgba(56, 189, 248, 0.07);
    --accent3-border: rgba(56, 189, 248, 0.25);
    --accent3-pulse: rgba(56, 189, 248, 0.6);
    --border-soft: rgba(255,255,255,0.06);
    --mono:        'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --radius:      14px;
}

[data-theme="light"] {
    --bg:          #f0f4ff;
    --bg-surface:  #e4eaf8;
    --bg-card:     rgba(255,255,255,0.92);
    --text:        #1a2540;
    --text-muted:  #5a6788;
    --accent:      #0077b6;
    --accent2:     #0f766e;
    --accent3:     #0369a1;
    --accent-rgb:  0, 119, 182;
    --glow:        rgba(0,119,182,0.15);
    --glow2:       rgba(15,118,110,0.12);
    --border:      rgba(0,119,182,0.2);
    --accent-soft: rgba(0,119,182,0.12);
    --accent-soft-strong: rgba(0,119,182,0.07);
    --accent2-soft: rgba(15,118,110,0.12);
    --accent2-soft-strong: rgba(15,118,110,0.07);
    --accent3-soft: rgba(3,105,161,0.12);
    --accent3-soft-strong: rgba(3,105,161,0.07);
    --accent3-border: rgba(3,105,161,0.25);
    --accent3-pulse: rgba(3,105,161,0.5);
    --border-soft: rgba(0,0,0,0.06);
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Body ── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    transition: background 0.35s, color 0.35s;
    overflow-x: hidden;
}

/* ── Topology / network-node canvas background ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* ── Topbar / Navbar ── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 56px;
    background: rgba(6, 11, 20, 0.75);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
}

[data-theme="light"] .topbar {
    background: rgba(240, 244, 255, 0.82);
}

.topbar-brand {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--accent3);
    letter-spacing: 0.04em;
}

.topbar-brand span { color: var(--text-muted); }

.topbar-nav { display: flex; gap: 28px; align-items: center; }

.topbar-nav a {
    font-size: 0.83rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.topbar-nav a:hover { color: var(--accent); }

.topbar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
}

.color-switcher-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.color-swatch {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.12);
}

.color-swatch.active {
    box-shadow: 0 0 0 2px var(--text), 0 0 18px currentColor;
}

.color-swatch[data-accent="cyan"] { background: #8bd3e6; color: #8bd3e6; }
.color-swatch[data-accent="green"] { background: #2dd4bf; color: #2dd4bf; }
.color-swatch[data-accent="orange"] { background: #fbbf24; color: #fbbf24; }
.color-swatch[data-accent="red"] { background: #ef4444; color: #ef4444; }
.color-swatch[data-accent="violet"] { background: #f472b6; color: #f472b6; }
.color-swatch[data-accent="hologram"] {
    background: linear-gradient(135deg, 
        rgba(100, 116, 139, 0.8), 
        rgba(244, 63, 94, 0.8), 
        rgba(6, 182, 212, 0.8));
    color: #f43f5e;
    animation: hologram-flicker 3s ease-in-out infinite;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.lang-toggle a {
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
    transition: all 0.2s;
}

.lang-toggle a:last-child { border-right: none; }
.lang-toggle a:hover { color: var(--accent); }

.lang-toggle a.active {
    color: var(--bg);
    background: var(--accent);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

@keyframes hologram-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes rgb-glitch {
    0% {
        clip-path: inset(60% 0 0 0);
        transform: translate(-3px, 3px);
        filter: hue-rotate(-45deg);
    }
    20% {
        clip-path: inset(20% 0 70% 0);
        transform: translate(3px, -3px);
        filter: hue-rotate(45deg);
    }
    40% {
        clip-path: inset(70% 0 15% 0);
        transform: translate(-2px, 2px);
        filter: hue-rotate(-60deg);
    }
    60% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(4px, -2px);
        filter: hue-rotate(60deg);
    }
    80% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-4px, 1px);
        filter: hue-rotate(-30deg);
    }
    100% {
        clip-path: inset(0);
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 10px; }
}

@keyframes chromatic-shift {
    0%, 100% {
        text-shadow: 
            -4px 0 0 rgba(244, 63, 94, 0.8),
            4px 0 0 rgba(6, 182, 212, 0.8),
            0 0 30px rgba(100, 116, 139, 0.5);
    }
    25% {
        text-shadow: 
            -6px 2px 0 rgba(244, 63, 94, 0.9),
            6px -2px 0 rgba(6, 182, 212, 0.9),
            0 0 40px rgba(100, 116, 139, 0.7);
    }
    50% {
        text-shadow: 
            -8px 0 0 rgba(244, 63, 94, 1),
            8px 0 0 rgba(6, 182, 212, 1),
            0 0 50px rgba(100, 116, 139, 0.8);
    }
    75% {
        text-shadow: 
            -4px -2px 0 rgba(244, 63, 94, 0.9),
            4px 2px 0 rgba(6, 182, 212, 0.9),
            0 0 45px rgba(100, 116, 139, 0.6);
    }
}

@keyframes intense-glitch {
    0%, 100% { 
        clip-path: inset(45% 0 45% 0);
        transform: translate(0, 0);
    }
    10% { 
        clip-path: inset(10% 0 80% 0);
        transform: translate(-5px, 5px);
    }
    20% { 
        clip-path: inset(60% 0 25% 0);
        transform: translate(5px, -5px);
    }
    30% { 
        clip-path: inset(30% 0 60% 0);
        transform: translate(-3px, 3px);
    }
    40% { 
        clip-path: inset(70% 0 15% 0);
        transform: translate(4px, -4px);
    }
    50% { 
        clip-path: inset(25% 0 65% 0);
        transform: translate(-6px, 2px);
    }
    60% { 
        clip-path: inset(55% 0 35% 0);
        transform: translate(3px, -5px);
    }
    70% { 
        clip-path: inset(35% 0 55% 0);
        transform: translate(-4px, 4px);
    }
    80% { 
        clip-path: inset(65% 0 20% 0);
        transform: translate(5px, -3px);
    }
    90% { 
        clip-path: inset(15% 0 75% 0);
        transform: translate(-5px, 5px);
    }
}

@keyframes hologram-depth {
    0%, 100% { 
        transform: perspective(800px) rotateX(0deg) rotateY(-2deg) scaleZ(0.95);
        filter: blur(0px) brightness(1);
    }
    50% { 
        transform: perspective(800px) rotateX(1deg) rotateY(2deg) scaleZ(1.05);
        filter: blur(1px) brightness(1.15);
    }
}

@keyframes distortion-wave {
    0%, 100% { 
        filter: contrast(1) saturate(1.1) hue-rotate(0deg);
    }
    25% { 
        filter: contrast(1.3) saturate(1.4) hue-rotate(15deg);
    }
    50% { 
        filter: contrast(1.5) saturate(1.6) hue-rotate(-15deg);
    }
    75% { 
        filter: contrast(1.2) saturate(1.3) hue-rotate(8deg);
    }
}

@keyframes ghost-glow {
    0%, 100% { 
        box-shadow: 
            0 0 15px rgba(244, 63, 94, 0.4),
            0 0 40px rgba(6, 182, 212, 0.2),
            inset 0 0 0px rgba(100, 116, 139, 0);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(244, 63, 94, 0.7),
            0 0 70px rgba(6, 182, 212, 0.5),
            inset 0 0 30px rgba(100, 116, 139, 0.15);
    }
}

body[data-accent-theme="hologram"] {
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(100, 116, 139, 0.03),
            rgba(100, 116, 139, 0.03) 1px,
            transparent 1px,
            transparent 3px
        ),
        radial-gradient(ellipse at 20% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
        var(--bg);
    animation: distortion-wave 8s ease-in-out infinite;
}

body[data-accent-theme="hologram"] .hero {
    position: relative;
    animation: hologram-depth 5s ease-in-out infinite;
}

body[data-accent-theme="hologram"] .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    animation: scanlines 0.15s linear infinite;
}

body[data-accent-theme="hologram"] .hero h1 {
    background: linear-gradient(90deg, var(--accent2), var(--accent3), var(--accent2)) 0% 0% / 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chromatic-shift 1.5s ease-in-out infinite, rgb-glitch 0.3s infinite;
    letter-spacing: 0.05em;
    font-weight: 800;
}

body[data-theme="light"][data-accent-theme="hologram"] .hero h1 {
    background: linear-gradient(90deg, rgba(190, 24, 93, 0.95), rgba(8, 145, 178, 0.95)) 0% 0% / 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    filter: brightness(1.2) saturate(1.3);
}

body[data-accent-theme="hologram"] .info-card-header {
    background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
    border: 2px solid var(--accent2);
    position: relative;
    animation: intense-glitch 0.5s infinite;
}

body[data-accent-theme="hologram"] .card,
body[data-accent-theme="hologram"] .cert-card,
body[data-accent-theme="hologram"] .course-card {
    border: 2px solid rgba(100, 116, 139, 0.4);
    backdrop-filter: blur(30px);
    background: rgba(13, 22, 39, 0.25);
    animation: ghost-glow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

body[data-accent-theme="hologram"] .card::after,
body[data-accent-theme="hologram"] .cert-card::after,
body[data-accent-theme="hologram"] .course-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

body[data-theme="light"][data-accent-theme="hologram"] .card,
body[data-theme="light"][data-accent-theme="hologram"] .cert-card,
body[data-theme="light"][data-accent-theme="hologram"] .course-card {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(71, 85, 105, 0.3);
}

body[data-accent-theme="hologram"] #bg-canvas {
    opacity: 0.35;
    filter: hue-rotate(15deg) contrast(1.3) brightness(0.9);
    animation: rgb-glitch 0.4s infinite;
}

body[data-accent-theme="hologram"] .section h2 {
    animation: chromatic-shift 1.8s ease-in-out infinite;
    position: relative;
}

body[data-accent-theme="hologram"] .status-badge {
    animation: ghost-glow 2.5s ease-in-out infinite;
    border: 2px solid var(--accent2);
    backdrop-filter: blur(15px);
    position: relative;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-left: 88px;
    padding-right: 88px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 64px;
    align-items: center;
    width: 100%;
}

/* Terminal prompt prefix in hero */
.prompt {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--accent3);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt::before { content: '$ '; color: var(--text-muted); }

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(120deg, #fff 0%, var(--accent) 55%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(120deg, #1a2540 0%, var(--accent) 55%, var(--accent2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-role {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hero-role strong { color: var(--text); font-weight: 600; }

.hero-location {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-location i { color: var(--accent); }

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1px solid var(--accent3-border);
    background: var(--accent3-soft-strong);
    font-size: 0.82rem;
    color: var(--accent3);
    font-weight: 500;
    margin-bottom: 28px;
}

.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent3-pulse); }
    50% { opacity: 0.8; box-shadow: 0 0 0 5px rgba(0,0,0,0); }
}

/* CTA buttons */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 6px 28px var(--glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px var(--glow); filter: brightness(1.1); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Info card (right column in hero) ── */
.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.info-card-header {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    padding: 16px 22px;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: #000;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.info-card-header .dots { display: flex; gap: 6px; }
.info-card-header .dots span {
    width: 11px; height: 11px; border-radius: 50%;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 0 0 1px rgba(0,0,0,0.12);
}

.info-card-header .dot-close { background: #ff5f57; }
.info-card-header .dot-minimize { background: #febc2e; }
.info-card-header .dot-expand { background: #28c840; }

.info-card-title {
    letter-spacing: 0.04em;
    font-weight: 700;
    opacity: 0.9;
}

.info-card-body { padding: 24px; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    margin-right: 12px;
}

.info-val {
    font-weight: 500;
    text-align: right;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { 
    padding: 96px 88px;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 44px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section h2 i {
    color: var(--accent);
    font-size: 0.9em;
    filter: drop-shadow(0 0 10px var(--glow));
}

/* ── Divider ── */
.section-divider {
    border: none;
    border-top: 1px solid var(--border-soft);
    margin: 0;
}

/* ── Glass card ── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.section-intro {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.about-grid .card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; }
.about-grid .card p + p { margin-top: 12px; }

.about-grid .card h3 {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.about-card-list {
    display: grid;
    gap: 12px;
}

.about-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.about-highlight i {
    color: var(--accent);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-cats { display: flex; flex-direction: column; gap: 32px; }

.skill-cat-title {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

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

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface);
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    cursor: default;
}

.skill-pill i { color: var(--accent); font-size: 0.95em; }

.skill-pill:hover {
    border-color: var(--accent);
    background: var(--accent-soft-strong);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow);
}

.skill-pill:hover i { color: var(--accent); }

/* Secondary variant */
.skill-pill.ai { border-color: var(--accent2-soft); }
.skill-pill.ai i { color: var(--accent2); }
.skill-pill.ai:hover { border-color: var(--accent2); background: var(--accent2-soft-strong); color: var(--accent2); box-shadow: 0 6px 20px var(--glow2); }

/* Tertiary variant */
.skill-pill.sys i { color: var(--accent3); }
.skill-pill.sys { border-color: var(--accent3-soft); }
.skill-pill.sys:hover { border-color: var(--accent3); background: var(--accent3-soft-strong); color: var(--accent3); box-shadow: 0 6px 20px var(--accent3-soft); }

/* ── Cert badges ── */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-items: flex-start;
    gap: 16px;
    margin-top: 16px;
}

.cert-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-surface);
    transition: all 0.2s;
    overflow: hidden;
}

.cert-card:not([open]) {
    height: 136px;
}

.cert-card[open] {
    height: auto;
    display: flex;
    flex-direction: column;
}

.cert-card:hover,
.cert-card[open] {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--glow);
}

.cert-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 120px;
    padding: 16px 20px;
    cursor: pointer;
}

.cert-summary::-webkit-details-marker { display: none; }

.cert-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.cert-summary::after {
    content: '+';
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cert-card[open] .cert-summary::after {
    content: '−';
    border-color: var(--accent);
    transform: rotate(180deg);
}

.cert-details {
    display: grid;
    gap: 14px;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-soft);
}

.cert-card[open] .cert-details {
    display: grid;
    overflow: visible;
}

.cert-card[open] .cert-meta {
    margin-top: 4px;
}

.cert-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    padding-top: 14px;
}

.cert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-meta span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft-strong);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.badge-slot {
    min-height: 132px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    background: linear-gradient(180deg, var(--accent-soft-strong), transparent);
}

.badge-slot strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.badge-slot span {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.badge-slot a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.badge-slot img {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.badge-slot a:hover img {
    transform: scale(1.03);
}

.pdf-badge-link {
    width: 100%;
    text-decoration: none;
}

.pdf-badge {
    display: grid;
    place-items: center;
    gap: 6px;
    width: 100%;
    min-height: 132px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--accent-soft-strong), transparent);
    color: var(--text);
    text-align: center;
    padding: 14px;
}

.pdf-badge i {
    font-size: 2rem;
    color: #e74c3c;
}

.pdf-badge strong {
    color: var(--text);
    font-size: 0.9rem;
}

.pdf-badge span {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.pdf-preview-wrap {
    width: 100%;
    display: grid;
    gap: 8px;
}

.pdf-preview-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pdf-preview-grid a {
    display: grid;
    gap: 6px;
    text-decoration: none;
}

.pdf-preview-frame {
    position: relative;
    width: 100%;
    height: 190px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-surface-2);
}

.pdf-preview-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
}

.pdf-preview {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.pdf-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--accent-soft-strong);
}

.pdf-preview-link:hover {
    border-color: var(--accent);
    filter: brightness(1.02);
}

.pdf-preview-image {
    width: 100%;
    height: 190px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--bg-surface-2);
    object-fit: contain;
}

.pdf-preview-image--small {
    height: 112px;
}

.pdf-preview-caption {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.cert-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cert-icon.net { background: var(--accent-soft); color: var(--accent); }
.cert-icon.ai  { background: var(--accent2-soft); color: var(--accent2); }
.cert-icon.sys { background: var(--accent3-soft); color: var(--accent3); }

.cert-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    min-height: 4.2em;
}

.cert-issuer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
    min-height: 1.35em;
    margin-top: 2px;
}

/* ============================================================
   EXPERIENCE & EDUCATION — TIMELINE
   ============================================================ */
.two-col  { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.timeline { position: relative; padding-left: 28px; }

.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 6px; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--accent2) 60%, transparent 100%);
    border-radius: 2px;
}

.timeline-item { position: relative; margin-bottom: 38px; }

.timeline-dot {
    position: absolute;
    left: -34px; top: 5px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 14px var(--glow);
}

.t-date {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
}

.t-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.t-org   { font-size: 0.88rem; color: var(--accent2); font-weight: 500; margin-bottom: 10px; }

.t-body  { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.t-body ul { padding-left: 18px; }
.t-body li { margin-bottom: 4px; }

/* ============================================================
   COURSES / TEACHING
   ============================================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.archived-courses {
    margin-top: 22px;
}

.courses-grid:not(.archived-courses) .course-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.courses-grid:not(.archived-courses) .course-desc {
    flex: 1;
}

.archived-courses .course-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.archived-courses .course-desc {
    flex: 1;
}

.course-card {
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    background: var(--bg-surface);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    opacity: 0;
    transition: opacity 0.25s;
}

.course-card:hover { border-color: var(--border); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.25); }
.course-card:hover::before { opacity: 1; }

.course-icon { font-size: 1.6rem; margin-bottom: 12px; }
.course-name { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.course-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.55; }
.course-level {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 20px;
}

.course-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
}

.course-status.archived {
    color: var(--text-muted);
    background: rgba(127, 127, 127, 0.08);
    border-color: rgba(127, 127, 127, 0.28);
}

.course-card--archived {
    background: var(--bg-surface);
    border-style: dashed;
    border-color: rgba(127, 127, 127, 0.28);
}

.course-card--archived::before {
    background: linear-gradient(90deg, rgba(127, 127, 127, 0.45), rgba(127, 127, 127, 0.2));
}

.course-card--archived .course-icon,
.course-card--archived .course-name,
.course-card--archived .course-desc,
.course-card--archived .course-level {
    opacity: 0.82;
}

/* ============================================================
   LANGUAGES & PERSONAL
   ============================================================ */
.lang-grid { display: flex; flex-direction: column; gap: 16px; }

.lang-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-name { font-weight: 600; font-size: 0.95rem; min-width: 110px; }
.lang-level { font-size: 0.82rem; color: var(--text-muted); min-width: 80px; }

.lang-bar { flex: 1; height: 5px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
.lang-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; }

.personal-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.personal-list li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); }
.personal-list li i { color: var(--accent); width: 18px; text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    position: relative; z-index: 1;
    padding: 36px 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-soft);
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .hero      { padding-left: 28px; padding-right: 28px; }
    .section   { padding: 96px 28px; }
    .hero-inner  { grid-template-columns: 1fr; gap: 40px; }
    .two-col     { grid-template-columns: 1fr; }
    .about-grid  { grid-template-columns: 1fr; }
    .topbar-nav  { display: none; }
    .topbar { padding: 0 16px; }
    .topbar-controls { gap: 8px; }
}

@media (max-width: 600px) {
    .hero      { padding-left: 16px; padding-right: 16px; }
    .section   { padding: 80px 16px; }
    .container { padding: 0 16px 80px; }
    .hero h1   { font-size: 2.4rem; }
    .section h2 { font-size: 1.6rem; }
    .topbar-controls { gap: 6px; }
    .color-switcher { padding: 4px 6px; gap: 6px; }
    .color-swatch { width: 12px; height: 12px; }
    .theme-toggle { padding: 6px 10px; }
    #theme-label { display: none; }
    .cert-summary { align-items: flex-start; }
    .cert-summary::after { margin-top: 4px; }
}
