:root {
    --ink: #141715;
    --paper: #f6f7f3;
    --surface: #ffffff;
    --surface-soft: #eef3ef;
    --muted: #5f6963;
    --line: #d9dfda;
    --accent: #0f766e;
    --accent-soft: #dcefeb;
    --shadow: 0 22px 60px rgba(20, 23, 21, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

header.portfolio-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(246, 247, 243, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: none;
}

header.portfolio-header nav {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

header.portfolio-header nav .logo {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0;
}

header.portfolio-header nav .logo::before {
    content: "";
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--accent);
}

header.portfolio-header nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.portfolio-menu-toggle {
    display: none;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
}

.portfolio-menu-icon,
.portfolio-menu-icon::before,
.portfolio-menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.portfolio-menu-icon {
    position: relative;
}

.portfolio-menu-icon::before,
.portfolio-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.portfolio-menu-icon::before {
    top: -6px;
}

.portfolio-menu-icon::after {
    top: 6px;
}

header.portfolio-header nav ul li {
    margin: 0;
}

header.portfolio-header nav ul li a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

header.portfolio-header nav ul li a:hover {
    color: var(--ink);
    background: var(--surface-soft);
    text-decoration: none;
}

.folio-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 36px 0 88px;
}

.micro-label {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.stage-copy h1,
.stage-copy h2,
.section-title h2,
.section-heading-wide h2,
.credential-grid h2,
.book-copy h2 {
    margin: 0;
    color: #0b848b;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.02;
    text-wrap: balance;
}

.stage-copy h1,
.stage-copy h2 {
    max-width: 820px;
    font-size: 3.75rem;
}

.stage-lede {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.18rem;
}

.stage-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.stage-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.stage-highlights i {
    color: var(--accent);
}

.home-stage,
.details-stage,
.book-stage {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--surface) 0%, #fbfcfa 62%, var(--accent-soft) 100%);
    box-shadow: var(--shadow);
}

.home-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 34px;
    padding: 42px;
}

.home-stage::before,
.book-stage::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--accent);
}

.stage-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 820px;
}

.stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.folio-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    font-weight: 750;
    text-decoration: none;
}

.folio-button:hover {
    text-decoration: none;
}

.folio-button-primary {
    background: var(--ink);
    color: var(--surface);
}

.folio-button-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--surface);
}

.folio-button-secondary {
    background: transparent;
    color: var(--ink);
}

.folio-button-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.identity-panel {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    grid-template-rows: auto auto;
    gap: 14px;
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    width: 190px;
    height: 190px;
    justify-self: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-soft);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.identity-copy {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.identity-copy span,
.identity-copy strong {
    display: block;
}

.identity-copy span {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 750;
}

.identity-copy strong {
    margin-top: 5px;
    font-size: 1.35rem;
    line-height: 1.15;
}

.signal-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.signal-strip div {
    min-height: 154px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 36px rgba(20, 23, 21, 0.06);
}

.signal-strip span {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 800;
}

.signal-strip p {
    margin: 0;
    color: var(--muted);
}

.editorial-section {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
    gap: 34px;
    margin-top: 86px;
    padding: 32px 0 0;
    border-top: 1px solid var(--line);
}

.section-index {
    display: none;
}

.section-title h2,
.section-heading-wide h2 {
    font-size: 3rem;
}

.section-body {
    display: grid;
    gap: 18px;
    align-content: start;
}

.section-body p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.work-grid-section,
.timeline-section,
.theme-board {
    margin-top: 86px;
}

.section-heading-wide {
    max-width: 820px;
    margin-bottom: 28px;
}

.work-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
    grid-auto-rows: minmax(260px, auto);
    gap: 16px;
}

.work-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.work-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
}

.work-card-large {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: azure;
    color: var(--ink);
}

.work-card-large::before {
    height: 5px;
}

.work-card span {
    display: block;
    margin-bottom: 14px;
    color: var(--accent);
    font-weight: 800;
}

.work-card-large h3,
.work-card-large span {
    color: var(--ink);
}

