:root {
    --hw-bg-light: #cfeaf7;
    --hw-primary-dark: #708d96;
    --hw-text-on-light: #708d96;
    --hw-text-body: #5d7b87;
    --hw-text-dark: #111111;
    --hw-text-on-dark: #eef6fb;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-editorial: 'Newsreader', serif;
    --font-display: 'League Gothic', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hw-bg-light: #16242b;
        --hw-primary-dark: #2c424a;
        --hw-text-on-light: #8ba7b3;
        --hw-text-body: #8ba7b3;
        --hw-text-dark: #eef6fb;
        --hw-text-on-dark: #d3ebf8;
    }
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
    background-color: var(--hw-bg-light);
}

body {
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

strong {
    font-weight: 500;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.center-text { text-align: center; }

.section-light {
    background-color: transparent;
    color: var(--hw-text-on-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 5% 4rem 5%;
}

.section-dark {
    background-color: var(--hw-primary-dark);
    color: var(--hw-text-on-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 5% 6rem 5%;
    position: relative;
    border-top-right-radius: 8rem;
    width: 96%;
    margin-top: -2rem;
    z-index: 2;
}

.project-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    background-color: transparent;
    color: var(--hw-text-dark);
    transition: color 0.4s ease;
}

.project-nav.nav-light-text {
    color: var(--hw-text-on-dark);
}

.project-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

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

.project-nav-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-layout {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-header-row {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-top-accent {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.presents-logo {
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--hw-text-dark);
}

.hero-badge {
    font-family: var(--font-editorial);
    font-size: 1.3rem;
    color: var(--hw-text-dark);
    letter-spacing: -0.01em;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(5rem, 16vw, 15rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 0.75;
    color: var(--hw-text-on-light);
    text-transform: uppercase;
    word-wrap: break-word;
}

.hero-content-row {
    max-width: 850px;
}

.hero-subtitle {
    font-family: var(--font-editorial);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--hw-text-body);
    margin-bottom: 3.5rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-ui);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    display: inline-block;
    text-align: center;
}

.btn-dark {
    background-color: var(--hw-text-dark);
    color: var(--hw-bg-light);
    border: 1px solid var(--hw-text-dark);
}

.btn-dark:hover {
    background-color: transparent;
    color: var(--hw-text-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--hw-text-dark);
    border: 1px solid var(--hw-text-dark);
}

.btn-outline:hover {
    background-color: var(--hw-text-dark);
    color: var(--hw-bg-light);
}

.showcase-layout {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    padding-top: 5rem;
}

.showcase-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(2rem, 5vw, 6rem);
    align-items: center;
    width: 100%;
}

.showcase-image-container {
    position: relative;
    z-index: 10;
    margin-left: -5%;
    margin-top: -3rem;
    width: 100%;
    max-width: 900px;
}

.showcase-bg-text {
    position: absolute;
    top: 0; 
    left: 50%;
    transform: translate(-50%, -55%);
    z-index: 1;
    font-family: var(--font-editorial);
    font-style: normal; 
    font-size: clamp(3rem, 9vw, 7.5rem);
    font-weight: 400;
    color: var(--hw-text-on-dark);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    opacity: 0.95;
    text-align: center;
}

.showcase-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2.5rem;
    box-shadow: 15px 30px 60px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
}

.showcase-text-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-right: 2rem;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: var(--font-display);
    font-size: clamp(6rem, 15vw, 15rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--hw-text-on-dark);
    white-space: nowrap;
    line-height: 0.75;
}

.project-details {
    width: 100%;
    max-width: 1000px;
    margin: 8rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
}

.detail-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.detail-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--hw-text-on-dark);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.detail-text {
    font-family: var(--font-editorial);
    font-size: 1.3rem;
    color: var(--hw-text-on-dark);
    opacity: 0.9;
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background-color: rgba(238, 246, 251, 0.05);
    border: 1px solid rgba(238, 246, 251, 0.15);
    padding: 2.5rem;
    border-radius: 1rem;
}

.feature-card h3 {
    font-family: var(--font-editorial);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--hw-text-on-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--hw-text-on-dark);
    opacity: 0.8;
    line-height: 1.6;
}

.split-section {
    display: block;
}

.os-toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.os-toggle {
    display: inline-flex;
    background-color: rgba(238, 246, 251, 0.05);
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(238, 246, 251, 0.15);
}

.os-btn {
    background: transparent;
    border: none;
    color: rgba(238, 246, 251, 0.6);
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}

.os-btn.active {
    background-color: var(--hw-text-on-dark);
    color: var(--hw-primary-dark);
}

.os-btn:hover:not(.active) {
    color: var(--hw-text-on-dark);
}

.code-block-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.code-block {
    background-color: #1A2528;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(238, 246, 251, 0.15);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.code-block.inline-code {
    display: inline-block;
    padding: 1rem 1.5rem;
    width: auto;
}

.large-code-block .code-block {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
}

.large-code-block .code-block code {
    font-size: 1.1rem;
    line-height: 1.7;
}

.code-block code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    color: var(--hw-text-on-dark);
    line-height: 1.5;
    white-space: pre;
}

.copy-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(238, 246, 251, 0.1);
    border: 1px solid rgba(238, 246, 251, 0.2);
    color: var(--hw-text-on-dark);
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 5;
}

.copy-btn:hover {
    background: rgba(238, 246, 251, 0.25);
}

.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stack-pill {
    background-color: transparent;
    color: var(--hw-text-on-dark);
    border: 1px solid rgba(238, 246, 251, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-family: var(--font-ui);
}

.learning-note {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid rgba(238, 246, 251, 0.1);
}

.learning-note p {
    font-family: var(--font-editorial);
    font-size: 1.3rem;
    color: var(--hw-text-on-dark);
    opacity: 0.8;
}

.project-footer {
    padding: 2rem 5% 4rem 5%;
    text-align: center;
    min-height: auto;
    margin-top: 0;
}

.footer-content p {
    font-size: 1rem;
    color: var(--hw-text-on-dark);
    opacity: 0.8;
    font-family: var(--font-ui);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .section-dark {
        width: 100%;
        padding: 0 5% 4rem 5%;
        border-top-right-radius: 3rem;
        border-top-left-radius: 3rem;
        margin-top: -1rem;
    }

    .hero-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-title {
        font-size: clamp(4.5rem, 18vw, 7rem);
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 5rem;
    }

    .vertical-text {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: clamp(4rem, 15vw, 6rem);
        line-height: 1;
        white-space: normal;
        text-align: center;
    }
    
    .showcase-text-right {
        justify-content: center;
        padding-right: 0;
    }
    
    .showcase-image-container {
        margin-left: 0;
        margin-top: 0;
        max-width: 100%;
    }

    .showcase-bg-text {
        font-size: clamp(3rem, 11vw, 4rem);
        left: 50%;
        transform: translate(-50%, -60%);
    }

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

    .project-details {
        gap: 4rem;
        margin-top: 4rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .center-mobile {
        text-align: center;
    }

    .os-toggle-container {
        justify-content: center;
    }

    .stack-list {
        justify-content: center;
    }

    .large-code-block .code-block {
        padding: 1.5rem;
    }

    .large-code-block .code-block code {
        font-size: 0.95rem;
    }

    .copy-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
    }
    
    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }
}
