/* ============================================
   CREAM PAPER — homepage
   Locked 2026-05-31. See memory: project_cream_paper_typography.
   ============================================ */

:root {
    /* Backgrounds */
    --paper:        #f3ece0;
    --paper-card:   #f9f3e6;
    --paper-sunk:   #ece4d4;

    /* Ink */
    --ink:          #1d1a16;
    --ink-muted:    #6b6359;
    --ink-faint:    #8e857a;

    /* Lines */
    --rule:         #d6cdb9;
    --rule-strong:  #b8ad96;

    /* Accent — warm gold */
    --accent:       #b18639;
    --accent-soft:  rgba(177, 134, 57, 0.22);

    /* Tag pills — cyan, matches projects/project.css */
    --tag-bg:       rgba(0, 180, 216, 0.14);
    --tag-ink:      #006a85;

    /* Particle layer */
    --particle:     rgba(29, 26, 22, 0.45);

    /* Fonts */
    --font-serif:   'EB Garamond', Georgia, 'Times New Roman', serif;
    --font-sans:    'Inter Tight', system-ui, -apple-system, sans-serif;

    /* Type scale */
    --text-eyebrow: 12px;
    --text-small:   14px;
    --text-body:    17px;
    --text-h-card:  22px;
    --text-h-sec:   13px;
    --text-title:   72px;

    /* Layout */
    --col-max:      1200px;
    --gutter:       32px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    font-family: var(--font-serif);
    font-size: var(--text-body);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--ink); }
::-moz-selection { background: var(--accent-soft); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 5px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* Particles layer sits behind content */
#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: var(--col-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 1;
}

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

#header {
    position: relative;
    z-index: 1;
    background: transparent;
    padding-top: 56px;
}

.header-content-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    padding: 32px 0 24px;
}

.header-info { flex: 1; min-width: 0; }

.header-info h1 {
    font-family: var(--font-sans);
    font-size: var(--text-title);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 18px;
}

.header-info h1 .accent {
    background-image: linear-gradient(transparent 64%, var(--accent-soft) 64%, var(--accent-soft) 92%, transparent 92%);
    padding: 0 2px;
}

.header-info .subtitle {
    font-family: var(--font-serif);
    font-size: 22px;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 24px;
    max-width: 600px;
}

.contact-links {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--ink-muted);
    font-size: 19px;
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.contact-links a:last-child {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: var(--paper-card);
    color: var(--ink);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.contact-links a:last-child:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--paper-card);
}

.header-image-compact {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--paper-sunk);
}

.header-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 52%;
    transform: scale(1.35);
    transform-origin: center 50%;
    display: block;
}

/* ============================================
   SECTION TITLES (paper-style eyebrow)
   ============================================ */

.section-title {
    font-family: var(--font-sans);
    font-size: var(--text-h-sec);
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
}

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

#about {
    padding: 64px 0 32px;
    position: relative;
    z-index: 1;
}

.about-points {
    list-style: none;
    padding-left: 0;
}

.about-points li {
    position: relative;
    padding-left: 26px;
    margin: 14px 0;
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
}

.about-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.85;
}

/* ============================================
   PORTFOLIO
   ============================================ */

#portfolio {
    padding: 56px 0 40px;
    position: relative;
    z-index: 1;
}

.work-grid-2col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

@media (max-width: 1100px) {
    .work-grid-2col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .work-grid-2col { grid-template-columns: 1fr; }
}

.work {
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.work:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(29, 26, 22, 0.10);
    border-color: var(--rule-strong);
}

.work img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--rule);
    background: var(--paper-sunk);
}

.work-content {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-content h3 {
    font-family: var(--font-sans);
    font-size: var(--text-h-card);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 10px;
}

.work-content .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.work-content .chip {
    font-family: var(--font-sans);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--paper-sunk);
    color: var(--ink-muted);
    line-height: 1.5;
    white-space: nowrap;
}

.work-content p {
    font-family: var(--font-serif);
    font-size: 17.5px;
    line-height: 1.55;
    color: var(--ink-muted);
}

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

.copyright {
    text-align: center;
    padding: 32px 0 24px;
    color: var(--ink-faint);
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.04em;
    margin-top: 24px;
    border-top: 1px solid var(--rule);
}

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

@media (max-width: 1024px) {
    :root { --text-title: 60px; }
    .container { padding: 0 24px; }
}

@media (max-width: 768px) {
    :root { --text-title: 48px; }

    #header { padding-top: 32px; }
    .header-content-compact {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 28px;
        padding: 16px 0 24px;
    }
    .header-info { width: 100%; }
    .header-info .subtitle { font-size: 19px; }
    .header-image-compact { flex: 0 0 auto; width: 220px; height: 220px; }
    .header-image-compact img { object-position: center 28%; }
    .contact-links { gap: 18px; }

    #about { padding: 48px 0 24px; }
    #portfolio { padding: 40px 0 32px; }
    .work img { height: 200px; }
    .work-content { padding: 20px; }
    .about-points li { font-size: 16px; }
}

@media (max-width: 480px) {
    :root { --text-title: 40px; }
    .header-info .subtitle { font-size: 17px; }
    .work img { height: 180px; }
}

/* ============================================
   PAGE TRANSITION OVERLAY
   ============================================ */

.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
