/* Martin H. Weissman — Homepage Stylesheet */

:root {
    --blue: #00458c;
    --text: #444;
    --heading: #333;
    --border: #ddd;
    --bg: #fff;
    --hover-bg: #00458c;
    --hover-text: #fff;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding: 1.5rem 1rem;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--heading);
    margin: 0;
}

h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--heading);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--heading);
    margin: 1.25rem 0 0.5rem;
}

p {
    margin: 0.5rem 0;
}

/* Links */
a {
    color: var(--blue);
    text-decoration: none;
    padding: 1px 2px;
}

a:hover {
    color: var(--hover-text);
    background: var(--hover-bg);
}

/* Header */
header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

header img {
    width: 140px;
    height: auto;
    flex-shrink: 0;
}

header .info {
    flex: 1;
}

header .info p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
}

header .info .subtitle {
    color: var(--heading);
    font-weight: bold;
}

/* Nav links row */
nav {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.9rem;
}

nav a {
    white-space: nowrap;
}

/* Sections */
section {
    padding: 0.5rem 0;
}

/* Book highlight */
.book {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 0.75rem 0;
}

.book img {
    width: 80px;
    height: auto;
    flex-shrink: 0;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25);
}

.book .book-info {
    flex: 1;
}

/* Raised symbol */
.raised {
    position: relative;
    top: -0.1em;
}

/* Project cards */
.project {
    margin: 0.75rem 0 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--border);
}

.project p {
    font-size: 0.95rem;
    margin: 0.25rem 0;
}

/* Articles accordion */
details {
    margin: 0.5rem 0;
}

details summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--heading);
    padding: 0.4rem 0;
    list-style: none;
}

details summary::before {
    content: "\25B8\00a0";
    font-size: 0.85rem;
}

details[open] summary::before {
    content: "\25BE\00a0";
}

details summary::-webkit-details-marker {
    display: none;
}

/* Article list */
ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 0.35rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

li + li {
    border-top: 1px solid #eee;
}

/* Separate styling for link lists without dividers */
.link-list li {
    border-top: none;
    padding: 0.2rem 0;
}

.link-list li::before {
    content: "\00b7\00a0";
    color: var(--blue);
}

/* Footer */
footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: #888;
}

footer a {
    color: #888;
}

footer a:hover {
    color: var(--hover-text);
    background: var(--hover-bg);
}

/* Mobile adjustments */
@media (max-width: 500px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    header img {
        width: 120px;
    }

    nav {
        justify-content: center;
    }

    .book {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project {
        padding-left: 0.75rem;
    }
}
