/* ==========================================================================
   ZACH DAVIDSON — PERSONAL SITE

   Design Philosophy:
   - Minimal. Ideas-first.
   - Blake Robbins meets heliotrope aesthetic
   - Good design is as little design as possible
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    /* Colors */
    --ink: #1a1a1a;
    --paper: #FFFFFF;
    --muted: #737373;
    --rule: #e5e5e5;
    --accent: #FF6300;
    --highlight: rgba(255, 99, 0, 0.1);
    --focus-ring: rgba(255, 99, 0, 0.4);

    /* Text hierarchy */
    --text-primary: var(--ink);
    --text-secondary: var(--muted);

    /* Spacing - 8px grid */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Typography */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;

    /* Measure */
    --measure: 42rem;

    /* Animation */
    --duration-fast: 150ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

::selection {
    background: var(--accent);
    color: var(--paper);
}

html {
    font-size: 100%;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, system-ui, sans-serif;
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    max-width: var(--measure);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */

header {
    padding: var(--space-lg) var(--space-md);
    max-width: var(--measure);
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.site-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--ink);
}

.site-title:hover {
    opacity: 0.8;
}

.logo-circle {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.site-name {
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
}

nav {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

nav a {
    font-size: var(--text-sm);
    color: var(--muted);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

nav a:hover {
    color: var(--ink);
}

nav a.active {
    color: var(--ink);
}

/* ==========================================================================
   PAGE HERO
   ========================================================================== */

.page-hero {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: var(--space-xl);
}

.page-emoji {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.page-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.page-description {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    max-width: 32rem;
}

/* ==========================================================================
   HOME PAGE
   ========================================================================== */

.home-intro {
    padding: var(--space-2xl) 0;
}

.home-greeting {
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
}

.home-bio {
    margin-bottom: var(--space-xl);
}

.home-bio p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.home-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.home-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--duration-fast) var(--ease-out);
}

.home-links a:hover {
    color: var(--accent);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--rule);
}

.nav-card {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border: 1px solid var(--rule);
    border-radius: 6px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}

.nav-card:hover {
    border-color: var(--accent);
    background: var(--highlight);
}

.nav-card-emoji {
    font-size: 1.25rem;
}

.nav-card-text {
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ==========================================================================
   CONTENT LISTS
   ========================================================================== */

.content-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.content-section {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--rule);
}

.content-section:last-child {
    border-bottom: none;
}

.section-label {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-md);
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.item-star {
    color: var(--accent);
    font-size: var(--text-sm);
    line-height: 1.7;
    flex-shrink: 0;
}

.item a {
    color: var(--ink);
    text-decoration: none;
    line-height: 1.6;
    transition: color var(--duration-fast) var(--ease-out);
}

.item a:hover {
    color: var(--accent);
}

.item-source {
    color: var(--muted);
    font-size: var(--text-sm);
}

/* Starred items */
.item.starred a {
    font-weight: 500;
}

/* ==========================================================================
   READING LIST
   ========================================================================== */

.reading-item {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: var(--ink);
    transition: background var(--duration-fast) var(--ease-out);
}

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

.reading-item:hover {
    background: var(--highlight);
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

.reading-item.starred {
    position: relative;
}

.reading-item.starred::before {
    content: "★";
    position: absolute;
    left: calc(-1 * var(--space-md));
    color: var(--accent);
    font-size: var(--text-sm);
}

.reading-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.reading-meta {
    font-size: var(--text-sm);
    color: var(--muted);
}

/* ==========================================================================
   NOTES / TRANSCRIPTS
   ========================================================================== */

.note-card {
    display: block;
    padding: var(--space-md);
    border: 1px solid var(--rule);
    border-radius: 6px;
    text-decoration: none;
    color: var(--ink);
    margin-bottom: var(--space-md);
    transition: border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}

.note-card:hover {
    border-color: var(--accent);
    background: var(--highlight);
}

.note-emoji {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.note-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.note-description {
    font-size: var(--text-sm);
    color: var(--muted);
    line-height: 1.6;
}

/* ==========================================================================
   PRINCIPLES
   ========================================================================== */

.principles-intro {
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.principle {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--rule);
}

.principle:last-child {
    border-bottom: none;
}

.principle-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.principle-description {
    color: var(--muted);
    line-height: 1.7;
}

.principle-quote {
    margin-top: var(--space-sm);
    padding-left: var(--space-md);
    border-left: 2px solid var(--accent);
    font-style: italic;
    color: var(--muted);
}

/* ==========================================================================
   RANDOM THOUGHTS
   ========================================================================== */

.thoughts-month {
    margin-bottom: var(--space-xl);
}

.month-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--muted);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--rule);
}

.thought {
    padding: var(--space-sm) 0;
    line-height: 1.7;
    border-bottom: 1px solid var(--rule);
}

.thought:last-child {
    border-bottom: none;
}

/* ==========================================================================
   DOSSIER / ABOUT
   ========================================================================== */

.dossier-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--rule);
}

.dossier-section:last-child {
    border-bottom: none;
}

.dossier-label {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-md);
}

.dossier-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.dossier-content p:last-child {
    margin-bottom: 0;
}

.dossier-list {
    list-style: none;
}

.dossier-list li {
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.dossier-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--muted);
}

/* ==========================================================================
   INDIVIDUAL NOTE PAGE
   ========================================================================== */

.note-page article {
    max-width: var(--measure);
}

.note-header {
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--rule);
    margin-bottom: var(--space-xl);
}

.note-header h1 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.note-meta {
    font-size: var(--text-sm);
    color: var(--muted);
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.note-page .note-description {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--muted);
}

.back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
    transition: color var(--duration-fast) var(--ease-out);
}

.back-link:hover {
    color: var(--accent);
}

.note-content {
    margin-bottom: var(--space-xl);
}

.note-content h2 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--rule);
}

.note-content h2:first-child {
    margin-top: 0;
}

.note-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.note-content blockquote {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    padding-left: var(--space-lg);
    border-left: 3px solid var(--accent);
    background: var(--highlight);
    font-style: italic;
    color: var(--text-primary);
}

.note-content ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.note-content li {
    margin-bottom: var(--space-xs);
    line-height: 1.7;
}

.note-content a {
    color: var(--accent);
    text-decoration: none;
}

.note-content a:hover {
    text-decoration: underline;
}

.note-footer {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--rule);
}

.note-footer h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: var(--space-md);
}

.note-footer ul {
    list-style: none;
}

.note-footer li {
    margin-bottom: var(--space-sm);
}

.note-footer a {
    color: var(--accent);
    text-decoration: none;
}

.note-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    padding: var(--space-lg) var(--space-md);
    max-width: var(--measure);
    margin: 0 auto;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    color: var(--muted);
}

footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

footer a:hover {
    color: var(--ink);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
    :root {
        --space-xl: 2rem;
        --space-2xl: 3rem;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: var(--space-sm);
    }

    .nav-grid {
        grid-template-columns: 1fr;
    }

    .reading-item.starred::before {
        position: static;
        margin-right: var(--space-xs);
    }

    footer {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}
