:root {
    color-scheme: light;
    --bg: #f8f8f7;
    --surface: #ffffff;
    --text: #1f1f1d;
    --muted: #6d6d68;
    --line: #e8e8e4;
    --accent: #222222;
    --nav-width: 320px;
    --blue: #796cee;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #111111;
        --surface: #171717;
        --text: #f3f3f2;
        --muted: #aaaaa5;
        --line: #2b2b2b;
        --accent: #f4f4f2;
        --blue: #796cee;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Geist", sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
}

.layout {
    display: grid;
    grid-template-columns: var(--nav-width) 1fr;
    height: 100vh;
    width: 100%;
}

.sidebar {
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: relative;
}

.sidebar__inner {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.brand {
    font-family: "Sora", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--blue);
    font-style: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav a,
.mobile-menu a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav a:hover,
.mobile-menu a:hover {
    color: var(--blue);
}

.main-scroll {
    height: 100vh;
    overflow-y: auto;
    background: var(--bg);
}

.section {
    padding: 56px clamp(24px, 4vw, 72px);
    border-bottom: 1px solid var(--line);
}

.hero {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    position: relative;
    overflow: hidden;
    background: #dddddd;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("./assets/hero-background.jpg") center center / cover no-repeat;
    background-attachment: fixed;
    filter: brightness(0.3) blur(2px);
    transform: scale(1.03);
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: "Sora", sans-serif;
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 10px 0 18px;
    contain: layout style;
    text-align: left center;
}

.hero-word {
    font-family: inherit;
    display: inline-block;
    vertical-align: baseline;
    font-size-adjust: 0.5;
    transition: font-family 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    line-height: 1.08;
    will-change: font-family;
}

.hero-emote {
    width: fit-content;
}

.hero-emote__frame {
    width: clamp(6.5rem, 10vw, 8.5rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border: 0px solid var(--blue);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.hero-emote__glyph {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: translateY(0) scale(160%);
    transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-emote.is-transitioning .hero-emote__glyph {
    opacity: 0.55;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1.2rem;
}

.lead {
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.7;
}

.lead a, .lead :visited {
    color: var(--blue);
    font-style: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lead a:hover {
    color: var(--blue);
    text-decoration: underline;
}

h2 {
    margin: 0 0 14px;
    font-family: "Sora", sans-serif;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 14px;
    line-height: 1.7;
    color: var(--muted);
}

.resume-btn {
    display: inline-block;
    padding: 7px 17px;
    margin-bottom: 10px;
    color: #fff;
    border-radius: 1px;
    border: solid 1px var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.resume-btn:hover {
    border: solid 1px var(--blue);
}

.resume-btn a:hover {
    text-decoration: none;
}

.placeholder-grid.writings-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    margin-top: 16px;
}


.placeholder-grid.projects-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.placeholder-grid.about-grid {
    display: flex;
    flex-direction: row;
    gap: 14px;
    margin-top: 16px;
}

.about-hero h1 {
    margin: 0 0 12px;
    font-family: "Sora", sans-serif;
    font-size: clamp(2rem, 3.4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.about-profile {
    background: var(--surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: clamp(18px, 3vw, 36px);
    align-items: start;
}

.about-avatar-wrap {
    display: flex;
    justify-content: center;
}

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.about-copy p {
    max-width: 72ch;
}

.about-experience {
    background: var(--surface);
}

.experience-timeline {
    position: relative;
    display: grid;
    gap: 18px;
    margin-top: 16px;
    padding-left: 24px;
}

.experience-timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: 1px;
    background: var(--line);
}

.experience-item {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
}

.experience-item::before {
    content: "";
    position: absolute;
    top: 22px;
    left: -22px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 0 3px var(--surface);
}

.experience-period {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.experience-role {
    margin: 0 0 4px;
    font-family: "Sora", sans-serif;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.experience-company {
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 500;
}

.about-tech-heading {
    margin: 24px 0 10px;
    font-family: "Geist", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.placeholder-grid.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.tablets {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 5px 15px;
    color: var(--text);
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.tablets:hover {
    border-color: var(--blue);
}

.placeholder-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
    color: var(--text);
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.placeholder-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.placeholder-card.writings {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text);
}

.placeholder-card.project-link {
    display: block;
    text-decoration: none;
    color: var(--text);
}

.placeholder-card.writings .date {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
    text-align: right;
}

.placeholder-card:hover {
    border-color: var(--blue);
}

.contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: large;
}

.contact a {
    color: var(--text);
    transition: color 0.2s ease;
}

.contact a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.footer {
    border-bottom: 0;
}

.mobile-topbar,
.mobile-menu {
    display: none;
}

.menu-btn {
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 20px;
    background: var(--text);
}

@media (max-width: 1024px) {
    body {
        height: auto;
        overflow: auto;
    }

    .layout {
        display: block;
        height: auto;
    }

    .sidebar {
        display: block;
        position: sticky;
        top: 0;
        z-index: 20;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar__inner {
        position: static;
        height: auto;
        padding: 14px 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .nav {
        flex-direction: row;
        gap: 20px;
    }

    .main-scroll {
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-topbar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        justify-content: space-between;
        align-items: center;
        padding: 14px 18px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .mobile-menu {
        display: grid;
        gap: 2px;
        position: fixed;
        top: 66px;
        left: 12px;
        right: 12px;
        z-index: 32;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    }

    .mobile-menu a {
        padding: 14px 16px;
        border-top: 1px solid var(--line);
        color: var(--text);
        background: var(--surface);
    }

    .mobile-menu a:first-child {
        border-top: 0;
        border-radius: 12px 12px 0 0;
    }

    .mobile-menu a:last-child {
        border-radius: 0 0 12px 12px;
    }

    .mobile-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .main-scroll {
        padding-top: 68px;
    }

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

    .placeholder-grid.projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .about-avatar-wrap {
        justify-content: flex-start;
    }

    .experience-timeline {
        padding-left: 18px;
    }

    .experience-item::before {
        left: -16px;
    }
}
