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

:root {
    --black:  #0a0a0a;
    --green:  #00e676;
    --blue:   #a8c8f8;
    --cream:  #f5f5e8;
    --white:  #ffffff;
    --text:   #111111;
    --muted:  #555555;
    --border: #d4d4c8;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
    padding: 2rem 1rem;
}

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

a:hover { opacity: 0.7; }

/* ── Page wrapper (the centered box) ── */

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border: 3px solid var(--black);
}

/* ── Nav ── */

header {
    background: var(--black);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

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

.nav-links a {
    color: #cccccc;
    font-size: 0.875rem;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--white);
    opacity: 1;
}

/* ── Hero ── */

.hero {
    display: flex;
    min-height: 280px;
    border-bottom: 3px solid var(--black);
}

.hero-text {
    background: var(--green);
    flex: 0 0 64%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 3px solid var(--black);
}

.hero-text h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: var(--black);
}

.hero-text p {
    font-size: 1rem;
    line-height: 1.75;
    color: #1a1a1a;
    max-width: 480px;
    margin-bottom: 1.5rem;
}

.hero-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.hero-social a {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    border-bottom: 2px solid var(--black);
    padding-bottom: 1px;
}

.hero-social a:hover {
    opacity: 0.6;
}

.hero-photo {
    background: var(--blue);
    flex: 0 0 36%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--black);
    overflow: hidden;
    background: #d0e8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
    color: #555;
    font-size: 0.75rem;
    text-align: center;
}

.photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Content wrapper ── */

.content {
    background: var(--white);
}

/* ── Section ── */

.section {
    padding: 2.5rem 3rem;
    border-bottom: 2px solid var(--border);
}

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

.section-heading {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--black);
}

/* ── Articles & Videos (entry list) ── */

.entry-list {
    list-style: disc;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.entry-list li {
    padding-left: 0.25rem;
}

.entry-list a {
    font-size: 0.975rem;
    font-weight: 500;
    color: var(--text);
}

.entry-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.1rem;
}

.entry-placeholder {
    color: #aaa;
    font-size: 0.9rem;
    font-style: italic;
    list-style: none;
    margin-left: -1.25rem;
}

/* ── Work ── */

.work-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.work-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 2rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.work-item:first-child { padding-top: 0; }
.work-item:last-child { border-bottom: none; padding-bottom: 0; }

.work-role {
    font-weight: 700;
    font-size: 0.95rem;
}

.work-company {
    color: var(--muted);
    font-size: 0.875rem;
}

.work-company a {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border);
}

.work-company a:hover {
    text-decoration-color: var(--text);
    opacity: 1;
}

.work-period {
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ── Projects ── */

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    margin-right: 0.5rem;
}

.project-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 1;
}

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    background: #111;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.04em;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.badge:hover { opacity: 0.75; }

.badge.freelance {
    background: var(--green);
    color: var(--black);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.65;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.tech-tag {
    font-size: 0.7rem;
    color: var(--muted);
    background: #f5f5f0;
    border: 1px solid var(--border);
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
}

/* ── Skills ── */

.skills-table {
    width: 100%;
    border-collapse: collapse;
}

.skills-table tr {
    border-bottom: 1px solid var(--border);
}

.skills-table tr:last-child { border-bottom: none; }

.skills-table td {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    vertical-align: top;
}

.skills-table td:first-child {
    width: 9rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding-right: 1rem;
}

/* ── Footer ── */

footer {
    background: var(--black);
    color: #888;
    font-size: 0.8rem;
    padding: 1.25rem 2rem;
    border-top: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

footer a {
    color: #aaa;
    text-decoration: none;
}

footer a:hover {
    color: var(--white);
    opacity: 1;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    body {
        padding: 0;
        overflow-x: hidden;
    }

    .page-wrapper {
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
    }

    /* Nav: stack brand on top, links below */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        padding: 1rem 1.25rem;
    }

    .nav-name {
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

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

    /* Hero: stack green/blue vertically */
    .hero {
        flex-direction: column;
        min-height: auto;
    }

    .hero-text {
        flex: none;
        padding: 2rem 1.25rem;
        border-right: none;
        border-bottom: 3px solid var(--black);
    }

    .hero-text h1 { font-size: 1.4rem; }

    .hero-photo {
        flex: none;
        min-height: 220px;
    }

    .photo-circle {
        width: 130px;
        height: 130px;
    }

    /* Sections */
    .section { padding: 1.75rem 1.25rem; }

    .section-heading { font-size: 1.1rem; }

    /* Work */
    .work-item {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .work-period {
        text-align: left;
        order: 3;
    }

    /* Skills table */
    .skills-table td:first-child {
        width: 7rem;
        font-size: 0.75rem;
    }

    /* Footer */
    footer {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}
