/* Light theme (default) - Paper & Ink */
:root {
    --bg-color: #ffffff;
    --bg-secondary: #f2f2f7;
    --primary-color: #000000;
    --secondary-color: #8e8e93;
    --card-bg: rgba(0, 0, 0, 0.03);
    --card-bg-center: rgba(255, 255, 255, 0.8);
    --card-bg-edge: rgba(0, 0, 0, 0.08);
    --border-color: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.05);
}

/* Dark theme colors - White ink on black paper */
.dark-theme {
    --bg-color: #000000;
    --bg-secondary: #1c1c1e;
    --primary-color: #ffffff;
    --secondary-color: #8e8e93;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-bg-center: rgba(255, 255, 255, 0.08);
    --card-bg-edge: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.12);
}

/* System theme - follows OS preference */
@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) {
        --bg-color: #000000;
        --bg-secondary: #1c1c1e;
        --primary-color: #ffffff;
        --secondary-color: #8e8e93;
        --card-bg: rgba(255, 255, 255, 0.08);
        --card-bg-center: rgba(255, 255, 255, 0.08);
        --card-bg-edge: rgba(255, 255, 255, 0.08);
        --border-color: rgba(255, 255, 255, 0.1);
        --hover-bg: rgba(255, 255, 255, 0.12);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
    line-height: 1.7;
    font-weight: 400;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

/* Utility: Base image styling */
.image-card {
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: block;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .image-card {
        border-radius: 16px;
        margin-bottom: 16px;
    }
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-top: 16px;
    justify-content: flex-end;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.theme-switcher.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.theme-switcher-bottom {
    display: flex;
    gap: 4px;
    padding: 4px;
}

.theme-button {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--primary-color);
    opacity: 0.4;
    min-height: auto;
    min-width: auto;
}

.theme-button:hover {
    opacity: 0.7;
    background-color: var(--hover-bg);
}

.theme-button.active {
    opacity: 0.8;
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.theme-button svg {
    width: 12px;
    height: 12px;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 100;
    padding: 4px 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.navbar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.navbar-content {
    display: flex;
    align-items: center;
    gap: 32px;
    background: transparent;
    padding: 3px 0 3px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    backdrop-filter: none;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.visible .navbar-content {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.dark-theme .navbar.visible .navbar-content {
    background: rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .navbar.visible .navbar-content {
        background: rgba(0, 0, 0, 0.65);
    }
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-center {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
}

.navbar-logo {
    font-size: 15px;
    font-weight: 400;
    color: var(--primary-color);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.navbar-logo:hover {
    opacity: 0.6;
}

.navbar-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.navbar-link:hover {
    opacity: 0.6;
}

.navbar-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
    padding-right: 5px;
}

.navbar-download:hover {
    opacity: 0.85;
}

.navbar-download svg {
    width: 100%;
    height: auto;
}

@media (max-width: 1023px) {
    .navbar {
        padding: 3px 16px;
    }

    .navbar-content {
        gap: 20px;
        padding: 2px 12px;
    }

    .navbar-center {
        gap: 16px;
    }

    .navbar-download {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 8px;
    }

    .navbar-content {
        gap: 6px;
        padding: 8px 3px;
    }

    .navbar-left {
        gap: 12px;
    }

    .navbar-icon {
        margin-left: 8px;
    }

    .navbar-center {
        display: none;
    }

    .navbar-logo {
        font-size: 12px;
        padding-left: 8px;
    }

    .navbar-link {
        font-size: 11px;
    }

    .navbar-download {
        width: 80px;
        min-height: 56px;
    }

    .navbar-download svg {
        height: 100%;
    }
}

@media (max-width: 480px) {
    .navbar {
        display: none;
    }

    .navbar-content {
        gap: 8px;
        flex-wrap: wrap;
    }

    .navbar-center {
        order: 3;
        width: 100%;
        gap: 8px;
        justify-content: center;
        margin-top: 4px;
    }

    .navbar-link {
        font-size: 12px;
        padding: 8px 12px;
    }

    .navbar-download {
        width: 80px;
        font-size: 12px;
    }

    .navbar-logo {
        font-size: 13px;
    }
}

/* Hide theme switcher on mobile */
@media (max-width: 480px) {
    .theme-switcher {
        display: none;
    }
}

/* Top Download Button */
.hero-intro {
    position: relative;
}

.download-button-top {
    position: absolute;
    top: 20px;
    right: max(20px, calc(50% - 510px));
    display: inline-block;
    width: 130px;
    height: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.download-button-top:hover {
    opacity: 0.85;
}

.download-button-top svg {
    width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    .download-button-top {
        top: 15px;
        right: 15px;
        width: 180px;
    }
}

/* Hero Intro Section */
.hero-intro {
    padding: 40px 0 0;
}

@media (max-width: 480px) {
    .hero-intro {
        padding: 50px 0 0;
    }
}

@media (max-width: 480px) {
    .hero-intro {
        padding: 45px 0 0;
    }
}

.hero-intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.hero-icon-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

.hero-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.dark-theme .hero-icon-wrapper::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .hero-icon-wrapper::before {
        background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    }
}

.hero-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    object-fit: cover;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15), 0 0 80px rgba(0, 0, 0, 0.08);
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    display: block;
}

.dark-theme .hero-icon {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15), 0 0 80px rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .hero-icon {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.15), 0 0 80px rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 480px) {
    .hero-icon {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        width: 52px;
        height: 52px;
    }
}

.hero-title-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-intro-title {
    font-size: clamp(32px, 9vw, 60px);
    margin: 0;
    line-height: 1.1;
    font-weight: 600;
}

.hero-title-row .beta-badge {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    white-space: nowrap;
}

.hero-intro-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
    opacity: 0.85;
    color: var(--primary-color);
    margin: 0 0 20px 0;
    line-height: 1.5;
    white-space: nowrap;
    font-weight: 500;
}

@media (max-width: 480px) {
    .hero-intro-subtitle {
        margin-bottom: 30px;
    }
}

.beta-badge {
    display: inline-block;
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 400;
    vertical-align: top;
}

/* CTA Section */
.cta-section {
    padding: 40px 0 80px;
}

@media (max-width: 480px) {
    .cta-section {
        padding: 30px 0 40px;
    }
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
}

@media (max-width: 480px) {
    .cta-content {
        gap: 32px;
    }
}

.cta-headline {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}

@media (max-width: 480px) {
    .cta-headline {
        font-size: clamp(28px, 8vw, 48px);
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 16px 56px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.dark-theme .cta-button {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.dark-theme .cta-button:hover {
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.18);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .cta-button {
        box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
    }

    :root:not(.light-theme):not(.dark-theme) .cta-button:hover {
        box-shadow: 0 12px 32px rgba(255, 255, 255, 0.18);
    }
}

@media (max-width: 480px) {
    .cta-button {
        padding: 14px 44px;
        font-size: 16px;
    }
}

.cta-caption {
    font-size: 13px;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

@media (max-width: 480px) {
    .cta-caption {
        font-size: 12px;
    }
}

/* Card Sections */
.section {
    padding: 60px 0;
}

.section-reduced-spacing {
    padding-top: 0;
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }

    .section-reduced-spacing {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 32px 0;
    }
}

#features {
    padding-top: 0;
}

#faq {
    padding-top: 0;
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    text-align: center;
    margin-bottom: 60px;
}

@media (max-width: 480px) {
    .section-title {
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .section-title {
        margin-bottom: 25px;
        font-size: clamp(28px, 8vw, 48px);
    }
}

.card {
    background: radial-gradient(ellipse at center, var(--card-bg-center) 0%, var(--card-bg-center) 50%, var(--card-bg-edge) 100%);
    border-radius: 30px;
    padding: 24px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    transition: background 0.4s ease-in-out;
    position: relative;
}

@media (max-width: 480px) {
    .card {
        padding: 20px 16px;
        margin-bottom: 24px;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 16px 14px;
        margin-bottom: 20px;
        border-radius: 20px;
    }
}

/* Highlights Section */
.highlights-section {
    padding: 0 0 80px;
}

@media (max-width: 480px) {
    .highlights-section {
        padding: 0 0 40px;
    }

    .main-screenshot-wrapper {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .highlights-section {
        padding: 0 0 32px;
    }

    .main-screenshot-wrapper {
        margin-bottom: 24px;
    }
}

/* Main Screenshot */
.main-screenshot-wrapper {
    margin-bottom: 50px;
}

.main-screenshot {
    width: 100%;
    aspect-ratio: 2122 / 1156;
    background: var(--card-bg);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
}

.screenshot-image.active {
    opacity: 1;
}

@media (max-width: 480px) {
    .main-screenshot {
        border-radius: 20px;
        aspect-ratio: 2122 / 1156;
    }
}

@media (max-width: 480px) {
    .main-screenshot {
        border-radius: 16px;
        aspect-ratio: 1080 / 600;
    }
}

/* Feature Tabs */
.feature-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.feature-tabs {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    position: relative;
}

.feature-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: var(--indicator-left, 4px);
    width: var(--indicator-width, 0px);
    height: calc(100% - 8px);
    background: var(--primary-color);
    border-radius: 999px;
    transition: all 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.feature-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.feature-tab:hover {
    opacity: 0.7;
}

.feature-tab.active {
    color: var(--bg-color);
}

@media (max-width: 480px) {
    .feature-tab {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

    .feature-tabs-wrapper {
        padding: 0 0 8px 0;
    }
}

@media (max-width: 480px) {
    .feature-tab {
        padding: 7px 12px;
        font-size: 13px;
        min-height: 32px;
    }

    .feature-tabs {
        padding: 3px;
    }
}

/* Feature Description */
.feature-description {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.feature-description-text {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    color: var(--secondary-color);
    margin: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.feature-description-text.active {
    opacity: 1;
}

.feature-description-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* MCP Cards Row */
.card-row-mcp {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .card-row-mcp {
        grid-template-columns: 1fr;
    }
}

.mcp-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.mcp-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.mcp-image-large {
    aspect-ratio: 520 / 300;
}

.mcp-image {
    aspect-ratio: 260 / 330;
}

@media (max-width: 480px) {
    .mcp-image {
        max-width: 200px;
    }
}

.mcp-text {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
}

@media (max-width: 480px) {
    .mcp-text {
        font-size: 13px;
        line-height: 1.4;
    }
}

.mcp-text strong {
    font-weight: 600;
}

/* MCP Flip Card */
.mcp-flip-card {
    padding: 0;
    position: relative;
    min-height: 400px;
}

@media (max-width: 480px) {
    .mcp-flip-card {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .mcp-flip-card {
        min-height: 140px;
    }
}

.mcp-flip-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.mcp-flip-front,
.mcp-flip-back {
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .mcp-flip-front,
    .mcp-flip-back {
        flex-direction: row-reverse;
        align-items: flex-end;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .mcp-flip-front,
    .mcp-flip-back {
        padding: 16px;
        gap: 8px;
    }
}

.mcp-flip-front {
    opacity: 1;
    visibility: visible;
}

.mcp-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    background: var(--primary-color);
    color: var(--bg-color);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.mcp-flip-card.flipped .mcp-flip-front {
    opacity: 0;
    visibility: hidden;
}

.mcp-flip-card.flipped .mcp-flip-back {
    opacity: 1;
    visibility: visible;
}

.mcp-image-container {
    position: relative;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .mcp-image-container {
        margin-bottom: 0;
        flex-shrink: 0;
    }
}

.mcp-flip-button {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    top: 12px;
    right: 12px;
    min-height: 44px;
    min-width: 44px;
}

@media (max-width: 480px) {
    .mcp-flip-button {
        width: 32px;
        height: 32px;
        min-height: 40px;
        min-width: 40px;
        top: 8px;
        right: 8px;
    }
}


.mcp-flip-button-back {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-color) !important;
    border: none;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 24px;
    right: 24px;
}

.mcp-flip-button-back:hover {
    background: var(--bg-color) !important;
    color: var(--primary-color) !important;
}

.mcp-flip-button-back:active,
.mcp-flip-button-back:focus {
    background: var(--bg-color) !important;
    color: var(--primary-color) !important;
    outline: none !important;
}

.mcp-flip-icon {
    width: 28px;
    height: 28px;
}

.mcp-flip-icon-back {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    display: block;
}

.mcp-back-icon {
    width: 56px;
    height: 56px;
    color: #34c759;
    margin-bottom: 24px;
    display: block;
}

.mcp-text-back {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    color: var(--bg-color);
    margin: 0;
    font-weight: 400;
}

/* Full Width Card */
.card-full-width {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.card-layout-horizontal {
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
}

.card-text-content {
    width: clamp(35%, calc(35% + (1200px - 100vw) / 720px * 30%), 65%);
    display: flex;
    align-items: flex-end;
    padding-right: clamp(0px, calc(20px - (1200px - 100vw) / 720px * 20px), 20px);
}

.card-layout-horizontal .card-title-text {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
    font-weight: 400;
}

.card-layout-horizontal .card-title-text strong {
    font-weight: 600;
}

.card-flow-image {
    width: 65%;
    aspect-ratio: 2122 / 1156;
}

.projects-background {
    position: relative;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 1924 / 784;
}

.projects-video {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.projects-background .card-text-content {
    position: relative;
    z-index: 1;
    padding: clamp(15px, calc(40px - (1200px - 100vw) / 720px * 25px), 40px);
}

.projects-background .card-title-text {
    color: #ffffff;
}

@media (max-width: 480px) {
    .projects-background .card-title-text {
        font-size: clamp(12px, calc(14px - (480px - 100vw) / 180px * 2px), 14px);
    }

    .card-layout-horizontal {
        gap: 16px;
    }

    .card-layout-horizontal:has(.card-flow-image) {
        flex-direction: column-reverse;
    }

    .card-layout-horizontal:has(.card-flow-image) .card-text-content {
        width: 100%;
    }

    .card-layout-horizontal .card-title-text {
        width: 100%;
        padding-right: 0;
        margin-bottom: 0;
        margin-top: 0;
    }

    .card-layout-horizontal .card-screenshot-placeholder {
        width: 35%;
    }

    .card-flow-image {
        width: 100%;
    }
}

.card-screenshot-placeholder {
    width: 100%;
    aspect-ratio: 2122 / 1156;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-title-text {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
}

.card-title-text-mobile {
    display: none;
}

@media (max-width: 480px) {
    .card-title-text-desktop {
        display: none;
    }

    .card-title-text-mobile {
        display: block;
    }
}

/* Feature Row with 3/4 and 1/4 */
.card-row-feature {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .card-row-feature {
        grid-template-columns: 1fr;
    }
}

/* Feature Placeholder Cards */
.card-row-2-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.card-row-spaced {
    margin-top: 20px;
}

@media (max-width: 480px) {
    .card-row-2-2 {
        grid-template-columns: 1fr;
    }
}

.feature-placeholder-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.feature-card-with-text {
    min-height: auto;
    justify-content: flex-start;
    gap: 10px;
}

.feature-card-text {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
    font-weight: 400;
}

.feature-card-text strong {
    font-weight: 600;
}

.feature-card-with-icon {
    min-height: 300px;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    flex-direction: column;
}

.feature-card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
    display: block;
}

.dark-theme .feature-card-icon {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .feature-card-icon {
        filter: invert(1);
    }
}

.shortcut-keys {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
}

.shortcut-key-icon {
    width: 32px;
    height: 32px;
    display: block;
}

@media (max-width: 480px) {
    .shortcut-key-icon {
        width: 28px;
        height: 28px;
    }
}

.dark-theme .shortcut-key-icon {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .shortcut-key-icon {
        filter: invert(1);
    }
}

.shortcut-letter {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 400;
}

.feature-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.feature-image {
    height: 100%;
}

.card-row-square-images .feature-image {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
}

/* Hero Image Section */
.hero-image-section {
    margin-top: 80px;
    margin-bottom: 0;
    text-align: center;
}

.hero-section-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 0;
    display: block;
    border-radius: 0;
}

.hero-section-text {
    font-size: clamp(18px, 2.5vw, 20px);
    line-height: 1.6;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 0 auto 60px auto;
}

/* Features Grid */
.features-subtitle {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 600;
    color: var(--primary-color);
    margin: 60px 0 40px 0;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .features-subtitle {
        margin: 40px 0 28px 0;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 60px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 20px;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px 16px;
    }
}

.feature-item {
    text-align: left;
}

.feature-item-title {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.feature-item-text {
    font-size: clamp(14px, 1.5vw, 16px);
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.5;
}

/* App Showcase Cards */
.apps-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .apps-scroll-container {
        gap: 12px;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
}

.apps-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.apps-scroll-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.apps-scroll-container::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.card-row-thirds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.app-showcase-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    text-align: left !important;
    padding: 24px 16px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    color: inherit;
}


.app-card-icon {
    width: 130px;
    height: 130px;
    border-radius: 32px;
    margin: auto auto 20px auto;
    display: block;
}

@media (max-width: 480px) {
    .app-card-icon {
        width: 100px;
        height: 100px;
        border-radius: 24px;
        margin: auto auto 16px auto;
    }
}
    position: relative;
    z-index: 1;
}

.app-showcase-card::before {
    content: '';
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.dark-theme .app-showcase-card::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-theme):not(.dark-theme) .app-showcase-card::before {
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    }
}

.app-card-title {
    font-size: clamp(13px, 2.2vw, 15px);
    font-weight: 600;
    margin-top: auto;
    margin-bottom: 6px;
    margin-left: 0;
    margin-right: 0;
    line-height: 1.2;
}

.app-card-subtitle {
    font-size: clamp(12px, 1.8vw, 13px);
    margin: 0;
    line-height: 1.4;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .app-card-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .app-card-subtitle {
        font-size: 12px;
    }
}

.app-visit-link {
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s ease, text-decoration 0.2s ease;
    margin-top: 16px;
    align-self: flex-end;
}

.app-showcase-card:hover .app-visit-link,
.app-visit-link:hover {
    text-decoration: underline;
    opacity: 1;
}


@media (max-width: 480px) {
    .card-row-thirds {
        grid-template-columns: 1fr;
    }
}

.app-showcase-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.app-showcase-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

/* Placeholder Text */
.placeholder-text {
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 500;
}

/* FAQ Section - Apple-style Accordion */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-color);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    cursor: pointer;
    list-style: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    display: none;
    content: '';
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.faq-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%) rotate(45deg);
}

.faq-item[open] .faq-icon {
    transform: scaleY(-1);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
    overflow: hidden;
}

.faq-item[open] .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    overflow: hidden;
    padding-bottom: 0;
    transition: padding-bottom 0.3s ease-out;
}

.faq-item[open] .faq-answer-inner {
    padding-bottom: 24px;
}

.faq-answer p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--primary-color);
    margin: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease-out 0.05s, transform 0.25s ease-out 0.05s;
}

.faq-item[open] .faq-answer p {
    opacity: 1;
    transform: translateY(0);
}

/* Closing animation */
.faq-item.closing .faq-answer {
    grid-template-rows: 0fr;
}

.faq-item.closing .faq-answer-inner {
    padding-bottom: 0;
}

.faq-item.closing .faq-answer p {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.faq-item.closing .faq-icon {
    transform: scaleY(1);
}

@media (max-width: 480px) {
    .faq-question {
        padding: 20px 0;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .faq-item[open] .faq-answer-inner {
        padding-bottom: 20px;
    }

    .faq-answer p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 16px 0;
        font-size: 15px;
        min-height: 44px;
    }

    .faq-item[open] .faq-answer-inner {
        padding-bottom: 16px;
    }

    .faq-answer p {
        font-size: 13px;
        line-height: 1.5;
    }

    .faq-accordion {
        max-width: 100%;
    }
}

/* Footnotes */
.footnotes-section {
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    padding: 40px 20px 20px;
}

.footnotes {
    list-style-position: inside;
    margin: 0;
    padding: 0;
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.6;
}

.footnotes li {
    margin-bottom: 8px;
}

.footnote-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.footnote-link:hover {
    opacity: 0.7;
}

@media (max-width: 480px) {
    .footnotes-section {
        padding: 30px 16px 15px;
    }

    .footnotes {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .footnotes-section {
        padding: 24px 16px 12px;
    }

    .footnotes {
        font-size: 11px;
    }
}

/* Author Info */
.author-info {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    font-size: 13px;
    opacity: 0.7;
    text-align: center;
}

.author-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.author-info p {
    margin: 0;
    font-weight: 500;
}

.author-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.author-links a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.author-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.author-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    filter: invert(1) brightness(1.2);
}

.light-theme .author-icon {
    filter: invert(0);
}

.author-links a:hover .author-icon {
    opacity: 1;
}

@media (max-width: 480px) {
    .author-info {
        margin-top: 16px;
        padding-top: 16px;
        font-size: 12px;
    }

    .author-links {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .author-info {
        margin-top: 12px;
        padding-top: 12px;
        font-size: 11px;
    }

    .author-links {
        gap: 4px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px 40px;
    opacity: 0.6;
    font-size: 14px;
}

@media (max-width: 480px) {
    footer {
        padding: 40px 16px 30px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 32px 16px 24px;
        font-size: 12px;
        line-height: 1.5;
    }
}

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