:root {
    --bg: #0b0b0d;
    --bg-soft: #111113;
    --card-bg: #151517;
    --card-border: #26262a;
    --text: #e7e7ea;
    --text-muted: #9a9aa2;
    --tag-bg: #1c1c20;
    --tag-text: #c7c7cf;
    --header-bg: rgba(11, 11, 13, 0.8);
}

:root[data-theme="light"] {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --card-bg: #f7f7f8;
    --card-border: #e5e5e8;
    --text: #1a1a1e;
    --text-muted: #62626a;
    --tag-bg: #f0f0f2;
    --tag-text: #3a3a40;
    --header-bg: rgba(255, 255, 255, 0.8);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Theme-toggle circle reveal (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 3px;
}

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

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 12px;
    z-index: 100;
    background: var(--text);
    color: var(--bg);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

main {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    margin: 0 0 1.2em;
}

section {
    padding: 60px 0;
    border-top: 1px solid var(--card-border);
}

section#top {
    border-top: none;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
    padding: 18px 24px;
    backdrop-filter: blur(8px);
    background: var(--header-bg);
}

.nav-links {
    display: flex;
    gap: 22px;
    font-size: 0.9rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

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

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

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

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: flex;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
    display: flex;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

.icon {
    flex-shrink: 0;
}

/* Hero */

.hero {
    padding: 90px 0 60px;
    text-align: center;
}

.eyebrow {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero h1 {
    margin: 0.2em 0 0.1em;
    font-size: 2.6rem;
}

.hero-role {
    margin: 0 0 0.8em;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.hero-tagline {
    max-width: 560px;
    margin: 0 auto 1.8em;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-outline {
    border-color: var(--card-border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background: var(--tag-bg);
}

/* About */

.about-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-grid p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0;
    flex: 1;
}

.about-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

/* Experience */

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 8px;
}

.card-header-title {
    min-width: 0;
    flex: 1 1 auto;
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.role-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-header-dates {
    margin-left: auto;
    white-space: nowrap;
}

.logo-badge {
    min-width: 48px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    padding: 6px 10px;
}

.logo-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.role {
    padding-top: 16px;
}

.role + .role {
    border-top: 1px solid var(--card-border);
}

.role-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.role-title {
    font-weight: 600;
}

.role-dates {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.role ul {
    margin: 0;
    padding-left: 1.1em;
    color: var(--text-muted);
}

.role li {
    margin-bottom: 6px;
}

.role li strong {
    color: var(--text);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tags span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Skills */

.sub-section {
    margin-bottom: 24px;
}

.sub-section .title {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

ul.tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

ul.tags li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 6px 12px;
    border-radius: 6px;
}

/* Connect */

.connect p {
    color: var(--text-muted);
    max-width: 640px;
}

/* Footer */

footer {
    text-align: center;
    padding: 40px 24px 30px;
}

footer .icons {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 16px;
}

footer .icons a {
    color: var(--text-muted);
    text-decoration: none;
}

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

@media screen and (max-width: 560px) {
    .nav-links {
        gap: 14px;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 600px) {
    .hero {
        padding: 60px 0 40px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    section {
        padding: 40px 0;
    }

    .card {
        padding: 20px;
    }

    .card-header-dates {
        margin-left: 0;
        width: 100%;
    }

    .about-grid {
        flex-direction: column-reverse;
        text-align: center;
        gap: 24px;
    }

    .about-grid p {
        max-width: none;
    }
}
