:root {
    --bg: #ffffff;
    --text: #111111;
    --card-bg: #f9f9f9;
    --accent: #007acc;
    --border: #e0e0e0;
}

[data-theme="dark"] {
    --bg: #1e1e1e;
    --text: #e6e6e6;
    --card-bg: #2a2a2a;
    --accent: #4ea1ff;
    --border: #3a3a3a;
}

body {
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

header {
    max-width: 900px;
    margin: 2rem auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

header img {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

header h2 {
    margin: 0.2rem 0 0.5rem;
    font-weight: 500;
    color: var(--accent);
    font-size: 1.1rem;
}

header p {
    margin: 0;
    font-style: italic;
    color: var(--text);
    opacity: 0.8;
}

section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

p,
li {
    max-width: 800px;
}

ul {
    padding-left: 1.5rem;
}

footer {
    text-align: center;
    font-size: 0.9rem;
    margin: 3rem 0 1rem;
    opacity: 0.7;
}

.toggle-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
}

button.toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
}

button.toggle:hover {
    background: var(--border);
}

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

a:hover {
    text-decoration: underline;
}

/* Muted text for older/relevant-but-less-important sections */
.muted {
    color: var(--muted-text);
}

/* Also fade headings and links within muted sections */
.muted h2,
.muted h3,
.muted a {
    color: var(--muted-heading);
}

/* Light mode colours */
:root {
    --muted-text: #666666;
    /* body text in muted sections */
    --muted-heading: #555555;
    /* slightly darker grey for headings */
}

/* Dark mode colours */
[data-theme="dark"] {
    --muted-text: #999999;
    --muted-heading: #aaaaaa;
}

.cv-link {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.cv-link:hover {
    background: var(--border);
    text-decoration: none;
}