/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a4a46;
    --secondary-color: #424242;
    --text-light: #b4b2c5;
    --background-white: #f6f5f1;
    --background-light: #f6f5f1;
    --surface-white: #ffffff;
    --accent-blue: #665aff;
    --border-light: #e6e3e1;
    --font-display: Georgia, serif;
    --font-heading: Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.2s ease;
    --max-width: 1200px;
    --site-nav-height: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* Navigation */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 150;
    padding: 20px 0;
    background: var(--background-white);
    transition: padding 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.is-scrolled {
    padding-top: 8px;
    padding-bottom: 8px;
    box-shadow: 0 1px 0 var(--border-light);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
}

.nav-logo {
    margin-right: auto;
}

.nav-logo img {
    height: 40px;
    width: auto;
    transition: height 0.2s ease;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: 0;
    transition: var(--transition);
}

.site-nav.is-scrolled .nav-logo img {
    height: 28px;
}

.site-nav.is-scrolled .nav-link {
    font-size: 15px;
}

.site-nav.is-scrolled .nav-hamburger {
    width: 34px;
    height: 34px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue);
}

/* Hamburger menu (hidden on desktop) */
.nav-hamburger {
    display: none;
    background: var(--background-white);
    border: 1.5px solid var(--accent-blue);
    border-radius: 14px;
    padding: 4px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-hamburger:hover {
    background: rgba(102, 90, 255, 0.05);
}

.nav-hamburger span {
    display: block;
    width: 16px;
    height: 2px;
    background-color: var(--accent-blue);
    border-radius: 1px;
}

/* Mobile nav overlay */
.nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--site-nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-white);
    padding: 32px;
    gap: 32px;
    z-index: 250;
}

.nav-links.open .nav-link {
    font-family: var(--font-body);
    font-size: 24px;
}

/* Hero section */
.hero-section {
    padding: 112px 0 128px 0;
    min-height: auto;
    display: flex;
    align-items: center;
    background: var(--background-white);
}

.hero-section--tinted {
    background: var(--background-white);
}

.hero-container {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-image {
    flex: 0 0 440px;
    display: flex;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: auto;
}

.hero-image img.hero-photo-round {
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
    max-width: 320px;
}

.hero-section h1 {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 400;
    line-height: 1.08;
    margin-bottom: 48px;
    letter-spacing: 0;
    color: var(--primary-color);
    max-width: 1120px;
}

.hero-name {
    font-weight: 600;
}

.hero-section p {
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 28px;
    max-width: 1120px;
}

.highlight {
    background-color: rgba(102, 90, 255, 0.15);
    color: inherit;
    text-decoration: none;
    padding: 2px 4px;
}

/* Buttons */
.hero-buttons {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 20px 32px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    border: 1px solid;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--background-white);
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background-color: #5549d9;
    border-color: #5549d9;
    color: var(--background-white);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Social links in hero */
.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.social-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 24px;
    transition: var(--transition);
}

.social-links a:hover {
    color: #5549d9;
}

/* Section backgrounds */
.section-bg-light {
    background: var(--background-light);
    padding-bottom: 64px;
}

/* Content sections */
.content {
    padding: 0 0 16px 0;
}

.section-label {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    line-height: 1.3;
}

.content h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    text-align: left;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--primary-color);
    letter-spacing: 0;
    line-height: 1.3;
}

.content h2.section-heading {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 48px;
    letter-spacing: 0;
    line-height: 1.05;
}

.content p {
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.content a {
    color: var(--accent-blue);
    text-decoration: none;
    background-color: rgba(102, 90, 255, 0.15);
    padding: 2px 4px;
}

.home-work-intro {
    margin-bottom: 64px;
}

.home-work-intro h2 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 400;
    line-height: 1.12;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.home-work-intro p {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--secondary-color);
    max-width: 980px;
}

.home-work-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 64px;
    align-items: start;
    scroll-margin-top: 24px;
}

.home-work-subhead,
.home-notes h2 {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.25;
    margin-bottom: 24px;
}

.home-notes {
    padding-top: 0;
}

.home-work-description,
.home-notes p {
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 48px;
}

