:root {
    --bg-color: #ffffff;
    --text-main: #161514;
    --text-muted: #6f6962;
    --border-color: rgba(22, 21, 20, 0.12);
    --accent-color: #c85f4a;
    --accent-soft: rgba(200, 95, 74, 0.18);
    --tool-blue: #6f93a5;
    --tool-green: #7d9468;
    --tool-yellow: #d3a646;
    --surface-color: #ffffff;
    --transition-speed: 0.3s;
    --font-primary: 'Aster', 'Playfair Display', Georgia, serif;
    --font-sans: 'Söhne', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body,
html {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    overflow-wrap: break-word;
    font-family: var(--font-primary);
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-main);
    transition: color var(--transition-speed) ease;
}

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

.back-arrow {
    font-size: 1.1rem;
    transition: transform var(--transition-speed) ease;
}

.logo:hover .back-arrow {
    transform: translateX(-4px);
}

.header-favicon {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

.workbench-main {
    flex: 1;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.workbench-intro,
.center-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 860px;
}

.workbench-title {
    font-family: var(--font-sans);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.letter-w {
    color: #ed9b68;
}

.letter-o {
    color: var(--text-main);
}

.letter-r {
    color: #1e88e5;
}

.letter-k {
    color: #eac14f;
}

.letter-b {
    color: #4fc3f7;
}

.letter-e {
    color: #87c786;
}

.letter-n {
    color: #3a3e74;
}

.letter-c {
    color: #ed9c38;
}

.letter-h {
    color: #a8cede;
}

.letter-w,
.letter-o,
.letter-r,
.letter-k,
.letter-b,
.letter-e,
.letter-n,
.letter-c,
.letter-h {
    text-shadow: 0 0 18px rgba(237, 156, 56, 0.26), 0 0 36px rgba(237, 156, 56, 0.14);
}

.workbench-note,
.workbench-subtitle {
    color: var(--text-muted);
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
}

.workbench-archive-note {
    margin-top: 1rem;
    font-family: var(--font-primary);
    color: var(--text-muted);
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    line-height: 1.5;
}

.workbench-archive-note .inline-link {
    font: inherit;
    color: inherit;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color var(--transition-speed) ease;
}

.workbench-archive-note .inline-link:hover {
    color: var(--text-main);
}

.workbench-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.workbench-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.72);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition:
        border-color var(--transition-speed) ease,
        color var(--transition-speed) ease,
        transform var(--transition-speed) ease;
}

.workbench-link:hover {
    border-color: rgba(200, 95, 74, 0.55);
    color: var(--text-main);
    transform: translateY(-2px);
}

.workbench-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.workbench-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.82);
    transition:
        border-color var(--transition-speed) ease,
        transform var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease;
}

.workbench-card:hover {
    border-color: rgba(200, 95, 74, 0.45);
    box-shadow: 0 14px 32px rgba(22, 21, 20, 0.08);
}

.workbench-card:hover {
    transform: translateY(-4px);
}

.workbench-toggle {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.workbench-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.workbench-cover {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.workbench-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.9rem;
}

.workbench-card-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.workbench-card-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.3;
}

.workbench-card-desc {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.35;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0.2rem 0.45rem;
    background: var(--accent-soft);
    color: #7d3d32;
    font-family: var(--font-sans);
    font-size: 0.78rem;
}

.tag:nth-child(3n + 2) {
    background: rgba(111, 147, 165, 0.18);
    color: #405f6d;
}

.tag:nth-child(3n) {
    background: rgba(125, 148, 104, 0.18);
    color: #526541;
}

.workbench-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    padding: 2rem;
}

.workbench-modal.is-open {
    display: grid;
    place-items: center;
}

.workbench-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 21, 20, 0.36);
}

.workbench-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
    gap: 1.75rem;
    width: min(1280px, 100%);
    max-height: min(860px, calc(100vh - 3rem));
    overflow: auto;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 24px 60px rgba(22, 21, 20, 0.22);
}

.modal-close {
    appearance: none;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1.4rem;
    line-height: 1;
}

.modal-close:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.modal-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding-right: 1rem;
}

.modal-meta {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.modal-title {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.05;
}

.modal-description {
    color: var(--text-main);
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    line-height: 1.4;
}

.modal-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: start;
    gap: 0.9rem;
}

.modal-photos img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-container {
        padding: 1.5rem;
    }

    .header {
        padding-bottom: 1.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .workbench-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .workbench-modal {
        padding: 1rem;
    }

    .workbench-modal-panel {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 2rem);
        padding: 1rem;
    }

    .modal-copy {
        padding-right: 2.4rem;
    }

    .modal-photos {
        grid-template-columns: 1fr;
    }
}
