:root {
    --hn-primary: #8F5BFF;
    --hn-dark: #1B0C36;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-editorial: 'Newsreader', serif;
    --font-display: 'League Gothic', sans-serif;
}

* {
    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(--hn-dark);
}

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: var(--hn-primary);
    color: var(--hn-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 5% 6rem 5%;
}

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

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

.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.02em;
    text-transform: uppercase;
}

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

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

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

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 14rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 0.8;
    margin-bottom: 2rem;
    color: var(--hn-dark);
    text-transform: uppercase;
    word-wrap: break-word;
}

.hero-subtitle {
    font-family: var(--font-editorial);
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 400;
    max-width: 800px;
    line-height: 1.5;
    color: var(--hn-dark);
    margin-bottom: 3.5rem;
}

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

.btn {
    text-decoration: none;
    padding: 1rem 2.2rem;
    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(--hn-dark);
    color: var(--hn-primary);
    border: 1px solid var(--hn-dark);
}

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

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

.btn-outline:hover {
    background-color: var(--hn-dark);
    color: var(--hn-primary);
}

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

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

.showcase-text-left {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

.showcase-center {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.showcase-bg-text {
    position: absolute;
    top: 0; 
    left: 50%;
    transform: translate(-50%, -45%);
    z-index: 1;
    font-family: var(--font-editorial);
    font-style: normal; 
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    color: var(--hn-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

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

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: var(--font-display);
    font-size: clamp(5rem, 14vw, 11rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--hn-primary);
    white-space: nowrap;
    line-height: 0.85;
}

.project-details {
    width: 100%;
    max-width: 900px;
    margin: 4rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    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, 3.5rem);
    color: var(--hn-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.detail-text {
    font-size: 1.1rem;
    color: rgba(143, 91, 255, 0.9);
    max-width: 800px;
    margin-bottom: 1.5rem;
}

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

.feature-card {
    background-color: rgba(143, 91, 255, 0.05);
    border: 1px solid rgba(143, 91, 255, 0.15);
    padding: 2rem;
    border-radius: 1rem;
}

.feature-card h3 {
    font-family: var(--font-editorial);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--hn-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: rgba(143, 91, 255, 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(143, 91, 255, 0.05);
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(143, 91, 255, 0.15);
}

.os-btn {
    background: transparent;
    border: none;
    color: rgba(143, 91, 255, 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(--hn-primary);
    color: var(--hn-dark);
}

.os-btn:hover:not(.active) {
    color: var(--hn-primary);
}

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

.code-block {
    background-color: #0F0620;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(143, 91, 255, 0.2);
    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(--hn-primary);
    line-height: 1.5;
    white-space: pre;
}

.copy-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(143, 91, 255, 0.1);
    border: 1px solid rgba(143, 91, 255, 0.2);
    color: var(--hn-primary);
    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(143, 91, 255, 0.2);
}

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

.stack-pill {
    background-color: transparent;
    color: var(--hn-primary);
    border: 1px solid rgba(143, 91, 255, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    font-family: var(--font-ui);
}

.learning-note {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(143, 91, 255, 0.1);
}

.learning-note p {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    color: rgba(143, 91, 255, 0.8);
}

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

.footer-content p {
    font-size: 1rem;
    color: var(--hn-primary);
    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);
}

.scrolled-nav {
    color: var(--hn-primary);
}

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

    .hero-title {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .showcase-bg-text {
        font-size: clamp(2rem, 10vw, 3.5rem);
        top: 0;
        transform: translate(-50%, -60%);
    }

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

    .vertical-text {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: clamp(2.5rem, 12vw, 4.5rem);
        line-height: 1.1;
        white-space: normal;
        text-align: center;
    }
    
    .showcase-text-left, .showcase-text-right {
        justify-content: center;
        order: 2;
    }
    
    .showcase-center {
        order: 1;
        max-width: 320px;
    }

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

    .project-details {
        gap: 4rem;
        margin-top: 3rem;
        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%;
    }
}
