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

:root {
    --text: #2c2c2c;
    --text-secondary: #555;
    --text-muted: #888;
    --bg: #faf9f7;
    --bg-alt: #f2f0ed;
    --card-bg: #fff;
    --border: #e8e4df;
    --accent: #c96442;
    --accent-hover: #a85035;
    --radius: 10px;
    --max-width: 720px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Nav */
nav {
    position: sticky;
    top: 0;
    background: rgba(250, 249, 247, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Main */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border);
}

section:last-child {
    border-bottom: none;
}

section h2 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* Hero / About */
.hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
    border-bottom: none;
}

.hero-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.portrait {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hero-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

.bio {
    margin-top: 0.85rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
}

.email {
    margin-top: 0.6rem;
    font-size: 0.8rem;
}

.email a {
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.2rem 0.7rem;
    text-decoration: none;
    transition: color 0.15s;
}

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

.links {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--card-bg);
    transition: all 0.15s;
}

.btn:hover {
    background: var(--bg-alt);
    border-color: #ccc;
    color: var(--text);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.card {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.card-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.2rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.card p {
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.card-tools span {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.2rem 0.65rem;
    white-space: nowrap;
}

.card-link {
    display: inline-block;
    margin-top: 0.5rem;
    margin-right: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.skill-group {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
}

.skill-group h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.skill-group ul {
    list-style: none;
}

.skill-group li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.15rem 0;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.1rem;
    letter-spacing: -0.01em;
}

.timeline-content h3 a {
    color: var(--text);
    text-decoration: none;
}

.timeline-content h3 a:hover {
    color: var(--accent);
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.6;
}

.section-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* Contact */
.contact-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    main {
        padding: 0 1.25rem;
    }

    .nav-inner {
        padding: 0.8rem 1.25rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 1.25rem;
        align-items: flex-start;
    }

    .portrait {
        width: 96px;
        height: 96px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    section {
        padding: 2.5rem 0;
    }

    .hero {
        padding-top: 2.5rem;
    }
}