body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f0f0;
}

.home-page {
    box-sizing: border-box;
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 32px 16px;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

.home-intro {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 36px;
    align-items: center;
}

.home-intro .page-label {
    margin-top: 0;
}

.home-intro div {
    container-type: inline-size;
}

.home-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 9.2cqi, 4.8rem);
    line-height: 0.98;
}

.home-lead {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.55;
    color: #555;
}

.home-role {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.portrait {
    width: 168px;
    height: 168px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    display: block;
    box-sizing: border-box;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.latest-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    align-items: center;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.latest-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    display: block;
}

.latest-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.latest-card .week-label {
    margin-bottom: 6px;
}

.latest-card p:not(.week-label) {
    margin: 0 0 12px;
    color: #555;
}

section {
    margin-bottom: 48px;
}
h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}
h2 {
    font-size: 24px;
    margin-bottom: 16px;
}
p {
    font-size: 16px;
    margin-bottom: 16px;
}

.documentation {
    margin-top: 0;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.doc-card {
    display: block;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.doc-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.doc-card p {
    margin-bottom: 0;
    color: #555;
}

footer {
    box-sizing: border-box;
    max-width: 1120px;
    margin: 64px auto 0;
    padding: 24px 28px 32px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}


/* ========================================
   Weekly Log
   ======================================== */

   .weekly-page {
    box-sizing: border-box;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 32px 80px;
}


/* Page introduction */

.weekly-header {
    margin: 50px 0 70px;
}

.page-label {
    margin-bottom: 12px;

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;

    color: #777;
}

.weekly-header h1 {
    margin: 0 0 20px;

    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
}

.weekly-intro {
    max-width: 650px;
    margin: 0;

    font-size: 1.15rem;
    line-height: 1.7;

    color: #555;
}


/* Week cards */

.week-list {
    display: flex;
    flex-direction: column;
}

.week-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 30px;

    padding: 35px 0;

    border-top: 1px solid #ddd;

    color: inherit;
    text-decoration: none;

    transition: transform 0.2s ease;
}

.week-card:last-child {
    border-bottom: 1px solid #ddd;
}

.week-card:hover {
    transform: translateX(5px);
}


/* Large week number */

.week-number {
    font-size: 2.7rem;
    font-weight: 300;
    color: #bbb;
}


/* Week content */

.week-label {
    margin: 0 0 8px;

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;

    color: #777;
}

.week-card h2 {
    margin: 0 0 12px;

    font-size: 1.7rem;
    line-height: 1.25;
}

.week-card p {
    max-width: 760px;
    margin: 0 0 14px;

    line-height: 1.65;

    color: #555;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 500;

    color: #333;
}


/* Mobile */

@media (max-width: 650px) {

    .week-card {
        grid-template-columns: 55px 1fr;
        gap: 16px;
    }

    .week-number {
        font-size: 1.8rem;
    }

    .week-card h2 {
        font-size: 1.4rem;
    }
}


/* ---------- Blog posts ---------- */

.blog-post {
    box-sizing: border-box;
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 32px 80px;
}

.post-header {
    margin: 70px 0 60px;
}

.post-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #777;
    margin-bottom: 8px;
}

.post-header h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 1.05;
    margin: 0 0 24px;
}

.post-summary {
    max-width: 700px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
}

.post-date {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #888;
}


/* ---------- Sections ---------- */

.post-section {
    margin: 60px 0;
}

.post-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.post-section p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-section h3 {
    font-size: 1.35rem;
    margin: 36px 0 14px;
}

.post-section h4 {
    font-size: 1.12rem;
    margin: 28px 0 12px;
}

.post-section ul {
    margin: 0 0 20px;
    padding-left: 1.3rem;
}

.post-section li {
    margin-bottom: 14px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-section p code,
.post-section li code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    background: #e8e8e8;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.code-caption {
    margin: 22px 0 8px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
}

.post-section pre {
    margin: 0 0 18px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow-x: auto;
}

.post-section pre code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.84rem;
    line-height: 1.55;
    background: none;
    padding: 0;
}

.post-section pre.console {
    background: #f6f6f6;
}

.table-wrap {
    overflow-x: auto;
    margin: 8px 0 4px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.98rem;
}

.compare-table th,
.compare-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
    text-align: right;
    white-space: nowrap;
}

.compare-table th {
    font-weight: 600;
    border-bottom: 2px solid #ccc;
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}


/* ---------- Images ---------- */

.post-figure {
    margin: 50px 0;
}

.post-figure.narrow {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Portrait photos shot sideways. Layout box is swapped, then rotated. */
.post-figure.turn-ccw {
    --photo-w: 1280;
    --photo-h: 1707;
    container-type: inline-size;
}

.post-figure.turn-ccw img {
    width: calc(100cqi * var(--photo-w) / var(--photo-h));
    max-width: none;
    height: 100cqi;
    margin-inline: auto;
    margin-block: calc(100cqi * (var(--photo-w) / var(--photo-h) - 1) / 2);
    transform: rotate(-90deg);
}



.post-figure img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.post-figure video {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.post-figure model-viewer {
    width: 100%;
    height: 480px;
    display: block;
    border-radius: 8px;
    background: #fff;
}

figcaption {
    margin-top: 10px;
    color: #777;
    font-size: 0.9rem;
    line-height: 1.5;
}


/* Two images next to each other */

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.image-grid figure {
    margin: 0;
}

.image-grid img {
    width: 100%;
    display: block;
    border-radius: 8px;
}


/* ---------- Next steps ---------- */

.next-steps {
    padding: 30px;
    background: #f6f6f6;
    border-radius: 10px;
}

.next-steps li {
    margin-bottom: 10px;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-list a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-size: 0.9rem;
    text-decoration: none;
}

.file-list a:hover {
    border-color: #333;
}


/* ---------- Previous / next ---------- */

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 80px 0 40px;
    padding-top: 24px;
    border-top: 1px solid #ddd;
}

.post-navigation a {
    text-decoration: none;
    color: inherit;
}

.post-navigation a:hover {
    text-decoration: underline;
}


/* ---------- Header ---------- */

.site-header {
    box-sizing: border-box;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

.site-header nav {
    display: flex;
    gap: 24px;
}

.site-header nav a {
    text-decoration: none;
    color: #555;
}

.site-header nav a:hover,
.site-header nav a.active {
    color: #000;
}

.site-header nav a.active {
    font-weight: 600;
}


/* ---------- Mobile ---------- */

@media (max-width: 650px) {

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

    .post-figure model-viewer {
        height: 360px;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .site-header nav {
        gap: 14px;
        flex-wrap: wrap;
    }

    .home-intro {
        display: block;
        text-align: center;
    }

    .home-intro .portrait {
        margin: 0 auto 22px;
    }

    .home-intro h1 {
        font-size: 1.7rem;
    }

    .latest-card {
        grid-template-columns: 1fr;
    }

    .latest-card img {
        height: 200px;
    }
}