/* Hull interior — sharp metallic panels, no photo backgrounds */

:root {
    --hull-void: #050607;
    --hull-deck: #0b0d11;
    --text-primary: #d6dde6;
    --text-muted: #8a939e;
    --accent: #7ab8c9;
    --accent-bright: #a8d4e3;
    --accent-dim: #5a8f9f;
    --steel: #4a5563;
    --steel-edge: rgba(200, 210, 220, 0.18);
    --steel-edge-strong: rgba(220, 228, 235, 0.28);
    --panel: linear-gradient(175deg, rgba(24, 28, 34, 0.97) 0%, rgba(12, 14, 18, 0.99) 100%);
    --panel-border: rgba(95, 105, 118, 0.55);
    --inner-shine: rgba(255, 255, 255, 0.045);
    --card-bg: rgba(16, 19, 24, 0.94);
    --card-border: rgba(75, 85, 98, 0.55);
    --accent-soft: var(--accent-bright);
    --edge-glow: rgba(122, 184, 201, 0.35);
    --sw-amber: #c9a227;
    --sw-amber-dim: rgba(201, 162, 39, 0.35);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    background-color: var(--hull-void);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Top bar — full-width strip; content capped inside */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    border-bottom: 1px solid var(--steel-edge);
    background: rgba(5, 7, 10, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.55rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e8eef4;
    text-decoration: none;
    font-size: 0.95rem;
}

.site-brand:visited {
    color: #e8eef4;
}

.site-brand:hover {
    color: var(--accent-bright);
}

.site-brand-mascot {
    width: 30px;
    height: 30px;
    object-fit: contain;
    opacity: 0.92;
    filter: drop-shadow(0 0 8px rgba(122, 184, 201, 0.2));
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.site-nav a {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #c5cdd6;
    text-decoration: none;
    padding: 0.42rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 1px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-nav a:visited {
    color: #c5cdd6;
}

.site-nav a:hover {
    color: var(--accent-bright);
    border-color: var(--steel-edge);
    background: rgba(122, 184, 201, 0.06);
}

.site-nav a.is-current {
    color: var(--accent-bright);
    border-color: var(--steel-edge-strong);
    background: rgba(122, 184, 201, 0.09);
}

/* CSS-only “ship interior”: brushed plates, seams, restrained edge light */
.hull-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(168deg, #0e1116 0%, #060708 45%, #090b0f 100%);
}

.hull-backdrop__plates {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 56px,
            rgba(255, 255, 255, 0.028) 56px,
            rgba(255, 255, 255, 0.028) 57px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 100px,
            rgba(0, 0, 0, 0.2) 100px,
            rgba(0, 0, 0, 0.2) 101px
        ),
        linear-gradient(105deg, rgba(255, 255, 255, 0.02) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, 0.12) 100%);
}

.hull-backdrop__ribs {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(122, 184, 201, 0.06) 0%, transparent 12%, transparent 88%, rgba(122, 184, 201, 0.06) 100%),
        linear-gradient(180deg, rgba(122, 184, 201, 0.04) 0%, transparent 18%);
}

.hull-backdrop__stars {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 25% 80%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 55% 35%, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1px 1px at 78% 60%, rgba(255, 255, 255, 0.18), transparent),
        radial-gradient(1px 1px at 90% 15%, rgba(255, 255, 255, 0.25), transparent);
    background-size: 100% 100%;
}

.hull-backdrop__falcon {
    position: absolute;
    right: 1.25rem;
    bottom: 2.5rem;
    width: 42vw;
    max-width: 400px;
    opacity: 0.22;
    pointer-events: none;
    filter: drop-shadow(0 0 40px rgba(122, 184, 201, 0.12));
}

.hull-backdrop__falcon img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .hull-backdrop__falcon {
        width: 68vw;
        max-width: 260px;
        opacity: 0.16;
        right: 0.75rem;
        bottom: 1.25rem;
    }
}

.hull-backdrop__frame {
    position: absolute;
    top: 1rem;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    border: 1px solid rgba(122, 184, 201, 0.1);
    border-radius: 1px;
    box-shadow:
        inset 0 1px 0 var(--inner-shine),
        0 0 0 1px rgba(0, 0, 0, 0.45);
}

.hull-backdrop__vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.55);
}

/* Home / about — readable longform */
.about-home .about-page-title {
    margin-bottom: 0.35rem;
}

