/* yongjoon.dev — Workshop Notebook
   Palette: Paper White #FAFAFA · Ink Dark #1A1A2E · Workshop Gray #4A4A5A
   Code Block #F0F0F5 · Accent Coral #E07A5F · Muted Stone #B0A8A0 · Highlight Cream #FFF5EB
   Type: Syne (display) / Karla (body) / Fira Code (mono) / Josefin Sans (labels)
*/

:root {
    --paper-white:    #FAFAFA;
    --ink-dark:       #1A1A2E;
    --workshop-gray:  #4A4A5A;
    --code-block:     #F0F0F5;
    --accent-coral:   #E07A5F;
    --binding-spine:  #E07A5F;
    --muted-stone:    #B0A8A0;
    --highlight-cream:#FFF5EB;

    --gutter: 60px;
    --spine-width: 3px;
    --grid-gap: 40px;

    --font-display: 'Syne', 'Inter', system-ui, sans-serif;
    --font-body:    'Karla', 'Inter', system-ui, sans-serif;
    --font-mono:    'Fira Code', 'Menlo', 'Consolas', monospace;
    --font-label:   'Josefin Sans', 'Inter', system-ui, sans-serif;
}

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

html, body {
    background: var(--paper-white);
    color: var(--workshop-gray);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
}

a {
    color: var(--accent-coral);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 220ms ease, color 220ms ease;
}

a:hover {
    border-bottom-color: var(--accent-coral);
}

/* === Workbook container with continuous binding spine === */
.workbook {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 0 0 var(--gutter);
}

.binding-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--spine-width);
    background: var(--binding-spine);
    z-index: 4;
    pointer-events: none;
}

/* === Masthead === */
.masthead {
    padding: 120px var(--gutter) 90px var(--gutter);
    border-bottom: 1px solid var(--code-block);
    position: relative;
}

.masthead-inner {
    max-width: 880px;
}

.eyebrow {
    font-family: var(--font-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--accent-coral);
    margin-bottom: 28px;
}

.developer-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(64px, 9vw, 128px);
    line-height: 0.95;
    color: var(--ink-dark);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.developer-tagline {
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.6;
    color: var(--workshop-gray);
    max-width: 640px;
    margin-bottom: 56px;
}

.meta-row {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    border-top: 1px solid var(--code-block);
    padding-top: 28px;
    max-width: 720px;
}

.meta-row li {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-key {
    font-family: var(--font-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: var(--accent-coral);
}

.meta-val {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink-dark);
}

/* === Tool Break Marquee === */
.tool-break {
    height: 60px;
    overflow: hidden;
    border-top: 1px solid var(--code-block);
    border-bottom: 1px solid var(--code-block);
    background: var(--paper-white);
    position: relative;
    display: flex;
    align-items: center;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

.marquee-line {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--muted-stone);
    padding-right: 48px;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* === Project Showcase 2x2 Grid === */
.project-showcase {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--grid-gap);
    min-height: 80vh;
    padding: var(--gutter);
    background: var(--paper-white);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.project-showcase.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1.5px 1.5px, rgba(26, 26, 46, 0.14) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.45;
    pointer-events: none;
}

.cell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell-title    { grid-column: 1; grid-row: 1; }
.cell-specimen { grid-column: 2; grid-row: 1; align-items: flex-end; }
.cell-tech     { grid-column: 1; grid-row: 2; }
.cell-link     { grid-column: 2; grid-row: 2; align-items: flex-start; }

.project-index {
    font-family: var(--font-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--accent-coral);
    margin-bottom: 14px;
}

.project-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 4.4vw, 56px);
    color: var(--ink-dark);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.project-blurb {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--workshop-gray);
    max-width: 460px;
    margin-bottom: 22px;
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted-stone);
    letter-spacing: 0.04em;
}

/* Specimen Frame */
.specimen-frame {
    width: 100%;
    max-width: 460px;
    background: var(--highlight-cream);
    border: 1px solid var(--code-block);
    padding: 18px;
    position: relative;
}

.specimen-frame::before {
    content: '';
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: -1px;
    width: 3px;
    background: var(--accent-coral);
}

.wireframe {
    display: block;
    width: 100%;
    height: auto;
}

.sketch-line {
    fill: none;
    stroke: var(--ink-dark);
    stroke-width: 1.5;
    stroke-opacity: 0.32;
    stroke-linecap: round;
    stroke-dasharray: 2 0.4;
}

.sketch-line.strong {
    stroke-opacity: 0.7;
    stroke-width: 1.8;
}

.sketch-text {
    font-family: var(--font-mono);
    font-size: 8px;
    fill: var(--ink-dark);
    fill-opacity: 0.6;
}

.annotation-line {
    stroke: var(--accent-coral);
    stroke-width: 1;
    stroke-opacity: 0.55;
    fill: none;
}

.anno-text {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 7px;
    fill: var(--accent-coral);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* Tech & Code Block */
.tech-label,
.outcome-label {
    font-family: var(--font-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--accent-coral);
    margin-bottom: 18px;
}

.code-block {
    background: var(--code-block);
    border-left: 3px solid var(--accent-coral);
    padding: 22px 26px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-dark);
    max-width: 460px;
    overflow-x: auto;
    white-space: pre;
}

.code-block code {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Outcome */
.outcome-body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--workshop-gray);
    max-width: 440px;
    margin-bottom: 28px;
}

.project-link {
    display: inline-block;
    font-family: var(--font-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
    color: var(--accent-coral);
    position: relative;
    padding-bottom: 4px;
    border-bottom: none;
}

.project-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent-coral);
    transition: width 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-link:hover::after {
    width: 100%;
}

/* === Colophon === */
.colophon {
    position: relative;
    padding: 100px var(--gutter) 120px var(--gutter);
    border-top: 1px solid var(--code-block);
    background: var(--paper-white);
}

.binding-knot {
    position: absolute;
    left: -7px;
    bottom: -1px;
    width: 17px;
    height: 17px;
    background: var(--accent-coral);
    border-radius: 50%;
    z-index: 5;
}

.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    max-width: 1080px;
}

.colophon-cell p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--workshop-gray);
}

.colophon-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colophon-list a {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink-dark);
    border-bottom: 1px solid var(--code-block);
    padding-bottom: 2px;
}

.colophon-list a:hover {
    border-bottom-color: var(--accent-coral);
    color: var(--accent-coral);
}

/* === Responsive === */
@media (max-width: 880px) {
    :root {
        --gutter: 32px;
        --grid-gap: 28px;
    }
    .masthead {
        padding: 80px var(--gutter) 60px var(--gutter);
    }
    .meta-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .project-showcase {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        min-height: auto;
        padding: 48px var(--gutter);
    }
    .cell-title    { grid-column: 1; grid-row: 1; }
    .cell-specimen { grid-column: 1; grid-row: 2; align-items: flex-start; }
    .cell-tech     { grid-column: 1; grid-row: 3; }
    .cell-link     { grid-column: 1; grid-row: 4; }
    .colophon-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .colophon {
        padding: 64px var(--gutter) 80px var(--gutter);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .project-showcase {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .annotation-line {
        stroke-dashoffset: 0 !important;
    }
}
