/* Shared styles for index.html, about.html and career.html */

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

body {
    font-family: Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
    background: #faf7f2;
    color: #222;

    /* Keeps the ridges at the very bottom, even on short pages */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #222;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:active {
    color: #2d5a3d;
}

/* Menu bar */
.menu {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Name (About and Career pages only): spaced-out capitals */
.menu .name {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.menu ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    font-size: 0.9375rem;
}

/* Home page has no name, so the links sit on the right */
.menu ul:only-child {
    margin-left: auto;
}

.menu ul a {
    color: #6b6560;
    text-decoration: none;
}

.menu ul a:hover {
    color: #2d5a3d;
}

main {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.25rem 5rem;
}

section + section {
    margin-top: 4rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

p + p {
    margin-top: 1rem;
}

.muted {
    color: #6b6560;
}

.label {
    font-family: system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a847c;
    margin-bottom: 1rem;
}

/* "Things I make" list on the home page */
.projects {
    list-style: none;
    border-top: 1px solid #e3ddd3;
}

.projects li {
    border-bottom: 1px solid #e3ddd3;
}

.projects a {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 1rem;
    padding: 0.9rem 0;
    text-decoration: none;
}

.projects .title {
    font-weight: bold;
}

.projects .desc {
    color: #6b6560;
}

.projects a:hover .title {
    color: #2d5a3d;
}

/* Contact block on the About page */
.contact {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e3ddd3;
}

/* Email icon: the address is stored reversed and in pieces, and only
   assembled on hover/focus/click (see email.js), so scrapers can't read it. */
.email-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #222;
}

.email-link:hover,
.email-link:focus-visible {
    color: #2d5a3d;
}

.email-tip {
    position: absolute;
    left: calc(100% + 0.6rem);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.9375rem;
    color: #6b6560;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.email-link:hover .email-tip,
.email-link:focus-visible .email-tip {
    opacity: 1;
}

.back-home {
    margin-top: 3rem;
    font-size: 1rem;
}

.back-home a {
    color: #6b6560;
    text-decoration: none;
}

.back-home a:hover {
    color: #2d5a3d;
}

/* Layered ridges at the bottom of every page: misty greens, lighter toward the back */
.ridges-wrap {
    margin-top: auto;
}

.ridges {
    display: block;
    width: 100%;
    height: 120px;
}

@media (max-width: 560px) {
    .projects a {
        grid-template-columns: 1fr;
        gap: 0;
    }

    h1 {
        font-size: 1.6rem;
    }
}
