:root {
    --black: #080808;
    --white: #e8e5df;
    --gray: #858079;
    --dark-gray: #44413d;
    --orange: #e06a35;
    --border: #242424;
    --mono: "DM Mono", monospace;
    --sans: "Inter", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

/* NAVBAR */

.navbar {
    width: 88%;
    min-height: 76px;
    position: sticky;
    top: 16px;
    z-index: 50;
    margin: 16px auto 0;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(232, 229, 223, 0.13);
    border-radius: 10px;
    background: rgba(8, 8, 8, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.logo {
    color: var(--orange);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 1px;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.navbar nav a {
    color: var(--gray);
    font-family: var(--mono);
    font-size: 11px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.navbar nav a:hover {
    color: var(--orange);
    text-shadow: 0 0 18px rgba(255, 100, 21, 0.55);
}

/* SHARED TEXT */

.small-title {
    color: var(--orange);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* HERO */

.hero {
    width: 88%;
    margin: 0 auto;
    padding: 100px 0 50px;
    min-height: auto;
    text-align: left;
}

.hero h1 {
    margin: 20px 0;
    font-size: clamp(48px, 6vw, 96px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.055em;
    text-align: left;
}

.hero h1 span {
    display: inline;
    color: #d7c5b9;
    margin-left: 0;
}

.hero-text {
    max-width: 450px;
    margin: 22px 0 28px;
    color: var(--gray);
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--orange);
    color: var(--orange);
    font-family: var(--mono);
    font-size: 11px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.button:hover {
    background: var(--orange);
    color: var(--black);
}

/* SECTIONS */

.section {
    width: 88%;
    margin: 0 auto;
    padding: 65px 0;
    position: relative;
}

.section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--orange) 0 28px, #42362f 28px 45px, var(--border) 45px 100%);
}

.section::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 38px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--orange);
    border-radius: 50%;
    background: var(--black);
    box-shadow: 0 0 14px rgba(255, 100, 21, 0.55);
}

#archive {
    padding-top: 55px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.section-header h2 {
    margin-top: 12px;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.05em;
    font-weight: 700;
}

.section-header>p {
    max-width: 300px;
    padding-bottom: 5px;
    color: var(--gray);
    font-size: 14px;
}

.section-intro {
    max-width: 390px;
    margin-top: 14px;
    color: var(--gray);
    font-size: 12px;
    line-height: 1.7;
}

/* SEARCH AND FILTERS */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 22px;
}

#searchInput {
    width: 260px;
    max-width: 100%;
    height: 42px;
    padding: 0 12px;
    outline: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--white);
    font-family: var(--mono);
    font-size: 12px;
    transition: border-color 0.2s ease;
}

#searchInput::placeholder {
    color: var(--dark-gray);
}

#searchInput:focus {
    border-color: var(--orange);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.filter {
    min-height: 34px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray);
    font-family: var(--mono);
    font-size: 10px;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.filter:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.filter.active {
    border-color: var(--orange);
    color: var(--orange);
}

/* FILE ARCHIVE */

.file-list {
    border-top: 1px solid var(--border);
}

.file-card {
    min-height: 100px;
    padding: 20px 0;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid var(--border);
}

.file-number {
    color: var(--dark-gray);
    font-family: var(--mono);
    font-size: 11px;
}

.file-name {
    color: var(--white);
    font-family: var(--mono);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.file-description {
    margin-top: 5px;
    color: var(--gray);
    font-size: 13px;
}

.file-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 9px;
}

.file-tags span {
    color: var(--dark-gray);
    font-family: var(--mono);
    font-size: 9px;
}

.download-button {
    min-width: 120px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--orange);
    font-family: var(--mono);
    font-size: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.download-button:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--black);
}

.empty {
    padding: 45px 0;
    color: var(--gray);
    font-family: var(--mono);
    font-size: 11px;
}

/* WRITINGS */

#writings {
    border-top: 0;
}

.writing-list {
    border-top: 1px solid var(--border);
}

.writing-card {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.writing-title {
    font-size: 18px;
    font-weight: 500;
}

.writing-description {
    margin-top: 7px;
    color: var(--gray);
    font-size: 14px;
}

.writing-meta {
    margin-top: 10px;
    color: var(--dark-gray);
    font-family: var(--mono);
    font-size: 9px;
}

/* ABOUT */

.about {
    border-top: 0;
    padding-top: 75px;
    padding-bottom: 85px;
}

.about h2 {
    margin-top: 22px;
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.about h2 span {
    color: var(--orange);
}

.about-text {
    max-width: 480px;
    margin-top: 24px;
    color: var(--gray);
    font-size: 15px;
    line-height: 1.9;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
}

.tags span {
    padding: 7px 10px;
    border: 1px solid var(--border);
    color: var(--gray);
    font-family: var(--mono);
    font-size: 9px;
}

/* CONTACT */

.contact {
    padding-top: 0;
}

.contact-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr);
    gap: 48px;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #15110e, #0d0d0d 55%);
}