.about-tagline {
    text-align: center;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.about-content {
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    text-align: left;
}

.about-content p {
    text-align: left;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem 2.25rem;
    margin-bottom: 2rem;
}

.about-header-text {
    text-align: center;
    min-width: 0;
    flex: 1 1 14rem;
    max-width: 22rem;
}

.about-header-text .about-page-title {
    margin-bottom: 0.35rem;
}

.about-header-text .about-tagline {
    margin-bottom: 0;
}

/* HUD-style portrait frame (targeting reticle corners) */
.about-profile-hud {
    position: relative;
    flex-shrink: 0;
    padding: 7px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 18%, var(--sw-amber-dim), transparent 42%),
        radial-gradient(circle at 72% 78%, rgba(122, 184, 201, 0.14), transparent 45%),
        linear-gradient(155deg, rgba(28, 32, 40, 0.95), rgba(8, 10, 14, 0.98));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.65),
        0 0 32px rgba(122, 184, 201, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.about-profile-hud::before,
.about-profile-hud::after,
.about-profile-inner::before,
.about-profile-inner::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.9;
}

.about-profile-hud::before {
    top: 4px;
    left: 4px;
    border-top: 2px solid var(--accent-bright);
    border-left: 2px solid var(--accent-bright);
    border-radius: 1px 0 0 0;
}

.about-profile-hud::after {
    bottom: 4px;
    right: 4px;
    border-bottom: 2px solid var(--accent-bright);
    border-right: 2px solid var(--accent-bright);
    border-radius: 0 0 1px 0;
}

.about-profile-inner {
    position: relative;
    width: 136px;
    height: 136px;
    border-radius: 50%;
    overflow: hidden;
}

.about-profile-inner::before {
    top: 4px;
    right: 4px;
    border-top: 2px solid var(--sw-amber);
    border-right: 2px solid var(--sw-amber);
    border-radius: 0 1px 0 0;
}

.about-profile-inner::after {
    bottom: 4px;
    left: 4px;
    border-bottom: 2px solid var(--sw-amber);
    border-left: 2px solid var(--sw-amber);
    border-radius: 0 0 0 1px;
}

.about-profile-placeholder[hidden] {
    display: none !important;
}

.about-profile-hud:not(.is-missing) .about-profile-placeholder {
    display: none !important;
}

.about-profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
    background: var(--hull-deck);
}

.about-profile-hud.is-missing .about-profile-photo {
    display: none;
}

.about-profile-placeholder {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed var(--steel-edge);
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-muted);
    padding: 0.65rem;
    background: rgba(6, 14, 36, 0.6);
}

.about-profile-hud.is-missing .about-profile-placeholder {
    display: flex;
    flex-direction: column;
}

.about-profile-placeholder code {
    font-size: 0.68rem;
    color: var(--accent);
    word-break: break-all;
}

main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 1.5rem auto 2.5rem;
    padding: 2.5rem 2rem;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 2px;
    box-shadow:
        0 1px 0 var(--inner-shine) inset,
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 20px 50px rgba(0, 0, 0, 0.5);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent-bright);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: #e8eef4;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: none;
}

/* About page title must not inherit oversized default h1 */
h1.about-page-title {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    font-size: clamp(1.65rem, 3.8vw, 2.2rem);
    letter-spacing: 0.02em;
    color: #e8eef4;
}

h2 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    text-align: center;
}

h3 {
    font-size: 1.12rem;
}

