/* ─────────────────────────────────────────
   ishaanaggarwal.com — style.css
   Single stylesheet for entire site.
   Design: minimal, system fonts, no fluff.
───────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #fafafa;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

/* ── Layout ── */
.wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 56px 40px 80px;
}

/* ── Site header ── */
.site-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 52px;
}

.site-name a {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    letter-spacing: -0.2px;
}

.site-name a:hover { color: #111; }

/* ── Nav ── */
nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-weight: 500;
}

nav a:hover { color: #c0392b; }
nav a.active { color: #111; }

/* ── Typography ── */
h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    color: #111;
}

h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin: 36px 0 10px;
    /* override old gradient styles */
    background: none;
    -webkit-text-fill-color: #111;
    -webkit-background-clip: unset;
    background-clip: unset;
    letter-spacing: normal;
    text-transform: none;
}

h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
    margin: 24px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

p {
    color: #333;
    margin: 0 0 16px;
}

/* ── Section label (small caps above sections) ── */
.label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #bbb;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ── Divider ── */
hr {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 36px 0;
}

/* ── Links ── */
a {
    color: #111;
    text-decoration: none;
}

a:hover { color: #c0392b; }

/* ── Link list (projects, writing, etc.) ── */
.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 0;
}

.link-list a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #111;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1px;
}

.link-list a:hover {
    color: #c0392b;
    border-color: #c0392b;
}

.meta {
    color: #bbb;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* ── Back link (subpages) ── */
.back {
    display: inline-block;
    font-size: 0.82rem;
    color: #bbb;
    text-decoration: none;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.back:hover { color: #c0392b; }

/* ── Page title block (subpages) ── */
.page-title {
    margin-bottom: 32px;
}

.page-title h1 { margin-bottom: 4px; }

.page-title .subtitle {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Inline images (project / article pages) ── */
figure {
    margin: 28px 0;
}

figure img {
    width: 100%;
    display: block;
    border-radius: 3px;
}

figcaption {
    font-size: 0.78rem;
    color: #999;
    margin-top: 6px;
}

/* ── Image grid ── */
.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 28px 0;
}

.img-grid figure {
    margin: 0;
}

/* ── Reading list ── */
.reading-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reading-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.92rem;
    color: #333;
}

.reading-list li:last-child { border-bottom: none; }

/* ── Body text (essays) ── */
.prose p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    max-width: 65ch;
}

/* ── PDF viewer page ── */
.pdf-wrap {
    margin-top: 24px;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pdf-btn {
    background: #111;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.pdf-btn:hover { background: #c0392b; }

.page-count {
    font-size: 0.82rem;
    color: #888;
}

.pdf-canvas-wrap {
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    overflow: auto;
    background: white;
    display: flex;
    justify-content: center;
    padding: 16px;
}

#pdf-render { max-width: 100%; }

.pdf-download {
    margin-top: 12px;
    font-size: 0.82rem;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .wrap { padding: 32px 20px 60px; }
    .site-head { margin-bottom: 36px; }
    h1 { font-size: 1.4rem; }
    .img-grid { grid-template-columns: 1fr; }
}
