@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: dark;

    --bg-page: #07080d;
    --bg-section: #0d111c;
    --bg-section-soft: #111827;
    --bg-card: rgba(17, 24, 39, 0.74);
    --bg-card-strong: rgba(15, 23, 42, 0.9);
    --border-subtle: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(147, 197, 253, 0.32);
    --text-main: #f8fafc;
    --text-muted: #a7b0c0;
    --text-soft: #cbd5e1;
    --accent: #60a5fa;
    --accent-strong: #38bdf8;
    --accent-warm: #f59e0b;
    --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.34);
    --shadow-glow: 0 24px 90px rgba(56, 189, 248, 0.15);
    --section-blend: rgba(96, 165, 250, 0.08);
    --chrome-bg: rgba(7, 8, 13, 0.95);
    --footer-bg: rgba(7, 8, 13, 0.92);
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --max-width: 1180px;
    --section-padding: clamp(4.5rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem);
    --radius-lg: 28px;
    --radius-md: 20px;
}

html[data-theme="light"] {
    color-scheme: light;

    --bg-page: #f7f9fc;
    --bg-section: #eef4fb;
    --bg-section-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.84);
    --bg-card-strong: rgba(255, 255, 255, 0.94);
    --border-subtle: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(37, 99, 235, 0.26);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-soft: #334155;
    --accent: #2563eb;
    --accent-strong: #0284c7;
    --shadow-card: 0 24px 70px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 24px 90px rgba(37, 99, 235, 0.12);
    --section-blend: rgba(37, 99, 235, 0.08);
    --chrome-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: rgba(255, 255, 255, 0.92);
}

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

html {
    height: 100%;
    scroll-behavior: smooth;
    scroll-snap-type: none;
}

html.no-smooth {
    scroll-behavior: auto;
}

body {
    min-height: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 34rem),
        radial-gradient(circle at 80% 8%, rgba(56, 189, 248, 0.1), transparent 28rem),
        var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.full-screen-section {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding: var(--section-padding);
}

.full-screen-section::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    z-index: 1;
    height: 10rem;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, var(--section-blend));
    content: "";
}

.full-screen-section > * {
    position: relative;
    z-index: 2;
}

.section-title {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto 2.75rem;
    color: var(--text-main);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    text-align: center;
}

.section-title::after {
    display: block;
    width: 52px;
    height: 3px;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    content: "";
}

#home {
    justify-content: flex-start;
    padding-top: 96px;
    background:
        linear-gradient(180deg, var(--chrome-bg) 0 96px, transparent 96px),
        radial-gradient(circle at 68% 48%, rgba(96, 165, 250, 0.18), transparent 24rem),
        var(--bg-section-soft);
}

.navbar {
    z-index: 100;
    display: grid;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 96px;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    margin: 0;
    padding: 0 max(clamp(1.25rem, 5vw, 4rem), calc((100vw - var(--max-width)) / 2));
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--chrome-bg);
    backdrop-filter: blur(18px);
}