.home-note-list {
    display: grid;
    gap: 0;
}

.home-note-list a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
}

.home-note-list a:last-child {
    border-bottom: 1px solid var(--border-light);
}

.home-note-list a:hover {
    color: var(--accent-blue);
}

.home-note-list i {
    color: var(--accent-blue);
    font-size: 14px;
    margin-top: 7px;
}

/* Portfolio items */
.portfolio-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    margin-top: 0;
}

.portfolio {
    display: flex;
    flex-direction: column;
    background-color: var(--surface-white);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    box-shadow: -44px 6px 64px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
    gap: 24px;
    text-align: left;
    min-height: 100%;
}

.portfolio:hover {
    border-color: var(--border-light);
    transform: scale(1.015);
    text-decoration: none;
    color: inherit;
}

.portfolio--disabled {
    cursor: default;
    background: linear-gradient(0deg, rgba(245, 245, 247, 0.45), rgba(245, 245, 247, 0.45)), var(--surface-white);
}

.portfolio--disabled:hover {
    border-color: var(--border-light);
    transform: none;
}

.portfolio--group:hover {
    border-color: var(--border-light);
    transform: none;
}

.portfolio-content {
    flex: 1;
}

.portfolio-image {
    flex: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
}

.portfolio-image--stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.portfolio-meta {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.portfolio h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.2;
    text-align: left;
}

.portfolio h2 span {
    font-family: var(--font-heading);
    font-size: inherit;
    font-weight: 400;
    color: var(--text-light);
}

.portfolio-date {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.portfolio p {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.6;
    color: #55527c;
    margin-bottom: 0;
    text-align: left;
}

.portfolio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.portfolio p.portfolio-link-label {
    margin-top: 24px;
    margin-bottom: 10px;
}

.portfolio-link-label span {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.3;
}

.portfolio-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    color: var(--accent-blue);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;
    transition: var(--transition);
}

.portfolio-links i {
    font-size: 13px;
}

.portfolio-links a:hover {
    background-color: #5549d9;
    border-color: #5549d9;
    color: var(--background-white);
    transform: translateY(-2px);
}

.portfolio img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.portfolio-image--stack img {
    height: 100%;
    object-fit: contain;
}

.portfolio-image--fill img {
    object-fit: cover;
}

/* About - Outside of design section */
.about-section {
    padding: 64px 0;
}

.about-section--white {
    background: var(--background-white);
}

.about-section--light {
    background: var(--background-light);
}

.about-section > .container > h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    text-align: left;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--primary-color);
    letter-spacing: 0;
    line-height: 1.3;
}

