/* ==== Global reset ==== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==== Theme variables ==== */
:root {
    /* Light theme */
    --bg-color: #f0f4ff;
    --text-color: #222;
    --accent: #3498db;          /* NordVPN‑blau */
    --glass-bg: rgba(255,255,255,.15);
    --glass-border: rgba(255,255,255,.3);
}

/* Dark theme – activated by data‑theme="dark" on <html> */
[data-theme="dark"] {
    --bg-color: #111;
    --text-color: #eee;
    --accent: #9b59b6;          /* Lila */
    --glass-bg: rgba(0,0,0,.35);
    --glass-border: rgba(255,255,255,.2);
}

/* ==== Base layout ==== */
html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
}
.header h1 { font-size: 1.8rem; }
#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent);
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ==== Glass effect ==== */
.glass {
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

/* Hero section */
.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}
.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}
.hero-text h2 { font-size: 2rem; margin-bottom: .5rem; }
.hero-text p { font-size: 1.1rem; }

/* Projects */
.projects h2,
.contact h2 {
    margin-bottom: 1rem;
    color: var(--accent);
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card h3 { margin-bottom: .5rem; }
.btn {
    display: inline-block;
    margin-top: .75rem;
    padding: .5rem 1rem;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s;
}
.btn:hover { background: shade(var(--accent), 10%); }

/* Contact */
.contact { text-align: center; }

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    margin-top: 3rem;
    font-size: .9rem;
}

/* ==== Responsive tweaks ==== */
@media (max-width: 600px) {
    .hero { flex-direction: column; text-align: center; }
    .avatar { width: 120px; height: 120px; }
}