.nav-logo,
.footer-logo {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.nav-logo {
    justify-self: start;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-self: center;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    border-color: var(--border-subtle);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    outline: none;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.055);
    color: var(--text-soft);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.menu-toggle {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.menu-toggle span {
    position: absolute;
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background-color: var(--text-main);
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle span:nth-child(1) {
    transform: translateY(-5px);
}

.menu-toggle span:nth-child(3) {
    transform: translateY(5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg);
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.menu-toggle:hover,
.menu-toggle:focus-visible {
    border-color: var(--border-strong);
    background-color: rgba(96, 165, 250, 0.12);
    color: var(--text-main);
    outline: none;
    transform: translateY(-1px);
}

.theme-toggle-icon {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15 0 50%, #60a5fa 50% 100%);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

html[data-theme="light"] .theme-toggle-icon {
    background: linear-gradient(135deg, #0f172a 0 50%, #e2e8f0 50% 100%);
}

.hero {
    z-index: 2;
    display: grid;
    width: 100%;
    max-width: var(--max-width);
    flex: 1;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 7vw, 5.5rem);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.45rem;
}

.hero-title {
    max-width: 720px;
    font-size: clamp(3.25rem, 7vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 0.96;
}

.hero-title span,
.hero-title strong {
    background: linear-gradient(120deg, #dbeafe 0%, #60a5fa 45%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 610px;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.4rem;
}

.store-btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: transform 180ms ease, filter 180ms ease;
}

.store-btn:hover,
.store-btn:focus-visible {
    filter: brightness(1.08);
    outline: none;
    transform: translateY(-2px);
}

.hero-store-img {
    height: 44px;
    width: auto;
}

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

.hero-image-container::before {
    content: none;
}

.hero-mockup {
    width: 100%;
    max-width: 50%;
    height: auto;
    border-radius: 15px;
}

.apps-section {
    background:
        linear-gradient(180deg, var(--bg-section-soft) 0%, var(--bg-section) 18%, var(--bg-section) 82%, var(--bg-section-soft) 100%),
        radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.08), transparent 28rem),
        var(--bg-section);
}

.apps-grid {
    display: grid;
    width: 100%;
    max-width: var(--max-width);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
    margin: 0 auto;
}

.app-card,
.next-project-card {
    border: 1px solid var(--border-subtle);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
        var(--bg-card);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.app-card {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.app-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.card-icon-container {
    margin-bottom: 1.45rem;
}

.app-icon-wrapper {
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.app-card-icon {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
}

.card-app-title {
    margin-bottom: 0.65rem;
    color: var(--text-main);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.card-app-desc {
    flex: 1;
    margin-bottom: 1.35rem;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.card-tags,
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    background-color: rgba(96, 165, 250, 0.09);
    color: #bfdbfe;
    font-size: 0.76rem;
    font-weight: 700;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.card-store-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-icon-link {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.footer-icon-link:hover,
.footer-icon-link:focus-visible {
    border-color: var(--border-strong);
    background-color: rgba(96, 165, 250, 0.12);
    outline: none;
    transform: translateY(-2px);
}

.inline-card-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.next-project-section {
    background:
        linear-gradient(180deg, var(--bg-section) 0%, var(--bg-section-soft) 22%, var(--bg-section-soft) 78%, var(--bg-section) 100%),
        radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.07), transparent 26rem),
        var(--bg-section-soft);
}

.next-project-section[hidden] {
    display: none;
}

.next-project-card-wrapper {
    display: flex;
    width: 100%;
    max-width: var(--max-width);
    justify-content: center;
    margin: 0 auto;
}

.next-project-card {
    width: min(100%, 780px);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3.25rem);
    text-align: center;
}

.project-teaser-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.project-teaser-title {
    margin-bottom: 0.8rem;
    color: var(--text-main);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.project-teaser-desc {
    max-width: 620px;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 1.03rem;
}

.progress-wrapper {
    width: min(100%, 460px);
    margin-bottom: 1.55rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.progress-percent {
    color: var(--text-main);
}

.progress-container {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.16);
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-warm), #facc15);
    transition: width 450ms ease;
}

.project-tech-tags {
    justify-content: center;
    margin-bottom: 0;
}

#stack-container {
    justify-content: space-between;
    padding-bottom: 0;
    background:
        linear-gradient(180deg, var(--bg-section-soft) 0%, var(--bg-section) 18%, var(--bg-section) 100%),
        radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.09), transparent 26rem),
        var(--bg-section);
}

body:not(.has-next-project) #stack-container {
    background:
        radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.12), transparent 26rem),
        var(--bg-section-soft);
}

.stack-section {
    display: flex;
    width: 100%;
    max-width: var(--max-width);
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.stack-subtitle {
    max-width: 620px;
    margin: -1.5rem auto 3.75rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    text-align: center;
}

.tech-row {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 1rem;
}

.tech-item {
    display: flex;
    min-height: 142px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.035);
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.tech-item:hover {
    border-color: var(--border-strong);
    background-color: rgba(96, 165, 250, 0.08);
    transform: translateY(-4px);
}

.tech-icon-wrapper {
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
}

.tech-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: saturate(0.86) brightness(0.78);
    transition: filter 180ms ease, transform 180ms ease;
}

.tech-item:hover .tech-img {
    filter: saturate(1) brightness(1);
    transform: scale(1.04);
}

.tech-name {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.footer {
    display: flex;
    width: 100vw;
    justify-content: center;
    margin: 4rem calc(50% - 50vw) 0;
    padding: 2.5rem clamp(1.25rem, 5vw, 4rem);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background-color: var(--footer-bg);
}

.footer-content-wrapper {
    display: flex;
    width: 100%;
    max-width: var(--max-width);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-link {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
    border-color: var(--border-strong);
    background-color: rgba(96, 165, 250, 0.12);
    outline: none;
    transform: translateY(-2px);
}

.footer-social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

html[data-theme="light"] #footer-link-github .footer-social-icon {
    filter: invert(1);
}

@media (max-width: 960px) {
    html {
        scroll-snap-type: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-mockup {
        max-width: 330px;
    }

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

@media (max-width: 720px) {
    :root {
        --section-padding: 4.25rem 1.15rem;
    }

    .full-screen-section {
        min-height: auto;
    }

    #home {
        padding-top: 76px;
        background:
            linear-gradient(180deg, var(--chrome-bg) 0 76px, transparent 76px),
            var(--bg-section-soft);
    }

    .navbar {
        grid-template-columns: 1fr auto auto;
        gap: 0.75rem;
        height: 76px;
        padding: 0 1.15rem;
    }

    .nav-logo {
        max-width: 12rem;
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        right: auto;
        left: 50%;
        width: 100vw;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0.45rem 1.15rem 0.85rem;
        border-top: 1px solid var(--border-subtle);
        border-bottom: 1px solid var(--border-subtle);
        border-radius: 0;
        background-color: var(--chrome-bg);
        box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -0.75rem);
        transition: opacity 180ms ease, transform 180ms ease;
        backdrop-filter: blur(18px);
    }

    .navbar.is-menu-open .nav-links {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        border-radius: 12px;
        padding: 0.78rem 0.9rem;
    }

    .theme-toggle {
        width: 2.35rem;
        height: 2.35rem;
    }

    .menu-toggle {
        display: inline-flex;
        width: 2.35rem;
        height: 2.35rem;
    }

    .hero {
        justify-items: center;
        padding: 3rem 0 1.5rem;
        overflow: hidden;
    }

    .hero-content,
    .hero-image-container {
        width: 100%;
    }

    .hero-title {
        max-width: 100%;
        font-size: clamp(2.55rem, 13vw, 3.25rem);
        letter-spacing: -0.065em;
    }

    .hero-description {
        width: min(100%, 320px);
        max-width: 320px;
        font-size: 0.98rem;
    }

    .hero-buttons {
        width: 100%;
        max-width: 210px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 0.65rem;
    }

    .store-btn {
        flex: 0 1 auto;
    }

    .hero-store-img {
        width: 100%;
        max-width: 210px;
        height: auto;
    }

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

    .app-card {
        min-height: 310px;
    }

    .next-project-card {
        border-radius: 22px;
    }

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

    .footer-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-left {
        align-items: center;
    }
}