.work-card-large p {
    color: var(--muted);
}

.icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.icon-row span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 8px 18px rgba(20, 23, 21, 0.08);
}

.role-company {
    margin: -6px 0 14px !important;
    color: var(--accent) !important;
    font-weight: 750;
}

.work-card h3 {
    margin: 0 0 14px;
    font-size: 1.85rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.work-card p {
    margin: 0;
    color: var(--muted);
}

.architecture-visual {
    display: block;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 14 / 9;
    object-fit: contain;
    margin: 0 auto 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.work-card-accent {
    background: var(--accent-soft);
}

.work-card-accent a {
    display: inline-flex;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
}

.details-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 365px;
    gap: 34px;
    padding: 42px;
}

.details-stage::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--accent);
}

.profile-stat-stack {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    align-content: center;
}

.profile-stat-stack div {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 36px rgba(20, 23, 21, 0.06);
}

.profile-stat-stack div:first-child {
    background: var(--accent-soft);
    color: var(--ink);
}

.profile-stat-stack span,
.profile-stat-stack strong {
    display: block;
}

.profile-stat-stack span {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-stat-stack div:first-child span {
    color: var(--accent);
}

.profile-stat-stack strong {
    margin-top: 7px;
    font-size: 1.38rem;
    line-height: 1.12;
}

.expertise-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.expertise-band article {
    min-height: 188px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 14px 36px rgba(20, 23, 21, 0.06);
}

.expertise-band article:nth-child(2) {
    background: var(--accent-soft);
    color: var(--ink);
}

.expertise-band span {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 1.18rem;
    font-weight: 800;
}

.expertise-band article:nth-child(2) span {
    color: var(--accent);
}

.expertise-band p {
    margin: 0;
    color: var(--muted);
}

.expertise-band article:nth-child(2) p {
    color: var(--muted);
}

.career-timeline {
    display: grid;
    gap: 18px;
}

.career-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
}

.career-date {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
}

.skills-section {
    margin-top: 86px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.skills-grid article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(20, 23, 21, 0.06);
}

.skills-grid i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}

.skills-grid span {
    color: var(--ink);
    font-weight: 700;
}

.career-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.career-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: var(--accent);
}