p {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.site-intro {
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Centered one-line intros under page titles (not reading shelf) */
main > p:first-of-type:not(.reading-lead):not(.site-intro) {
    text-align: center;
    color: var(--text-muted);
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.card {
    display: block;
    text-align: center;
    padding: 1rem;
    border-radius: 1px;
    border: 1px solid var(--steel-edge);
    background: linear-gradient(180deg, rgba(28, 32, 40, 0.95) 0%, rgba(18, 21, 26, 0.98) 100%);
    color: var(--accent-bright);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 0 var(--inner-shine) inset;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--steel-edge-strong);
    background: linear-gradient(180deg, rgba(34, 38, 48, 0.98) 0%, rgba(22, 25, 32, 1) 100%);
}

/* Optional section panels (articles / longform) */
section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 1px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

section h2 {
    background: rgba(122, 184, 201, 0.12);
    color: var(--accent-bright);
    border-radius: 1px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--steel-edge);
    font-size: 1rem;
    text-align: left;
}

/* ——— Reading page (StoryGraph data) ——— */
.reading-page .reading-lead {
    text-align: center;
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.reading-page .reading-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1px;
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.reading-page .reading-panel h2 {
    margin-top: 0;
    text-align: left;
    font-size: 1.05rem;
    color: var(--accent-soft);
    border-bottom: 1px solid var(--steel-edge);
    padding-bottom: 0.65rem;
    margin-bottom: 1.25rem;
    text-shadow: none;
}

.reading-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.stat-chip {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    padding: 0.45rem 0.85rem;
    border-radius: 1px;
    background: rgba(122, 184, 201, 0.08);
    border: 1px solid var(--steel-edge);
    color: var(--text-muted);
}

.stat-chip strong {
    color: var(--accent-soft);
    font-weight: 600;
}

.reading-storygraph-side {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    padding: 0.5rem 0.35rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: none;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 1px solid var(--steel-edge);
    background: rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(8px);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.reading-storygraph-side:hover {
    color: var(--accent-bright);
    border-left-color: var(--steel-edge-strong);
}

@media (max-width: 640px) {
    .reading-storygraph-side {
        top: auto;
        bottom: 0.75rem;
        right: 0.5rem;
        transform: none;
        writing-mode: horizontal-tb;
        letter-spacing: 0.08em;
        padding: 0.35rem 0.65rem;
        border-left: none;
        border-top: 1px solid var(--steel-edge);
    }
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.book-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1px;
    padding: 1.1rem 1.15rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.book-card:hover {
    border-color: var(--steel-edge-strong);
    transform: translateY(-2px);
}

.book-card h3 {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    font-size: 1.05rem;
    text-align: left;
    margin-bottom: 0.35rem;
}

.book-card .book-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 0.5rem;
}

.book-card .book-detail {
    font-size: 0.82rem;
    color: rgba(200, 220, 255, 0.75);
    text-align: left;
    margin-bottom: 0;
    line-height: 1.5;
}

.book-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.book-pill {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 1px;
    background: rgba(122, 184, 201, 0.08);
    color: var(--accent);
    border: 1px solid var(--steel-edge);
}

.book-pill.owned {
    border-color: rgba(255, 214, 120, 0.5);
    color: #ffe08a;
}

.reading-footer-nav {
    margin-top: 3rem;
    text-align: center;
}

.reading-error {
    color: #ffb4b4;
    text-align: center;
    padding: 1rem;
}

/* Project search */
.project-search {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--steel-edge);
    border-radius: 1px;
    background: rgba(14, 17, 22, 0.95);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
}

.project-search::placeholder {
    color: rgba(200, 220, 255, 0.45);
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 0 var(--inner-shine) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--steel-edge-strong);
}

.card-image {
    display: none;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.15rem;
    color: var(--accent-bright);
    margin-bottom: 0.5rem;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.02em;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.card-preview {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
    text-align: left;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background: rgba(122, 184, 201, 0.08);
    border: 1px solid var(--steel-edge);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 1px;
    font-size: 0.8rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tag:hover {
    background: rgba(122, 184, 201, 0.12);
    border-color: var(--steel-edge-strong);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(180deg, rgba(26, 30, 38, 0.98) 0%, rgba(14, 16, 20, 0.99) 100%);
    padding: 2.5rem;
    border-radius: 2px;
    border: 1px solid var(--steel-edge-strong);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--accent-bright);
    transform: rotate(90deg);
}

#modalDetails h2 {
    color: #e8eef4;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: left;
    letter-spacing: 0.02em;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    text-align: left;
}

.modal-description {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: left;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section p {
    text-align: left;
}

.modal-meta-date {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-section h3 {
    color: var(--accent-bright);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    text-align: left;
    letter-spacing: 0.02em;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.modal-tags .tag {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.detail-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: inline-block;
}

.detail-link:hover {
    color: var(--accent-bright);
    border-bottom-color: var(--steel-edge-strong);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(80, 90, 100, 0.2);
    border-radius: 2px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(122, 184, 201, 0.35);
    border-radius: 2px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(122, 184, 201, 0.5);
}

@media (max-width: 768px) {
    main {
        margin: 1.25rem 0.75rem 2rem;
        padding: 1.75rem 1.25rem;
    }

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

    .modal-content {
        padding: 2rem;
        max-height: 90vh;
    }

    .modal-close {
        font-size: 1.5rem;
    }

    #modalDetails h2 {
        font-size: 1.35rem;
    }
}

/* Resume page */
.resume-page main {
    max-width: 52rem;
    text-align: left;
}

.resume-doc {
    text-align: left;
}

.resume-page h1 {
    text-align: left;
    margin-bottom: 0.35rem;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    color: #e8eef4;
}

.resume-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--steel-edge);
}

.resume-name {
    margin-bottom: 0.35rem;
}

.resume-contact {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

.resume-contact a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.resume-contact a:hover {
    color: var(--accent-bright);
    border-bottom-color: rgba(168, 212, 227, 0.45);
}

.resume-section h2 {
    text-align: left;
    font-size: 1.12rem;
    margin: 1.85rem 0 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--steel-edge);
    color: var(--accent-bright);
}

.resume-section:first-of-type h2 {
    margin-top: 0;
}

.resume-item {
    margin-bottom: 1.4rem;
}

.resume-item-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.35rem 1.25rem;
    margin-bottom: 0.45rem;
}

