:root {
    --ink: #25313f;
    --muted: #64717f;
    --paper: #f1f5f8;
    --surface: #fbfcfd;
    --line: #d6e0e8;
    --heading: #26384d;
    --denim: #5d7891;
    --blue: #7489ad;
    --mist: #e2ebf2;
    --taupe: #8a7f77;
    --shadow: 0 18px 42px rgba(38, 56, 77, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-height: 72px;
    padding: 14px clamp(20px, 5vw, 72px);
    background: rgba(241, 245, 248, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    background: var(--heading);
    color: white;
    border-radius: 8px;
    font-size: 0.95rem;
}

.brand-name {
    white-space: nowrap;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nav-links a {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
    background: var(--mist);
}

.hero,
.section,
.page-hero {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.section[id] {
    scroll-margin-top: 112px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.78fr);
    align-items: center;
    gap: clamp(32px, 6vw, 82px);
    min-height: calc(100vh - 72px);
    padding: 56px 0 72px;
}

.hero-copy {
    max-width: 690px;
}

.eyebrow,
.section-kicker,
.card-label {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 22px;
    color: var(--heading);
    font-size: 3.7rem;
    line-height: 1.02;
}

h2 {
    margin-bottom: 18px;
    color: var(--heading);
    font-size: 2rem;
    line-height: 1.15;
}

h3 {
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.3;
}

.hero-text,
.page-hero p,
.about-copy,
.timeline-item p,
.info-card p,
.hobby-card p,
.hobby-feature p,
.place-list p {
    color: var(--muted);
}

.hero-text {
    max-width: 640px;
    margin-bottom: 28px;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-link,
.secondary-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.primary-link {
    padding: 10px 18px;
    background: var(--denim);
    color: white;
}

.secondary-link {
    padding: 9px 17px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--heading);
}

.text-link {
    width: fit-content;
    margin-top: 24px;
    color: var(--denim);
}

.portrait-wrap {
    width: min(100%, 410px);
    justify-self: center;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.portrait-wrap img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 6px;
}

.section {
    padding: 68px 0;
    border-top: 1px solid var(--line);
}

.about-grid,
.split {
    display: grid;
    grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 70px);
}

.about-copy p:last-child,
.timeline-item p:last-child,
.info-card p:last-child,
.hobby-card p:last-child,
.hobby-feature p:last-child,
.place-list p:last-child {
    margin-bottom: 0;
}

.skill-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0;
}

.skill-strip span {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    background: var(--surface);
    border-radius: 8px;
    color: var(--heading);
    font-weight: 700;
}

.section-heading {
    position: sticky;
    top: 100px;
    align-self: start;
}

.timeline,
.stack-list {
    display: grid;
    gap: 16px;
}

.timeline-item,
.info-card,
.hobby-card,
.hobby-feature,
.place-list article {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(38, 56, 77, 0.05);
}

.timeline-item {
    padding: 22px;
}

.timeline-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.timeline-topline span,
.organization,
.tools {
    color: var(--muted);
    font-size: 0.94rem;
}

.timeline-topline span {
    flex: 0 0 auto;
    font-weight: 800;
}

.organization,
.tools {
    margin-bottom: 12px;
}

.tools {
    color: var(--denim);
    font-weight: 700;
}

.info-card {
    padding: 22px;
}

.project-grid,
.hobby-grid,
.place-list {
    display: grid;
    gap: 16px;
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    min-height: 245px;
}

.hobby-preview {
    display: grid;
}

.hobby-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hobby-card {
    overflow: hidden;
}

.hobby-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hobby-card div {
    padding: 20px;
}

.travel-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.58fr);
    gap: 24px;
    align-items: start;
}

.travel-map {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.place-list {
    max-height: 760px;
    overflow: auto;
    padding-right: 4px;
}

.place-list article {
    padding: 18px;
    border-left: 5px solid var(--taupe);
}

.page-hero {
    padding: 72px 0 36px;
}

.page-hero h1 {
    max-width: 760px;
}

.page-hero p {
    max-width: 720px;
    font-size: 1.05rem;
}

.hobby-page-grid {
    display: grid;
    gap: 22px;
}

.hobby-feature {
    display: grid;
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
    overflow: hidden;
}

.hobby-feature img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.hobby-feature div {
    align-self: center;
    padding: clamp(24px, 5vw, 52px);
}

.timeline-hero {
    padding-bottom: 24px;
}

.timeline-page {
    display: grid;
    grid-template-columns: minmax(260px, 0.44fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 52px);
    align-items: start;
}

.timeline-form,
.timeline-post,
.timeline-empty {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(38, 56, 77, 0.05);
}

.timeline-form {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 18px;
    padding: 22px;
}

.form-row {
    display: grid;
    gap: 7px;
}

.form-row label {
    color: var(--heading);
    font-size: 0.9rem;
    font-weight: 800;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.form-row textarea {
    resize: vertical;
}

.timeline-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.timeline-form-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.timeline-form button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.timeline-posts {
    display: grid;
    gap: 16px;
}

.timeline-post {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
}

.timeline-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 8px;
    background: var(--mist);
    color: var(--heading);
    font-weight: 800;
}

.timeline-post-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.timeline-post-header h2 {
    margin-bottom: 4px;
    font-size: 1.12rem;
}

.timeline-post-header time,
.timeline-email {
    color: var(--muted);
    font-size: 0.92rem;
}

.timeline-email {
    margin-bottom: 12px;
    color: var(--denim);
    font-weight: 700;
}

.timeline-post p:last-child,
.timeline-empty p {
    margin-bottom: 0;
}

.timeline-empty {
    padding: 24px;
}

@media (max-width: 920px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 44px;
    }

    .portrait-wrap {
        justify-self: start;
    }

    .about-grid,
    .split,
    .travel-layout,
    .hobby-feature,
    .timeline-page {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .timeline-form {
        position: static;
    }

    .project-grid,
    .hobby-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 0;
    }

    .place-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        gap: 12px;
    }

    .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links a {
        flex: 0 0 auto;
    }

    .section[id] {
        scroll-margin-top: 152px;
    }

    .hero,
    .section,
    .page-hero {
        width: min(100% - 28px, 1120px);
    }

    h1 {
        font-size: 2.65rem;
    }

    h2 {
        font-size: 1.65rem;
    }

    .timeline-topline {
        display: grid;
        gap: 4px;
    }

    .timeline-topline span {
        justify-self: start;
    }
}
