.distillery-resume-page {
    --resume-border: rgba(185, 154, 104, 0.28);
    width: 100%;
    padding: clamp(0.75rem, 2.5vw, 2.25rem);
    color: var(--text);
}

.distillery-resume-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.distillery-resume-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.26fr);
    gap: clamp(1.25rem, 4vw, 3.5rem);
    min-height: 285px;
    padding: clamp(1.4rem, 4vw, 3.25rem);
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(185, 154, 104, 0.36);
    border-radius: clamp(1rem, 2vw, 1.75rem);
    background:
        radial-gradient(circle at 88% 10%, rgba(212, 175, 55, 0.18), transparent 34%),
        linear-gradient(135deg, var(--surface), var(--bg-darker));
    box-shadow: var(--shadow-lg);
}

.distillery-resume-hero::after {
    content: "";
    position: absolute;
    right: -7rem;
    bottom: -10rem;
    width: 23rem;
    height: 23rem;
    border: 1px solid rgba(185, 154, 104, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 2.6rem rgba(185, 154, 104, 0.035), 0 0 0 5.2rem rgba(185, 154, 104, 0.02);
    pointer-events: none;
}

.distillery-resume-hero-copy,
.distillery-resume-hero-mark {
    position: relative;
    z-index: 1;
}

.distillery-resume-eyebrow,
.distillery-resume-side-eyebrow {
    margin: 0 0 0.45rem;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.distillery-resume-hero h1 {
    max-width: 800px;
    margin: 0;
    color: var(--text);
    font-size: clamp(2.15rem, 6vw, 4.6rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.035em;
}

.distillery-resume-lead {
    max-width: 680px;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.7vw, 1.13rem);
    line-height: 1.6;
}

.distillery-resume-meta {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.78rem;
}

.distillery-resume-meta svg {
    width: 1rem;
    height: 1rem;
    color: var(--gold);
}

.distillery-resume-meta time,
.distillery-resume-meta span:last-child {
    color: var(--text);
    font-weight: 600;
}

.distillery-resume-hero-actions {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.35rem;
    flex-wrap: wrap;
}

.distillery-resume-hero-actions .btn {
    display: inline-flex;
    min-height: 46px;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.distillery-resume-hero-actions svg {
    width: 1.1rem;
    height: 1.1rem;
}

.distillery-resume-hero-mark {
    display: grid;
    width: min(190px, 100%);
    aspect-ratio: 1;
    margin-left: auto;
    place-items: center;
    border: 1px solid rgba(185, 154, 104, 0.28);
    border-radius: 50%;
    color: var(--gold);
    background: rgba(185, 154, 104, 0.055);
    box-shadow: inset 0 0 42px rgba(185, 154, 104, 0.08);
}

.distillery-resume-hero-mark svg {
    width: 70%;
    height: 70%;
    stroke-width: 2.1;
}

.distillery-resume-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    grid-template-areas: "content sidebar";
    gap: clamp(1rem, 2.5vw, 1.7rem);
    margin-top: clamp(1.1rem, 2.5vw, 1.75rem);
    align-items: start;
}

.distillery-resume-sidebar {
    position: sticky;
    top: 88px;
    display: grid;
    grid-area: sidebar;
    gap: 1rem;
}

.distillery-resume-toc,
.distillery-resume-side-card,
.distillery-resume-article {
    border: 1px solid var(--resume-border);
    border-radius: 1.15rem;
    background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 86%, var(--bg-darker)));
    box-shadow: var(--shadow, 0 5px 18px rgba(0, 0, 0, 0.2));
}

.distillery-resume-toc {
    overflow: hidden;
}

.distillery-resume-toc[hidden] {
    display: none;
}

.distillery-resume-toc summary {
    display: flex;
    min-height: 48px;
    padding: 0.8rem 0.9rem;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.distillery-resume-toc summary::-webkit-details-marker {
    display: none;
}

.distillery-resume-toc summary::after {
    content: "+";
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 400;
}

.distillery-resume-toc[open] summary {
    border-bottom: 1px solid var(--resume-border);
}

.distillery-resume-toc[open] summary::after {
    content: "−";
}

.distillery-resume-toc ol {
    display: grid;
    gap: 0.1rem;
    max-height: min(52vh, 430px);
    margin: 0;
    padding: 0.55rem;
    overflow-y: auto;
    list-style: none;
}

.distillery-resume-toc a {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 0.55rem;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
    text-decoration: none;
}

.distillery-resume-toc a:hover,
.distillery-resume-toc a:focus-visible {
    color: var(--gold-strong);
    background: rgba(185, 154, 104, 0.1);
}

.distillery-resume-side-card {
    padding: 1rem;
}

.distillery-resume-side-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
}

.distillery-resume-side-links {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.distillery-resume-side-links a {
    display: flex;
    min-height: 44px;
    gap: 0.6rem;
    padding: 0.58rem 0.65rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
}

.distillery-resume-side-links a:hover,
.distillery-resume-side-links a:focus-visible {
    border-color: var(--resume-border);
    color: var(--gold-strong);
    background: rgba(185, 154, 104, 0.09);
}

.distillery-resume-side-links svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    color: var(--gold);
}