.resume-item-title {
    font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin: 0;
    flex: 1 1 14rem;
    line-height: 1.35;
}

.resume-item-title a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 184, 201, 0.35);
}

.resume-item-title a:hover {
    color: var(--accent-bright);
    border-bottom-color: rgba(168, 212, 227, 0.55);
}

.resume-bullets a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 184, 201, 0.35);
}

.resume-bullets a:hover {
    color: var(--accent-bright);
    border-bottom-color: rgba(168, 212, 227, 0.55);
}

.resume-bullets strong a {
    color: var(--accent);
    font-weight: 600;
}

.resume-bullets strong a:hover {
    color: var(--accent-bright);
}

.resume-item-date {
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.resume-degree {
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.resume-detail {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.65;
}

.resume-skills p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
    line-height: 1.65;
}

.resume-skills p:last-child {
    margin-bottom: 0;
}

.resume-bullets {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.resume-bullets li {
    margin-bottom: 0.45rem;
}

.resume-bullets li:last-child {
    margin-bottom: 0;
}

.resume-bullets strong {
    color: var(--accent-bright);
    font-weight: 600;
}

@media (max-width: 600px) {
    .resume-item-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Writing index & essays */
.writing-index-page .writing-intro {
    margin-bottom: 1.5rem;
}

.writing-preview-status {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.writing-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 48rem;
    margin: 0 auto;
    text-align: left;
}

.writing-post {
    padding: 1.35rem 1.5rem;
    background: rgba(16, 19, 24, 0.6);
    border: 1px solid var(--steel-edge);
    border-radius: 2px;
    box-shadow: 0 1px 0 var(--inner-shine) inset;
}

.writing-post-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.writing-post-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex: 1 1 12rem;
    line-height: 1.3;
    text-align: left;
}

.writing-post-title a {
    color: var(--accent-bright);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.writing-post-title a:hover {
    color: #e8eef4;
    border-bottom-color: rgba(168, 212, 227, 0.45);
}

.writing-post-date {
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.writing-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.writing-post-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--steel-edge);
    border-radius: 999px;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    color: var(--accent);
    background: rgba(122, 184, 201, 0.08);
}

.writing-post-excerpt-wrap {
    margin-bottom: 0.85rem;
}

.writing-post-excerpt-wrap .writing-post-excerpt {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    line-height: 1.7;
}

.writing-post-excerpt-wrap .writing-post-excerpt:last-child {
    margin-bottom: 0;
}

.writing-post-read {
    margin-bottom: 0;
}

.writing-empty {
    text-align: center;
    color: var(--text-muted);
}

.writing-essay-page main {
    max-width: 40rem;
    text-align: left;
}

.writing-essay-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--steel-edge);
}

.writing-essay-back {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
}

.writing-essay-back a {
    color: var(--accent);
    text-decoration: none;
}

.writing-essay-back a:hover {
    color: var(--accent-bright);
}

.writing-essay-page h1 {
    text-align: left;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
}

.writing-essay-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.writing-essay-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.writing-essay-body p {
    margin-bottom: 1.15rem;
    text-align: left;
}

.writing-essay-body cite {
    font-style: italic;
}