.contact-box h2 {
    margin-top: 14px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.contact-box p:not(.small-title) {
    max-width: 390px;
    margin-top: 17px;
    color: var(--gray);
    font-size: 13px;
    line-height: 1.8;
}

.contact-links {
    display: grid;
    align-content: center;
    gap: 9px;
}

.contact-link {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border: 1px solid #302d29;
    color: var(--white);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
    transform: translateX(4px);
    border-color: var(--orange);
    background: var(--orange);
    color: var(--black);
}

/* FOOTER */

footer {
    width: 88%;
    min-height: 75px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-family: var(--mono);
    font-size: 10px;
}

footer span:first-child {
    color: var(--orange);
    letter-spacing: 1px;
}

/* TABLET */

@media (max-width: 900px) {

    .navbar,
    .hero,
    .section,
    footer {
        width: 90%;
    }

    .hero {
        padding-top: 85px;
        padding-bottom: 40px;
    }

    #archive {
        padding-top: 45px;
    }

    .section-header {
        align-items: flex-start;
    }

    .section-header>p {
        max-width: 220px;
    }

    .file-card {
        gap: 16px;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    html {
        scroll-padding-top: 70px;
    }

    .navbar {
        min-height: 68px;
        align-items: center;
    }

    .navbar nav {
        gap: 12px;
    }

    .navbar nav a {
        font-size: 9px;
    }

    .logo {
        font-size: 12px;
    }

    .hero {
        padding: 75px 0 35px;
    }

    .hero h1 {
        font-size: clamp(43px, 10vw, 62px);
        letter-spacing: -0.06em;
    }

    .hero-text {
        max-width: 100%;
        font-size: 12px;
    }

    .section {
        padding: 45px 0;
    }

    #archive {
        padding-top: 35px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 25px;
    }

    .section-header h2 {
        font-size: 38px;
    }

    .section-header>p {
        max-width: 100%;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    #searchInput {
        width: 100%;
    }

    .filters {
        gap: 5px;
    }

    .filter {
        flex: 0 0 auto;
        padding: 0 9px;
        font-size: 8px;
    }

    .file-card {
        grid-template-columns: 25px minmax(0, 1fr);
        gap: 12px;
        padding: 18px 0;
    }

    .file-number {
        padding-top: 3px;
    }

    .download-button {
        grid-column: 2;
        justify-self: start;
        min-width: 115px;
    }

    .file-name {
        font-size: 12px;
    }

    .file-description {
        font-size: 11px;
    }

    .about h2 {
        font-size: 40px;
    }

    .contact {
        padding-top: 0;
    }

    .contact-box {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    footer {
        min-height: 65px;
        font-size: 8px;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {
    .navbar nav {
        gap: 8px;
    }

    .navbar nav a {
        font-size: 8px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .filters {
        gap: 4px;
    }

    .filter {
        padding: 0 7px;
    }
}

.view-note {
    margin-top: 20px;
    padding: 0;
    color: var(--white);
    background: transparent;
    border: 0;
    font: 500 12px "DM Mono", monospace;
    cursor: pointer;
}

.view-note:hover {
    color: var(--gray);
}

.note-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 8, 8, 0.88);
}

.note-modal-content {
    position: relative;
    width: min(680px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    padding: 48px;
    color: var(--white);
    background: #111;
    border: 1px solid var(--dark-gray);
}

.note-modal-content h2 {
    margin: 10px 0 28px;
    font-size: clamp(28px, 5vw, 46px);
}

.note-text p {
    color: var(--gray);
    line-height: 1.8;
}

.close-note {
    position: absolute;
    top: 18px;
    right: 20px;
    color: var(--white);
    background: transparent;
    border: 0;
    font-size: 30px;
    cursor: pointer;
}

/* ARCHIVE CARDS - a clear, scan-friendly home for projects and notes */
.file-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    border-top: 0;
}

.file-card {
    min-height: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #101010, #090909);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.file-card:hover {
    transform: translateY(-2px);
    border-color: #6b5548;
    background: linear-gradient(145deg, #151210, #0a0a0a);
}

.file-number {
    color: var(--orange);
    letter-spacing: 0.08em;
}

.file-name {
    margin-top: 34px;
    font-size: 16px;
}

.file-tags {
    margin-top: 14px;
}

.file-tags span {
    padding: 5px 7px;
    border: 1px solid #302d29;
    color: var(--gray);
    font-size: 9px;
}

.download-button {
    margin-top: auto;
}

.empty {
    grid-column: 1 / -1;
}

.writing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    border-top: 0;
}

.writing-card {
    min-height: 270px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: #0d0d0d;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.writing-card:hover {
    transform: translateY(-2px);
    border-color: #756a61;
}

.writing-title {
    margin-top: 34px;
}

.writing-card .writing-description {
    margin-top: 10px;
}

.view-note {
    margin-top: auto;
    padding: 12px 0 0;
    color: var(--orange);
}

.view-note:hover {
    color: var(--white);
}

@media (max-width: 900px) {
    .file-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .file-list,
    .writing-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .file-card,
    .writing-card {
        min-height: 235px;
        padding: 22px;
    }
}

@media (min-width: 901px) {
    .file-card:first-child {
        grid-column: span 2;
    }
}
