:root {
    color-scheme: dark;
    --bg: #0b0b0c;
    --panel: #151517;
    --line: #303035;
    --text: #f4f4f5;
    --muted: #aaaab2;
    --silver: #c9c9d0;
    --max: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    margin: 0;
    background: radial-gradient(ellipse at 75% 0%, #242428 0, transparent 35%), var(--bg);
    color: var(--text);
    font: 16px/1.7 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0b0b0ced;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #29292d;
}

.nav {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand span {
    color: var(--muted);
}

nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    font-size: 16px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}

nav a:hover {
    color: #fff;
}

.hero {
    padding: 94px 0 80px;
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    align-items: center;
    gap: 60px;
    min-height: 540px;
}

.eyebrow, .kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--silver);
    font-weight: 700;
}

.eyebrow:before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: #888;
    margin: 0 12px 4px 0;
}

h1 {
    font-size: clamp(46px, 7vw, 80px);
    line-height: 1.02;
    letter-spacing: -.065em;
    margin: 20px 0 24px;
}

h1 span {
    color: #8e8e97;
}

.lead {
    max-width: 620px;
    font-size: 18px;
    color: #c4c4ca;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 17px;
    border: 1px solid #55555d;
    border-radius: 4px;
    font: 700 12px inherit;
    cursor: pointer;
}

.btn:hover {
    background: #262629;
}

.btn.primary {
    background: #ededf0;
    color: #111;
    border-color: #ededf0;
}

.portrait-frame {
    max-width: 310px;
    margin-left: auto;
    padding: 11px;
    border: 1px solid #45454b;
    border-radius: 7px;
    background: linear-gradient(145deg, #242428, #101012);
    box-shadow: 18px 18px 0 #19191c;
}

.portrait {
    display: block;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 3px;
    filter: grayscale(100%);
}

.caption {
    display: flex;
    justify-content: space-between;
    padding: 10px 2px 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section {
    padding: 70px 0;
    border-top: 1px solid #252529;
}

.head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section h2 {
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.15;
    letter-spacing: -.045em;
    margin: 8px 0 0;
}

.intro {
    max-width: 510px;
    color: var(--muted);
    margin: 0;
}

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about p {
    margin-top: 0;
    color: #c6c6cc;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat,
.project {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: linear-gradient(145deg, #171719, #101012);
}

.stat {
    padding: 17px;
}

.stat strong {
    display: block;
    font-size: 14px;
}

.stat span {
    font-size: 12px;
    color: var(--muted);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.chip,
.tags span {
    border: 1px solid #39393f;
    border-radius: 4px;
    padding: 6px 10px;
    color: #d4d4d9;
    background: #141416;
    font-size: 12px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.project {
    padding: 23px;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    transition: .2s;
}

.project:hover {
    border-color: #777780;
    transform: translateY(-2px);
}

.featured {
    grid-column: span 2;
    min-height: 255px;
    border-color: #686870;
    background: linear-gradient(125deg, #1c1c20, #101012)
}

.ptop {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.idx {
    font-size: 11px;
    color: #85858e;
    letter-spacing: .12em;
}

.status {
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid #494950;
    color: #c9c9d0;
    padding: 3px 7px;
    border-radius: 3px;
}

.project h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 9px;
}

.project p {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 17px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tags span {
    font-size: 10px;
    padding: 3px 7px;
}

.plink {
    display: inline-block;
    font-size: 12px;
    font-weight: 750;
    margin-top: 18px;
    color: #ededf0;
}

.plink:hover {
    color: #aaa;
}

.timeline {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.timeline time {
    color: var(--muted);
    font-size: 12px;
}

.timeline h3 {
    font-size: 16px;
    margin: 0 0 5px;
}

.timeline p {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
}

.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.info-card {
    padding: 24px;
    border: 1px solid #333;
    background: var(--panel)
}

.info-card h3 {
    margin: 0 0 7px;
    font-size: 1rem
}

.info-card p {
    margin: 0;
    color: #aaa;
    font-size: .85rem
}

.contact {
    border: 1px solid #414147;
    background: linear-gradient(135deg, #1c1c20, #101012);
    padding: clamp(24px, 5vw, 45px);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.contact h2 {
    margin: 8px 0;
}

.contact p {
    margin: 0;
    color: var(--muted);
}

footer {
    padding: 27px 0 38px;
    color: #777780;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.archive-link {
    text-decoration: underline;
}

@media(max-width:740px) {
    .nav {
        align-items: flex-start;
        padding: 16px 0;
        flex-direction: column;
        gap: 12px;
    }

    nav {
        gap: 16px;
    }

    nav a {
        font-size: 15px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 65px 0 50px;
        gap: 35px;
        min-height: 0;
    }

    .portrait-frame {
        margin: 0;
        max-width: 250px;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

    .featured{
        grid-column:auto
    }

    .section {
        padding: 55px 0;
    }

    .head {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .info-card {
        background: white;
        border-color: #ddd;
        break-inside: avoid
    }

}

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

    .topbar,
    .actions,
    .portrait-frame,
    .contact .actions,
    footer {
        display: none !important;
    }

    .hero {
        padding: 20px 0;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .section {
        padding: 16px 0;
        break-inside: avoid;
    }

    .project,
    .stat {
        background: #fff;
        border-color: #bbb;
        break-inside: avoid;
    }

    .project p,
    .about p,
    .timeline p,
    .intro {
        color: #333;
    }

    .info-card p {
        color: #444
    }

    .chip,
    .tags span {
        color: #222;
        border-color: #bbb;
    }

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