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

/* Typography & Base */
:root {
    --text: #e5e5e5;
    --bg: #121212;
    --accent: #60a5fa;
    --accent-hover: #93bbfd;
    --border: #2e2e2e;
    --muted: #9ca3af;
    --card-bg: #1e1e1e;
}

[data-theme="light"] {
    --text: #1a1a1a;
    --bg: #fafafa;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e5e5;
    --muted: #6b7280;
    --card-bg: #ffffff;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 3rem 0 4rem;
}

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

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

h1, h2, h3 {
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

ul {
    list-style: disc;
    padding-left: 1.25rem;
}

/* Layout */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.nav-brand:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    transition: transform 0.2s, opacity 0.2s;
}

/* Hero */
.hero {
    text-align: center;
    padding: 0.4rem 0 3rem;
}

.hero-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.hero h1 {
    margin-bottom: 0.5rem;
}

.hero .tagline {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.hero-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-links a {
    font-size: 0.95rem;
}

/* Section */
.section {
    margin-bottom: 2.5rem;
}

.section h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.25rem;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.card .card-link {
    font-size: 0.9rem;
}

/* CV-specific */
.cv-entry {
    margin-bottom: 2rem;
}

.cv-entry .dates {
    color: var(--muted);
    font-size: 0.9rem;
}

.cv-entry .role {
    font-style: italic;
    color: var(--muted);
    font-size: 0.95rem;
}

.cv-entry ul {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

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

.skill-group {
    margin-bottom: 1rem;
}

.skill-group strong {
    display: inline;
}

.download-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn:hover {
    background: var(--accent-hover);
    color: #fff;
    text-decoration: none;
}

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

.contact-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.contact-list li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    position: sticky;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
}

.footer a {
    color: var(--muted);
}

.footer a:hover {
    color: var(--text);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--border);
    border: none;
    cursor: pointer;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 0.75rem;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.theme-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: var(--text);
    transition: transform 0.2s;
}

[data-theme="light"] .theme-toggle::after {
    transform: translateX(1.25rem);
}

/* Responsive */
@media (max-width: 640px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .nav-links.open {
        display: flex;
    }

    main {
        padding: 2rem 0 3rem;
    }
}
