html {
    scroll-behavior: smooth;
}

h2[id] {
    scroll-margin-top: 1.5rem;
}

.phd-page {
    max-width: 920px;
}

.breadcrumb {
    color: var(--dim-color);
    font-size: 0.85rem;
    margin-bottom: 4rem;
}

.breadcrumb a {
    color: var(--dim-color);
    border-bottom-color: var(--dim-color);
}

.phd-header {
    border-bottom: 1px solid #252525;
    padding-bottom: 2.5rem;
    margin-bottom: 3.5rem;
}

.phd-content {
    display: grid;
    grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
}

.phd-content main {
    min-width: 0;
    grid-column: 2;
}

.phd-content main > section:first-child {
    margin-top: 0;
}

.contents {
    overflow: visible;
    position: sticky;
    top: 2rem;
    width: 11rem;
    z-index: 1;
}

@media (min-width: 1024px) {
    .contents {
        width: 16.5rem;
    }
}

@media (min-width: 761px) and (max-width: 984px) {
    .contents {
        margin-left: -0.75rem;
    }
}

@media (min-width: 985px) {
    .contents {
        margin-left: calc(1.25rem - (100vw - 920px) / 2);
    }
}

.contents nav {
    border-top: 1px solid #252525;
    padding-top: 0.75rem;
}

.contents-heading {
    color: #9a9a9a;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

.contents-list {
    counter-reset: contents;
    list-style: none;
    margin: 0;
    padding: 0;
}

.contents-list li {
    counter-increment: contents;
    margin: 0;
}

.contents-list a {
    border-bottom: 0;
    color: #a6a6a6;
    display: block;
    font-size: 0.74rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    padding: 0.22rem 0 0.22rem 1.75rem;
    position: relative;
}

.contents-list a::before {
    color: #686868;
    content: counter(contents, decimal-leading-zero);
    left: 0;
    position: absolute;
}

.contents-list a:hover,
.contents-list a:focus-visible {
    background: transparent;
    color: var(--accent-color);
}

.phd-header h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.15;
    max-width: 18ch;
    margin-top: 0.5rem;
}

.eyebrow,
.timeline-date,
dt {
    color: var(--dim-color);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    margin-bottom: 0;
}

.lede {
    color: #f3f3f3;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.7;
    max-width: 66ch;
    margin: 2rem 0 0;
}

section {
    margin: 4.5rem 0;
}

.status-panel,
.current-phase {
    background: var(--code-bg);
    border-left: 3px solid var(--accent-color);
    padding: 0.25rem 2rem 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2.5rem;
}

.status-grid dl,
.framework-list dl {
    min-width: 0;
    margin: 0;
}

dd {
    margin: 0.35rem 0 0;
}

.context-note {
    color: #b8b8b8;
    border-top: 1px solid #303030;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

blockquote {
    color: #f2f2f2;
    font-size: 1.12rem;
    line-height: 1.75;
    border-left: 3px solid var(--accent-color);
    margin: 2.5rem 0;
    padding: 0.4rem 0 0.4rem 1.5rem;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.concept-grid article {
    background: var(--code-bg);
    border: 1px solid #2b2b2b;
    padding: 0 1.25rem;
}

.concept-grid h3 {
    overflow-wrap: anywhere;
}

.concept-grid p {
    font-size: 0.92rem;
}

code {
    color: var(--accent-color);
    background: var(--code-bg);
    padding: 0.1em 0.35em;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0 0;
}

.timeline li {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 2rem;
    border-top: 1px solid #252525;
    padding: 2rem 0;
}

.timeline li:last-child {
    border-bottom: 1px solid #252525;
}

.timeline h3 {
    margin-top: 0;
}

.timeline p {
    margin-bottom: 0;
}

.framework-list {
    margin: 2rem 0;
}

.framework-list dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    border-top: 1px solid #252525;
    padding: 1.25rem 0;
}

.framework-list dl:last-child {
    border-bottom: 1px solid #252525;
}

.framework-list dt {
    color: var(--accent-color);
    font-weight: 600;
}

.framework-list dd {
    margin-top: 0;
}

.research-questions {
    counter-reset: question;
    list-style: none;
    padding: 0;
}

.research-questions li {
    counter-increment: question;
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    border-top: 1px solid #252525;
}

.research-questions li::before {
    content: "RQ" counter(question);
    color: var(--accent-color);
    font-weight: 600;
    position: absolute;
    left: 0;
}

.research-questions li:last-child {
    border-bottom: 1px solid #252525;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
}

.two-column > h2 {
    grid-column: 1 / -1;
    margin-bottom: -0.5rem;
}

.two-column article {
    background: var(--code-bg);
    padding: 0 1.5rem 0.5rem;
}

ul,
ol {
    padding-left: 1.3rem;
}

li {
    margin-bottom: 0.9rem;
}

.outputs {
    list-style: none;
    padding: 0;
}

.outputs li {
    border-top: 1px solid #252525;
    padding: 1.25rem 0;
}

.outputs li:last-child {
    border-bottom: 1px solid #252525;
}

.outputs li > span {
    color: var(--dim-color);
    display: inline-block;
    min-width: 5ch;
}

.contact p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-line {
    border-top: 1px solid var(--dim-color);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 1.25rem;
    margin-top: 6rem;
}

@media (max-width: 760px) {
    body {
        padding: 1.25rem;
    }

    .breadcrumb {
        margin-bottom: 2.5rem;
    }

    .phd-content {
        display: block;
    }

    .contents {
        margin-left: 0;
        position: static;
        margin-bottom: 3.5rem;
        width: auto;
    }

    .phd-content main {
        grid-column: auto;
    }

    .contents nav {
        border: 1px solid #252525;
        padding: 1rem 1.25rem;
    }

    .contents-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
    }

    .status-grid,
    .concept-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

    .timeline li,
    .framework-list dl {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .status-panel,
    .current-phase {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .footer-line {
        flex-direction: column;
        gap: 0.75rem;
    }
}
