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

:root {
    --color-bg: #fafafa;
    --color-text: #222;
    --color-muted: #666;
    --color-accent: #2563eb;
    --color-border: #e5e5e5;
    --color-card-bg: #fff;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Fira Code", monospace;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

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

/* ===== Landing Page ===== */

.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 520px;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--color-border);
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero .tagline {
    color: var(--color-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.hero .sub {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.hero nav.links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    flex: 1;
    min-width: 160px;
}

.card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    text-decoration: none;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

.social {
    margin-top: 2rem;
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

/* ===== Resume Header ===== */

header {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.header-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.location {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-top: 0.15rem;
}

header .tagline {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
    font-style: italic;
}

.nav-links {
    margin-top: 0.5rem;
    display: flex;
    gap: 1.25rem;
}

/* ===== Sections ===== */

main {
    padding: 2rem 0;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-border);
}

/* Summary */

.summary p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Skills */

.skill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-list li {
    background: var(--color-border);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* Experience */

.entry {
    margin-bottom: 1.75rem;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.entry-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.entry-header .location {
    font-size: 0.9rem;
}

.role {
    margin-top: 0.75rem;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-border);
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.role-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.dates {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-family: var(--font-mono);
}

.role ul {
    margin-left: 1.25rem;
    font-size: 0.9rem;
}

.role li {
    margin-bottom: 0.3rem;
}

.role > p {
    font-size: 0.9rem;
}

/* Education */

.education .entry {
    margin-bottom: 1rem;
}

.education h4 {
    font-size: 1rem;
    font-weight: 600;
}

.education p {
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* Certifications */

.certifications ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.certifications li {
    background: var(--color-border);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ===== Build Page ===== */

.build-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.build-item {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
}

.build-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.build-item p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* Architecture Diagram */

.arch-diagram {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    overflow-x: auto;
}

.arch-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.arch-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--color-border);
}

.arch-group {
    text-align: center;
    min-width: 110px;
}

.arch-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.arch-box {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid;
}

.arch-aws {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.arch-tool {
    background: #ede9fe;
    border-color: #8b5cf6;
    color: #5b21b6;
}

.arch-external {
    background: #e0f2fe;
    border-color: #0ea5e9;
    color: #075985;
}

.arch-detail {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.arch-arrow {
    font-size: 1.25rem;
    color: var(--color-muted);
    flex-shrink: 0;
}

/* Timeline */

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.timeline-content code {
    background: var(--color-border);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Tech Stack Table */

.stack-table {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.stack-row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

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

.stack-category {
    flex: 0 0 140px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    background: var(--color-bg);
    font-size: 0.85rem;
}

.stack-value {
    flex: 1;
    padding: 0.75rem 1rem;
    color: var(--color-muted);
}

/* Links */

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

a:hover {
    text-decoration: underline;
}

/* Footer */

footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */

@media (max-width: 480px) {
    header h1,
    .hero h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .header-row {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
    }

    .role-header,
    .entry-header {
        flex-direction: column;
    }

    .hero nav.links {
        flex-direction: column;
    }

    .card {
        min-width: auto;
    }

    .build-grid {
        grid-template-columns: 1fr;
    }

    .arch-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .arch-arrow {
        display: none;
    }

    .arch-group {
        min-width: 45%;
    }

    .stack-row {
        flex-direction: column;
    }

    .stack-category {
        flex: none;
        border-bottom: none;
        padding-bottom: 0.25rem;
    }

    .stack-value {
        padding-top: 0;
    }
}

/* ===== Print ===== */

@media print {
    body {
        background: white;
        font-size: 11pt;
    }

    .container {
        max-width: 100%;
    }

    header {
        padding: 1rem 0;
    }

    .header-avatar {
        display: none;
    }

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

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--color-muted);
    }

    .nav-links {
        display: none;
    }
}
