/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --navy: #c2d9f0;
    --accent: #8a9ba8;
    --accent-light: #1a3a3b;
    --accent-glow: rgba(138, 155, 168, 0.1);
    --text: #D2DAE2;
    --text-secondary: #a0aab4;
    --text-muted: #6c7a89;
    --border: #485460;
    --bg: #1e1e1e;
    --bg-card: #252526;
    --bg-surface: #2d2d2d;
    --logo-bg: #fff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
    --radius: 16px;
    color-scheme: dark light;
}

[data-theme="dark"] {
    --navy: #c2d9f0;
    --accent: #8a9ba8;
    --accent-light: #1a3a3b;
    --accent-glow: rgba(138, 155, 168, 0.1);
    --text: #D2DAE2;
    --text-secondary: #a0aab4;
    --text-muted: #6c7a89;
    --border: #485460;
    --bg: #1e1e1e;
    --bg-card: #252526;
    --bg-surface: #2d2d2d;
    --logo-bg: #fff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
}

[data-theme="light"] {
    --navy: #1a2744;
    --accent: #0d7377;
    --accent-light: #e8f4f4;
    --accent-glow: rgba(13, 115, 119, 0.12);
    --text: #1e1e1e;
    --text-secondary: #444;
    --text-muted: #777;
    --border: #e0e0e0;
    --bg: #ffffff;
    --bg-card: #f8f8f8;
    --bg-surface: #f0f0f0;
    --logo-bg: #fff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, var(--accent)) 50%, var(--bg) 100%);
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 28px;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============ NAV ============ */
.nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 0;
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Theme toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.25s ease;
    margin-left: 4px;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* ============ DIVIDERS ============ */
hr {
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--border) 100%, var(--text-secondary) 20%);
    margin: 8px 0;
}

/* ============ HERO ============ */
.hero {
    padding: 72px 0 56px;
    margin-bottom: 8px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(61, 216, 221, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-inner {
    display: flex;
    align-items: flex-start;
    gap: 52px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.5), 0 12px 40px rgba(0,0,0,0.3), 0 0 24px rgba(61, 216, 221, 0.08);
    flex-shrink: 0;
    margin-top: -4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-lg);
}

.hero-text {
    flex: 1;
}

.hero-wave {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.hero-text h1 {
    font-size: 39px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--navy);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.hero-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    margin-bottom: 16px;
}

.motto {
    font-size: 17px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
    position: relative;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
}

.tagline {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 660px;
    margin: 0 0 16px 0;
}

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

.tagline strong.accent {
    color: var(--accent);
}

.interests {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 14px;
    line-height: 1.7;
    font-style: italic;
}

/* ============ PROOF BAND ============ */
.proof-band {
    padding: 28px 0 32px;
}

.proof-items {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 32px;
}

.proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.proof-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.proof-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.proof-domains {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.proof-domains span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.proof-domains span:not(:last-child)::after {
    content: '\00b7';
    margin-left: 24px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .proof-items {
        flex-wrap: wrap;
        gap: 24px;
    }

    .proof-item {
        flex: 0 0 40%;
    }

    .proof-domains {
        gap: 12px;
    }

    .proof-domains span:not(:last-child)::after {
        display: none;
    }
}

/* ============ HERO CTA ============ */
.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 24px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #0e0e10;
    border: 1.5px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: #0e0e10;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ============ HERO SOCIAL ============ */
.hero-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.hero-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.hero-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.hero-social a svg path {
    fill: currentColor;
}

.hero-open {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 16px;
    font-style: italic;
}

.hero-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ SECTIONS ============ */
.section {
    padding: 48px 0;
    margin-bottom: 0;
    scroll-margin-top: 60px;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(61, 216, 221, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Flat background — no alternating cards */
.section { background: transparent; }

h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

h2::after {
    content: '';
    flex: 0 0 35%;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

/* ============ SECTION INTRO ============ */
.section-intro {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -20px;
    margin-bottom: 32px;
    letter-spacing: 0.2px;
}

/* ============ EXPERIENCE ============ */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 32px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.exp-entry:last-child {
    padding-bottom: 0;
}

.exp-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    padding-top: 2px;
}

.exp-year {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.exp-content {
    display: flex;
    flex-direction: column;
}

.exp-content .company-link {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.exp-content .role {
    margin-bottom: 16px;
}

/* Lead paragraph — first summary in each entry */
.job-lead {
    font-size: 15px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

/* Supporting paragraphs — tighter */
.exp-content .job-summary + .job-summary {
    margin-bottom: 6px;
}

/* Content column — aligned with other sections' container width */
.exp-content {
    max-width: 960px;
}

.company-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--logo-bg);
    padding: 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.company-link {
    color: var(--navy);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: color 0.2s;
}

.company-link:hover {
    color: var(--accent);
}

.role {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
}

.role-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    font-style: italic;
    margin: 16px 0 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.job-summary {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.75;
}

.job-summary strong {
    color: var(--text);
    font-weight: 600;
}

.job ul {
    margin-left: 20px;
    list-style: disc;
}

.job li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.6;
}

/* ============ TOOLS LIST ============ */
.tools-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tool-row {
    display: flex;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.tool-row dt {
    flex-shrink: 0;
    width: 200px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 2px;
}

.tool-row dd {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============ TWO COL ============ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.simple-list {
    list-style: none;
    padding: 0;
}

.simple-list li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

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

/* ============ CERT CARDS ============ */
.cert-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    transition: none;
}

.cert-logos {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.cert-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--logo-bg);
    padding: 3px;
    flex-shrink: 0;
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cert-cards .cert-card:only-child {
    padding: 20px 22px;
}

.cert-card:last-child {
    border-bottom: none;
}

.cert-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.cert-issuer {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.cert-year {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

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

.pills-group {
    margin-bottom: 44px;
}

.pills-group h3 {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

.pills span {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 6px 15px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: default;
}

.pills span.pill-accent,
.pills span.pill-accent:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: none;
    cursor: default;
}

.pills span:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.pills-muted {
    margin-top: 16px;
}

.pills-muted span {
    opacity: 0.75;
}

.pills-primary span {
    font-size: 13.5px;
    padding: 8px 18px;
    color: var(--text);
    border-color: var(--accent);
    background: rgba(61, 216, 221, 0.08);
    font-weight: 600;
}

.pills-primary .pill-no-highlight {
    font-size: inherit;
    padding: inherit;
    color: var(--text);
    border-color: var(--border);
    background: transparent;
    font-weight: 400;
}

.pill-highlight {
    font-weight: 600;
    border-color: var(--accent) !important;
    background: rgba(61, 216, 221, 0.08) !important;
}

/* ============ PROJECTS ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 32px 28px;
    background: var(--bg-surface);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow-md);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--navy)));
    opacity: 1;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
    opacity: 1;
}

.project-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.08);
}

.project-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.project-pills {
    margin-bottom: 14px;
}

.project-preview {
    width: 85%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 8px 20px;
    border: 1.5px solid var(--accent);
    border-radius: 24px;
    transition: all 0.25s ease;
    margin-top: auto;
}

.project-cta:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ============ FOOTER ============ */
footer {
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-inner {
    animation: fadeInUp 0.6s ease-out;
}

.exp-entry, .project-card, .tool-row, .pills span {
    animation: fadeInUp 0.5s ease-out both;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    body {
        padding: 0 16px;
    }

    .hero {
        padding: 48px 0 32px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
        margin-top: 0;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .motto {
        text-align: left;
    }

    .tagline {
        max-width: 100%;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-open, .hero-location {
        text-align: center;
    }

    .exp-entry {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .exp-meta {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .tool-row {
        flex-direction: column;
        gap: 4px;
    }

    .tool-row dt {
        width: auto;
    }

    .two-col,
    .projects-grid,
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .section {
        padding: 36px 0;
    }

    .cert-cards {
        gap: 10px;
    }
}

@media (min-width: 769px) and (max-width: 960px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}
