:root {
    --bg: #FBF9F6;
    --ink: #1A1A1A;
    --sub: #6b6560;
    --primary: #13737A;
    --accent: #FBCA89;
    --accent-soft: #FDE1B8;
    --line: #E4E0DA;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-display);
}

a {
    color: inherit;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 32px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: var(--primary);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.16) 2px, transparent 2px),
        radial-gradient(var(--accent-soft) 1.6px, transparent 1.6px);
    background-size: 38px 38px, 38px 38px;
    background-position: 0 0, 19px 19px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, var(--primary) 38%, rgba(19, 115, 122, 0.4) 68%, rgba(19, 115, 122, 0) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    padding: 0 32px;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-cue span {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.4);
    animation: scrollpulse 1.8s ease-in-out infinite;
}

@keyframes scrollpulse {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-cue span {
        animation: none;
    }
}

@media (max-width:640px) {
    .hero {
        min-height: 100svh;
        align-items: flex-start;
        padding-top: 96px;
        padding-bottom: 56px;
    }

    .scroll-cue {
        display: none;
    }
}

.byline {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--accent-soft);
    margin-bottom: 20px;
}

.byline b {
    color: #ffffff;
    font-weight: 700;
}

h1 {
    font-weight: 700;
    font-size: clamp(44px, 6.5vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin: 0 0 28px;
    max-width: 720px;
    color: #ffffff;
}

h1 .accent {
    color: var(--accent);
    font-weight: 700;
}

.rotator {
    display: inline-block;
    transition: opacity .3s ease, transform .3s ease;
}

.rotator.fade-out {
    opacity: 0;
    transform: translateY(6px);
}

.hero p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 19px;
    line-height: 1.6;
    margin: 0 0 36px;
}

.hero-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-links a {
    font-family: var(--font-mono);
    font-size: 14px;
    text-decoration: none;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    padding: 11px 22px;
    border-radius: 100px;
    transition: background .18s, color .18s, border-color .18s;
}

.hero-links a:hover {
    background: #ffffff;
    color: var(--primary);
}

/* ---------- Section title ---------- */
.section-title {
    max-width: 1080px;
    margin: 10px auto 32px;
    padding: 0 32px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 32px;
}

.section-title h2 {
    font-weight: 600;
    font-size: 30px;
    margin: 0;
}

.section-title span {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--primary);
}

/* ---------- Index rows ---------- */
.list {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px 100px;
}

.load-state {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--sub);
}

.row {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    cursor: pointer;
    position: relative;
    padding-left: 18px;
    transition: padding-left .18s ease;
}

.row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transition: background .18s ease;
}

.row:hover,
.row.open {
    padding-left: 24px;
}

.row:hover::before,
.row.open::before {
    background: var(--primary);
}

.row:last-child {
    border-bottom: 1px solid var(--line);
}

.row-top {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

.row-num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--sub);
    min-width: 58px;
}

.row-num .year {
    color: var(--primary);
}

.row-title {
    font-size: 24px;
    font-weight: 700;
}

.row-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--sub);
    margin-left: 2px;
}

.row-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.row-status.concluded .dot {
    background: var(--line);
}

.row-status.concluded {
    color: var(--sub);
}

.row-toggle {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--sub);
    white-space: nowrap;
    margin-left: auto;
}

.row-desc {
    font-size: 15.5px;
    color: var(--sub);
    margin-top: 8px;
    padding-left: 76px;
}

.row-detail {
    max-height: 0;
    overflow: hidden;
    padding-left: 76px;
    transition: max-height .4s ease;
}

.row.open .row-detail {
    max-height: 760px;
}

.detail-inner {
    padding-top: 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

@media (max-width:700px) {
    .detail-inner {
        grid-template-columns: 1fr;
    }

    .row-desc,
    .row-detail {
        padding-left: 0;
    }
}

.thumb-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thumb {
    position: relative;
    height: 190px;
    border-radius: 8px;
    background: repeating-linear-gradient(45deg, var(--accent) 0 8px, #e9b46a 8px 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 11px;
    overflow: hidden;
}

.thumb.has-image {
    background: var(--line);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb.has-image img {
    filter: grayscale(1) contrast(1.05) brightness(1.02);
}

.thumb.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary);
    mix-blend-mode: color;
    opacity: .88;
    pointer-events: none;
}

.view-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-decoration: none;
    color: var(--ink);
    border: 1.5px solid var(--ink);
    padding: 9px 16px;
    border-radius: 100px;
    transition: background .18s, color .18s;
}

.view-project:hover {
    background: var(--ink);
    color: var(--bg);
}

.detail-grid {
    font-size: 13.5px;
    color: var(--ink);
}

.k {
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: .06em;
    margin: 0 0 4px;
}

.block {
    margin-bottom: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 3px;
}

.links a {
    font-family: var(--font-mono);
    font-size: 12.5px;
    text-decoration: none;
    margin-right: 16px;
    border-bottom: 1px solid var(--accent);
}

.links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

footer {
    text-align: center;
    padding: 30px 24px 70px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--sub);
}

/* focus visibility for keyboard users */
.row:focus-visible,
.hero-links a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .row,
    .row::before,
    .row-detail {
        transition: none;
    }
}