.about-section > .container > p {
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.about-section > .container > p a {
    color: var(--accent-blue);
    text-decoration: none;
    background-color: rgba(102, 90, 255, 0.15);
    padding: 2px 4px;
}

.about-outside-section {
    margin: 0;
}

.about-outside-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.about-outside-columns {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 24px;
}

.about-outside-text {
    flex: 1 1 auto;
    min-width: 0;
}

.about-outside-text p {
    font-family: var(--font-body);
    font-size: 22px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.about-outside-text a {
    color: var(--accent-blue);
    text-decoration: none;
    background-color: rgba(102, 90, 255, 0.15);
    padding: 2px 4px;
}

.about-outside-photos {
    width: 100%;
    max-width: 340px;
}

.about-outside-photos img {
    width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .about-outside-columns {
        align-items: flex-start;
    }

    .about-outside-photos {
        max-width: 300px;
    }

    .about-outside-text {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 479px) {
    .about-outside-columns {
        gap: 16px;
    }

    .about-outside-photos {
        max-width: 260px;
    }

    .about-outside-title {
        margin-bottom: 16px;
    }
}

/* Book grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.book-card {
    background: var(--surface-white);
    border: 1px solid #d3d3d1;
    border-radius: 8px;
    padding: 16px;
}

.book-card img {
    width: 160px;
    max-width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #d3d3d1;
    margin-bottom: 12px;
}

.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    max-width: 100%;
    height: 240px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #d3d3d1;
    border-radius: 4px;
    background: var(--background-white);
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 18px;
    line-height: 1.25;
    text-align: center;
    box-shadow: inset 0 0 0 8px var(--surface-white);
}

.book-card h5 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-card h5 a {
    color: var(--primary-color);
    text-decoration: none;
    background: none;
    padding: 0;
}

.book-card h5 a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

.book-card p {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    background: var(--background-light);
    padding: 16px 0;
    margin-top: 0;
}

.page-about .site-footer {
    background: var(--background-white);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-credit {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.footer-social a {
    color: var(--text-light);
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--accent-blue);
}

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    width: 56px;
    height: 56px;
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    z-index: 100;
    transition: transform 0.15s ease-out;
}

/* Responsive */
@media (max-width: 991px) {
    .container {
        padding: 0 24px;
    }

    .hero-section {
        padding: 96px 0 112px 0;
    }

    .hero-container {
        flex-direction: column;
        gap: 32px;
    }

    .hero-image {
        flex: none;
        width: 100%;
        max-width: 340px;
    }

    .hero-section h1 {
        font-size: 42px;
        line-height: 1.08;
        margin-bottom: 36px;
    }

    .hero-section p {
        font-size: 24px;
        line-height: 1.6;
    }

    .content h2.section-heading {
        font-size: 42px;
    }

    .home-work-intro {
        margin-bottom: 48px;
    }

    .home-work-intro h2 {
        font-size: 42px;
    }

    .home-work-intro p {
        font-size: 21px;
    }

    .portfolio-items {
        grid-template-columns: 1fr;
    }

    .home-work-description,
    .home-notes p {
        font-size: 21px;
        margin-bottom: 24px;
    }

    .portfolio {
        gap: 24px;
        padding: 16px;
    }

    .portfolio:hover {
        transform: translateX(0);
    }

    .portfolio-image--stack img {
        height: 100%;
    }

    .portfolio p {
        font-size: 18px;
    }

    .btn {
        padding: 16px 28px;
        font-size: 16px;
    }
}

@media (max-width: 860px) {
    .home-work-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 767px) {
    .container,
    .nav-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero-image {
        display: none;
    }

    .nav-logo img {
        height: 48px;
    }

    .site-nav.is-scrolled .nav-logo img {
        height: 32px;
    }

    .hero-section {
        padding: 64px 0 72px 0;
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 42px;
        margin-bottom: 32px;
        letter-spacing: 0;
    }

    .hero-section p {
        font-size: 22px;
        margin-bottom: 24px;
        line-height: 1.6;
    }

    .hero-buttons {
        margin-bottom: 20px;
        gap: 12px;
        flex-direction: column;
    }

    .hero-buttons .btn {
        text-align: center;
    }

    .btn {
        padding: 20px 32px;
        font-size: 18px;
    }

    .content {
        padding: 0 0 16px 0;
    }

    .section-label {
        font-size: 14px;
    }

    .content h2.section-heading {
        font-size: 42px;
        margin-bottom: 32px;
    }

    .home-work-intro {
        margin-bottom: 40px;
    }

    .home-work-intro h2 {
        font-size: 42px;
        margin-bottom: 16px;
    }

    .home-work-intro p {
        font-size: 20px;
    }

    .home-work-subhead,
    .home-notes h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .home-work-description,
    .home-notes p {
        font-size: 20px;
    }

    .home-note-list a {
        font-size: 24px;
        padding: 20px 0;
    }

    .portfolio {
        padding: 16px;
        border-radius: 8px;
    }

    .portfolio h2 {
        font-size: 24px;
    }

    .portfolio p {
        font-size: 20px;
    }

    .social-links a {
        font-size: 28px;
    }

    .social-links {
        gap: 14px;
    }

    .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .footer-container {
        flex-direction: row;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 56px 0 56px 0;
    }

    .hero-section h1 {
        font-size: 42px;
        line-height: 1.1;
        margin-bottom: 24px;
    }

    .hero-section p {
        font-size: 20px;
        line-height: 1.55;
    }

    .home-work-intro h2 {
        font-size: 42px;
    }

    .home-work-intro p,
    .home-work-description,
    .home-notes p {
        font-size: 20px;
    }
}

@media (max-width: 479px) {
    .container {
        padding: 0 20px;
    }

    .hero-section h1 {
        font-size: 46px;
    }

    .hero-section p {
        font-size: 18px;
    }

    .home-work-intro h2 {
        font-size: 38px;
    }
}

/* ========================================
   Project Page Layout
   ======================================== */

/* Project Hero */
.project-hero {
    padding: 80px 0 48px 0;
}

.project-hero-columns {
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

.project-hero-left {
    flex: 0 0 45%;
}

.project-hero-left h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.project-date {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.project-website-link {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--background-white);
    text-decoration: none;
    background-color: var(--accent-blue);
    padding: 2px 6px;
    transition: var(--transition);
}

.project-website-link:hover {
    background-color: #5549d9;
}

.project-hero-right {
    flex: 1;
    padding-top: 8px;
}

.project-description {
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tag {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: #665aff;
    background: transparent;
    border: 1px solid #665aff;
    border-radius: 100px;
    padding: 6px 16px;
    white-space: nowrap;
}

.project-tag--platform {
    color: #665aff;
    background: transparent;
    border-color: #665aff;
}

/* Project Hero Image */
.project-hero-image {
    padding-bottom: 48px;
}

.project-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* Project Body */
.project-body {
    padding: 32px 0 64px 0;
}

.project-body-columns {
    display: flex;
    gap: 64px;
}

/* Project Sidebar */
.project-sidebar {
    flex: 0 0 200px;
}

.project-sidebar-inner {
    position: sticky;
    top: calc(var(--site-nav-height) + 32px);
}

.project-sidebar-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.project-sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-sidebar-scroll {
    position: relative;
}

.project-sidebar-scroll-btn {
    display: none;
}

.project-sidebar-links li {
    margin-bottom: 10px;
}

.project-sidebar-links a {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 0;
    background: none;
}

.project-sidebar-links a:hover,
.project-sidebar-links a.active {
    color: var(--accent-blue);
}

/* Project Content */
.project-content {
    flex: 1;
    min-width: 0;
}

.project-content--full {
    max-width: 800px;
    margin: 0 auto;
}

.project-content .section-label {
    margin-top: 64px;
    margin-bottom: 8px;
    scroll-margin-top: 96px;
}

.project-content .section-label:first-child {
    margin-top: 0;
}

.project-content h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 24px;
}

.project-content h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-content p {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.project-content ul,
.project-content ol {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 16px;
    padding-left: 24px;
}

.project-content li {
    margin-bottom: 8px;
}

.project-content blockquote {
    border-left: none;
    margin: 16px 0;
    padding: 8px 0 8px 0;
    font-style: italic;
}

.project-content blockquote p {
    font-size: 17px;
    color: var(--secondary-color);
    margin-bottom: 0;
}

.project-content img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 24px 0;
}

.project-content .project-figure {
    margin: 24px 0;
}

.project-content .project-figure img {
    margin: 0;
}

.project-content .project-figure .carousel {
    margin: 0;
}

.project-content img.wide {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
}

.project-content .image-caption {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-light);
    margin-top: 8px;
    margin-bottom: 24px;
    line-height: 1.6;
    text-align: center;
}

.project-content a {
    color: var(--accent-blue);
    text-decoration: none;
    background-color: rgba(102, 90, 255, 0.15);
    padding: 2px 4px;
}

.project-content .research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 24px 0;
}

.project-content .research-grid h3 {
    margin-top: 0;
    font-size: 18px;
}

.project-content .research-grid p {
    font-size: 16px;
}

/* Carousel */
.carousel {
    position: relative;
    margin: 24px 0;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    position: relative;
}

.carousel-slide {
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    margin: 0;
    border-radius: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--background-light);
}

.carousel-btn--prev {
    left: 12px;
}

.carousel-btn--next {
    right: 12px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    background: var(--background-white);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-light);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--accent-blue);
}