.career-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.career-card h3 {
    margin: 0 0 18px;
    font-size: 1.85rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.career-card ul,
.credential-grid ul {
    margin: 0;
    padding-left: 1.15rem;
}

.career-card li,
.credential-grid li {
    margin-bottom: 9px;
    color: var(--muted);
}

.skill-cloud {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

.credential-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px;
    margin-top: 86px;
}

.credential-grid article {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.credential-grid article:nth-child(2) {
    background: var(--accent-soft);
    color: var(--ink);
}

.credential-grid h2 {
    font-size: 2.2rem;
}

.credential-grid p,
.credential-grid article > span {
    color: var(--muted);
}

.credential-grid article:nth-child(2) li {
    color: var(--muted);
}

.book-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    padding: 42px;
    background: linear-gradient(135deg, var(--surface) 0%, #fbfcfa 58%, var(--accent-soft) 100%);
}

.book-stage .stage-copy h1 {
    color: var(--ink);
}

.book-stage .stage-lede {
    color: var(--muted);
}

.book-stage .micro-label {
    color: var(--accent);
}

.book-hero-cover {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.book-hero-cover img {
    display: block;
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.featured-book {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    margin-top: 16px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.book-display {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.book-display img {
    display: block;
    width: 100%;
    border-radius: 6px;
}

.book-copy h2 {
    font-size: 3.8rem;
}

.book-copy p {
    color: var(--muted);
}

.book-line {
    margin: 18px 0 !important;
    color: var(--ink) !important;
    font-size: 1.22rem;
    font-weight: 800;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.theme-grid article {
    min-height: 250px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.theme-grid article:nth-child(2) {
    background: var(--accent-soft);
    color: var(--ink);
}

.theme-grid span {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
}

.theme-grid h3 {
    margin: 0 0 12px;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.theme-grid p {
    margin: 0;
    color: var(--muted);
}

.theme-grid article:nth-child(2) p {
    color: var(--muted);
}

footer {
    margin-top: 0;
    padding: 34px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

footer p {
    margin: 6px 0;
}

footer a {
    color: #0d6efd;
    font-weight: 800;
}

.scroll-to-top {
    border-radius: 8px !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--surface) !important;
}

@media (max-width: 1060px) {
    .home-stage,
    .details-stage,
    .book-stage,
    .featured-book,
    .editorial-section,
    .credential-grid {
        grid-template-columns: 1fr;
    }

    .home-stage,
    .details-stage,
    .book-stage {
        min-height: auto;
    }

    .stage-copy h1 {
        font-size: 3rem;
    }

    .stage-copy h2 {
        font-size: 3rem;
    }

    .identity-panel {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
    }

    .portrait-frame {
        min-height: 0;
    }

    .profile-stat-stack,
    .expertise-band,
    .signal-strip,
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .work-card-large {
        grid-row: auto;
        grid-column: span 2;
    }

    .section-title h2,
    .section-heading-wide h2 {
        font-size: 2.6rem;
    }

    .book-hero-cover {
        width: min(290px, 100%);
    }
}

@media (max-width: 760px) {
    header.portfolio-header nav {
        width: min(100% - 24px, 1180px);
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 0;
    }

    .portfolio-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    header.portfolio-header nav ul.portfolio-menu {
        display: none;
        grid-template-columns: 1fr;
        width: 100%;
        order: 3;
        gap: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    header.portfolio-header nav ul.portfolio-menu.open {
        display: grid;
    }

    header.portfolio-header nav ul li a {
        width: 100%;
        justify-content: flex-start;
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .folio-page {
        width: min(100% - 24px, 1180px);
        padding: 22px 0 58px;
    }

    .home-stage,
    .details-stage,
    .book-stage,
    .featured-book {
        padding: 22px;
    }

    .stage-copy h1 {
        font-size: 2.15rem;
        line-height: 1.02;
    }

    .stage-copy h2 {
        font-size: 2.15rem;
        line-height: 1.02;
    }

    .stage-lede {
        font-size: 1.02rem;
    }

    .stage-actions,
    .folio-button {
        width: 100%;
    }

    .stage-highlights {
        display: grid;
        grid-template-columns: 1fr;
    }

    .identity-panel,
    .work-grid {
        grid-template-columns: 1fr;
    }

    .portrait-frame {
        width: 150px;
        height: 150px;
        min-height: 0;
    }

    .signal-strip div,
    .expertise-band article {
        min-height: auto;
        padding: 22px;
    }

    .editorial-section,
    .work-grid-section,
    .timeline-section,
    .theme-board,
    .credential-grid {
        margin-top: 58px;
    }

    .editorial-section {
        gap: 18px;
    }

    .section-title h2,
    .section-heading-wide h2 {
        font-size: 2rem;
    }

    .work-card-large {
        grid-column: auto;
    }

    .work-card,
    .career-card,
    .credential-grid article,
    .theme-grid article {
        padding: 22px;
    }

    .work-card h3,
    .career-card h3 {
        font-size: 1.5rem;
    }

    .career-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .career-date {
        position: static;
        width: fit-content;
        max-width: 100%;
    }

    .featured-book {
        gap: 24px;
    }

    .book-display {
        width: min(250px, 100%);
    }

    .book-copy h2 {
        font-size: 2.75rem;
    }

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

    .architecture-visual {
        max-width: 100%;
        margin-bottom: 18px;
    }
}

@media (max-width: 430px) {
    .stage-copy h1 {
        font-size: 1.92rem;
    }

    .stage-copy h2 {
        font-size: 1.92rem;
    }

    .section-title h2,
    .section-heading-wide h2 {
        font-size: 1.82rem;
    }

    .book-copy h2 {
        font-size: 2.3rem;
    }
}
