/* Tufte CSS - inspired by Edward Tufte's books and handouts */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    width: 87.5%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    padding-top: 4rem;
    padding-bottom: 4rem;
    font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    background-color: #fffff8;
    color: #111;
    counter-reset: sidenote-counter;
}

/* Typography */
h1 {
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

h1 a {
    text-decoration: none;
    color: inherit;
}

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

h2 {
    font-style: italic;
    font-weight: 400;
    margin-top: 2.1rem;
    margin-bottom: 1.4rem;
    font-size: 2.2rem;
    line-height: 1.2;
}

h2.section-title {
    font-style: normal;
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #666;
}

h3 {
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

p.subtitle {
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    display: block;
    line-height: 1.4;
}

p {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
    line-height: 1.8;
}

/* Lists */
ul, ol {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-left: 0;
    list-style-position: outside;
    margin-left: 1.5rem;
}

li {
    padding-left: 0;
    line-height: 1.8;
}

/* Links */
a {
    color: #111;
    text-decoration: none;
    background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(currentColor, currentColor);
    background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
    background-repeat: no-repeat, no-repeat, repeat-x;
    text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8;
    background-position: 0% 93%, 100% 93%, 0% 93%;
}

a:hover,
a:focus {
    background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#54494b, #54494b);
    background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
    background-repeat: no-repeat, no-repeat, repeat-x;
    background-position: 0% 93%, 100% 93%, 0% 93%;
}

/* Article and sections */
article {
    position: relative;
    padding: 0;
}

section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

/* Filter bar */
.filter-bar {
    margin-top: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 1.1rem;
    color: #666;
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.4rem 1rem;
    font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    font-size: 1rem;
    background-color: transparent;
    border: 1px solid #ccc;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.filter-btn:hover {
    border-color: #111;
    color: #111;
}

.filter-btn.active {
    background-color: #111;
    border-color: #111;
    color: #fffff8;
}

.projects-list {
    margin-top: 2rem;
}

/* Project items */
.project-item {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.project-item:first-child {
    margin-top: 0;
}

.project-emoji {
    font-size: 1.5rem;
    line-height: 1.8;
    flex-shrink: 0;
    text-decoration: none;
    background: none;
    text-shadow: none;
}

.project-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
    flex: 1;
}

.project-content strong {
    font-weight: 600;
    color: #111;
}

.project-content a {
    font-weight: inherit;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 1rem;
    color: #666;
}

footer a {
    color: #666;
}

footer a:hover {
    color: #111;
}

footer span {
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 760px) {
    body {
        width: 84%;
        padding-left: 8%;
        padding-right: 8%;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    p.subtitle {
        font-size: 1.4rem;
    }

    .filter-bar {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.95rem;
        padding: 0.35rem 0.85rem;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p.subtitle {
        font-size: 1.2rem;
    }

    .filter-label {
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .filter-btn {
        font-size: 0.9rem;
        padding: 0.3rem 0.75rem;
    }

    .project-content {
        font-size: 1.1rem;
    }

    .project-emoji {
        font-size: 1.3rem;
    }
}

/* Fallback font stack */
@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot");
    src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"),
         url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"),
         url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot");
    src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"),
         url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"),
         url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "et-book";
    src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot");
    src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"),
         url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"),
         url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}