.project-content strong {
    font-weight: 700;
    color: var(--primary-color);
}

/* Previous/Next Navigation */
.project-nav {
    border-top: 1px solid var(--border-light);
    padding: 48px 0;
}

.project-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-nav-link {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    padding: 0;
    background: none;
}

.project-nav-link:hover {
    color: var(--accent-blue);
}

.project-nav-arrow {
    font-size: 24px;
}

/* Project Page Responsive */
@media (max-width: 991px) {
    .project-hero-columns {
        flex-direction: column;
        gap: 32px;
    }

    .project-hero-left {
        flex: none;
        width: 100%;
    }

    .project-hero-left h1 {
        font-size: 42px;
    }

    .project-body-columns {
        flex-direction: column;
        gap: 32px;
    }

    .project-sidebar {
        flex: none;
        width: 100%;
        position: sticky;
        top: calc(var(--site-nav-height) - 1px);
        z-index: 90;
        background: var(--background-white);
        margin-top: -1px;
    }

    .project-sidebar-inner {
        position: static;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px 16px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-light);
    }

    .project-sidebar-label {
        flex: 0 0 auto;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .project-sidebar-scroll {
        flex: 1 1 auto;
        min-width: 0;
    }

    .project-sidebar-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-right: 32px;
        scroll-padding: 0 32px 0 0;
    }

    .project-sidebar-links::-webkit-scrollbar {
        display: none;
    }

    .project-sidebar-links li {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .project-sidebar-scroll-btn {
        position: absolute;
        top: 50%;
        z-index: 2;
        display: none;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-light);
        border-radius: 999px;
        background: var(--surface-white);
        color: var(--primary-color);
        font-family: var(--font-body);
        font-size: 14px;
        line-height: 1;
        cursor: pointer;
        transform: translateY(-50%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        transition: var(--transition);
    }

    .project-sidebar-scroll-btn:hover,
    .project-sidebar-scroll-btn:focus {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    .project-sidebar-scroll-btn--left {
        left: 0;
    }

    .project-sidebar-scroll-btn--right {
        right: 0;
    }

    .project-sidebar-scroll.can-scroll-left .project-sidebar-scroll-btn--left,
    .project-sidebar-scroll.can-scroll-right:hover .project-sidebar-scroll-btn--right,
    .project-sidebar-scroll.can-scroll-right:focus-within .project-sidebar-scroll-btn--right {
        display: flex;
    }

    .project-sidebar-scroll.can-scroll-left .project-sidebar-links {
        padding-left: 36px;
        scroll-padding-left: 36px;
    }
}

@media (max-width: 767px) {
    .project-hero {
        padding: 48px 0 32px 0;
    }

    .project-hero-left h1 {
        font-size: 42px;
        letter-spacing: 0;
    }

    .project-content h2 {
        font-size: 28px;
    }

    .project-content .research-grid {
        grid-template-columns: 1fr;
    }

    .project-content img.wide {
        width: 100%;
        margin-left: 0;
    }

    .project-sidebar {
        display: block;
        top: calc(var(--site-nav-height) - 1px);
        width: calc(100% + 40px);
        margin: 0 -20px;
        padding: 0 20px;
    }

    .project-sidebar-inner {
        gap: 6px 12px;
        padding: 8px 0;
    }

    .project-sidebar-label {
        font-size: 11px;
        letter-spacing: 1.4px;
    }

    .project-sidebar-links {
        gap: 0 14px;
        padding-right: 32px;
        scroll-padding-right: 32px;
    }

    .project-sidebar-links a {
        font-size: 14px;
    }

    .project-sidebar-scroll-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .project-sidebar-scroll.can-scroll-right .project-sidebar-scroll-btn--right {
        display: flex;
    }

    .project-nav-container {
        flex-direction: column;
        gap: 24px;
    }

}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states */
.btn:focus,
.social-links a:focus,
.nav-link:focus,
.portfolio:focus,
.content a:focus,
.book-card a:focus,
.project-website-link:focus,
.project-sidebar-links a:focus,
.project-content a:focus,
.carousel-btn:focus,
.carousel-dot:focus,
.project-nav-link:focus,
.footer-social a:focus,
.back-to-top:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Print */
@media print {
    .site-nav,
    .social-links,
    .site-footer {
        display: none !important;
    }

    .portfolio {
        break-inside: avoid;
        box-shadow: none !important;
    }
}