.distillery-resume-article {
    min-width: 0;
    grid-area: content;
    overflow: hidden;
}

.distillery-resume-content {
    max-width: none;
    padding: clamp(1.25rem, 3.7vw, 3.2rem);
    overflow: visible;
    color: var(--text);
    font-size: clamp(0.98rem, 1.3vw, 1.08rem);
    line-height: 1.78;
}

.distillery-resume-content > :first-child:not([hidden]) {
    margin-top: 0;
}

.distillery-resume-content > :last-child {
    margin-bottom: 0;
}

.distillery-resume-content h1,
.distillery-resume-content h2,
.distillery-resume-content h3 {
    color: var(--text);
    font-family: var(--font-heading);
    line-height: 1.2;
    text-wrap: balance;
}

.distillery-resume-content h1 {
    margin: 0 0 1.4rem;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.distillery-resume-content h2 {
    position: relative;
    margin: clamp(2.25rem, 5vw, 3.5rem) 0 1rem;
    padding: 1rem 0 0 1.15rem;
    border-top: 1px solid var(--resume-border);
    font-size: clamp(1.4rem, 3vw, 2rem);
    scroll-margin-top: 90px;
}

.distillery-resume-content h2::before {
    content: "";
    position: absolute;
    top: 1.45rem;
    left: 0;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(185, 154, 104, 0.1);
}

.distillery-resume-content h3 {
    margin: 1.8rem 0 0.7rem;
    color: var(--gold-strong);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    scroll-margin-top: 90px;
}

.distillery-resume-content p {
    max-width: 76ch;
    margin: 0 0 1.15rem;
}

.distillery-resume-content ul,
.distillery-resume-content ol {
    max-width: 74ch;
    margin: 0.75rem 0 1.35rem;
    padding-left: 1.35rem;
}

.distillery-resume-content li {
    margin-bottom: 0.38rem;
    padding-left: 0.25rem;
}

.distillery-resume-content li::marker {
    color: var(--gold);
}

.distillery-resume-content a {
    color: var(--gold-strong);
    text-decoration-color: color-mix(in srgb, var(--gold) 55%, transparent);
    text-underline-offset: 0.18em;
    overflow-wrap: anywhere;
}

.distillery-resume-content a:hover,
.distillery-resume-content a:focus-visible {
    color: var(--gold);
    text-decoration-thickness: 2px;
}

.distillery-resume-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--gold);
    border-radius: 0 0.75rem 0.75rem 0;
    color: var(--muted);
    background: rgba(185, 154, 104, 0.07);
}

.distillery-resume-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 0.9rem;
    box-shadow: var(--shadow);
}

.distillery-resume-table-scroll {
    width: 100%;
    margin: 1.25rem 0 1.75rem;
    overflow-x: auto;
    border: 1px solid var(--resume-border);
    border-radius: 0.85rem;
    -webkit-overflow-scrolling: touch;
}

.distillery-resume-table-scroll:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gold) 42%, transparent);
    outline-offset: 3px;
}

.distillery-resume-content .distillery-resume-table-scroll table {
    width: 100%;
    min-width: 700px;
    margin: 0;
    border: 0;
    background: transparent;
}

.distillery-resume-content th,
.distillery-resume-content td {
    padding: 0.75rem 0.8rem;
    border-width: 0 1px 1px 0;
    border-color: var(--resume-border);
}

.distillery-resume-content tr:last-child td {
    border-bottom: 0;
}

.distillery-resume-content th:last-child,
.distillery-resume-content td:last-child {
    border-right: 0;
}

.distillery-resume-empty {
    display: grid;
    min-height: 430px;
    padding: clamp(2rem, 6vw, 5rem);
    place-items: center;
    align-content: center;
    text-align: center;
}

.distillery-resume-empty svg {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.distillery-resume-empty h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.distillery-resume-empty p {
    max-width: 560px;
    margin: 0.75rem 0 0;
    color: var(--muted);
}

@media (max-width: 860px) {
    .distillery-resume-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .distillery-resume-hero-mark {
        display: none;
    }

    .distillery-resume-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "content";
    }

    .distillery-resume-sidebar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .distillery-resume-toc ol {
        max-height: 250px;
    }
}

@media (max-width: 600px) {
    .distillery-resume-page {
        padding: 0.7rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .distillery-resume-hero {
        padding: 1.2rem;
    }

    .distillery-resume-hero-actions,
    .distillery-resume-sidebar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .distillery-resume-hero-actions .btn {
        width: 100%;
    }

    .distillery-resume-content {
        padding: 1.1rem;
    }

    .distillery-resume-content h2 {
        margin-top: 2rem;
    }
}

@media print {
    .distillery-resume-page {
        padding: 0;
    }

    .distillery-resume-hero {
        min-height: 0;
        padding: 1rem 0;
        border: 0;
        box-shadow: none;
    }

    .distillery-resume-hero-actions,
    .distillery-resume-hero-mark,
    .distillery-resume-sidebar {
        display: none !important;
    }

    .distillery-resume-layout {
        display: block;
        margin: 0;
    }

    .distillery-resume-article {
        border: 0;
        box-shadow: none;
    }
}
