/* ============================================================
   byvto.li — Modern Landing Page Styles
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Dark theme (default) */
    --color-bg: #0a0a0f;
    --color-surface: #13131a;
    --color-surface-2: #1a1a24;
    --color-border: #252530;
    --color-text: #e4e4ec;
    --color-text-muted: #8888a0;
    --color-primary: #6366f1;
    --color-primary-hover: #818cf8;
    --color-accent: #22d3ee;
    --color-hero-gradient-1: rgba(99,102,241,.12);
    --color-hero-gradient-2: rgba(34,211,238,.06);
    --color-header-bg: rgba(10,10,15,.8);
    --color-card-icon-bg: color-mix(in srgb, var(--color-primary) 12%, transparent);
    --color-badge-bg: rgba(251,191,36,.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.3);
    --shadow-glow: 0 0 60px rgba(99,102,241,.15);
    --shadow-btn: 0 4px 20px rgba(99,102,241,.35);
    --shadow-btn-hover: 0 6px 28px rgba(99,102,241,.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

/* Light theme */
[data-theme="light"] {
    --color-bg: #f5f5f9;
    --color-surface: #ffffff;
    --color-surface-2: #f0f0f5;
    --color-border: #e0e0e8;
    --color-text: #1a1a2e;
    --color-text-muted: #6b6b80;
    --color-primary: #4f46e5;
    --color-primary-hover: #6366f1;
    --color-accent: #0891b2;
    --color-hero-gradient-1: rgba(79,70,229,.06);
    --color-hero-gradient-2: rgba(8,145,178,.04);
    --color-header-bg: rgba(255,255,255,.85);
    --color-card-icon-bg: rgba(79,70,229,.08);
    --color-badge-bg: rgba(217,119,6,.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
    --shadow-glow: 0 0 60px rgba(79,70,229,.1);
    --shadow-btn: 0 4px 20px rgba(79,70,229,.25);
    --shadow-btn-hover: 0 6px 28px rgba(79,70,229,.35);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ── Container ─────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

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

.btn--outline:hover {
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Theme Toggle */
.btn--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.btn--icon:hover {
    color: var(--color-text);
    border-color: var(--color-text-muted);
    background: var(--color-surface-2);
}

.btn--icon .icon-sun,
.btn--icon .icon-moon {
    transition: transform 0.35s ease, opacity 0.25s ease;
}

[data-theme="dark"] .btn--icon .icon-sun,
:root:not([data-theme="light"]) .btn--icon .icon-sun {
    display: inline;
}

[data-theme="dark"] .btn--icon .icon-moon,
:root:not([data-theme="light"]) .btn--icon .icon-moon {
    display: none;
}

[data-theme="light"] .btn--icon .icon-sun {
    display: none;
}

[data-theme="light"] .btn--icon .icon-moon {
    display: inline;
}

/* ── Header ────────────────────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
}

.logo__icon {
    font-size: 1.5rem;
}

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

.nav__link {
    color: var(--color-text-muted);
    font-size: 0.925rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav__link:hover {
    color: var(--color-text);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 120px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, var(--color-hero-gradient-1), transparent),
        radial-gradient(ellipse 60% 50% at 80% 80%, var(--color-hero-gradient-2), transparent);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #e4e4ec 0%, #6366f1 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 800px;
}

[data-theme="light"] .hero__title {
    background: linear-gradient(135deg, #1a1a2e 0%, #4f46e5 50%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    line-height: 1.7;
}

.hero__cta {
    margin-top: 12px;
}

/* ── About ─────────────────────────────────────────────────────── */
.about {
    padding: 40px 0 80px;
}

.about__card {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 48px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.about__text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ── Section Title ─────────────────────────────────────────────── */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 56px;
    letter-spacing: -0.01em;
}

/* ── Projects Grid ─────────────────────────────────────────────── */
.projects {
    padding: 80px 0 100px;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.projects__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 80px 20px;
    font-size: 1.1rem;
}

/* ── Project Card ──────────────────────────────────────────────── */
.project-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(99,102,241,.07), transparent 40%);
    transition: opacity var(--transition);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.project-card--soon {
    opacity: 0.7;
    cursor: default;
}

.project-card--soon:hover {
    border-color: var(--color-border);
    transform: none;
    box-shadow: var(--shadow-card);
}

.project-card--soon:hover::before {
    opacity: 0;
}

.project-card__icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-card-icon-bg);
    border-radius: var(--radius-md);
    font-size: 1.6rem;
}

.project-card__content {
    flex: 1;
    min-width: 0;
}

.project-card__name {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.project-card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
    background: var(--color-badge-bg);
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="light"] .project-card__badge {
    color: #b45309;
}

.project-card__subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.project-card__desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__arrow {
    flex-shrink: 0;
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition);
    align-self: center;
}

.project-card:hover .project-card__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--color-primary-hover);
}

.project-card--soon .project-card__arrow {
    display: none;
}

/* ── CTA ───────────────────────────────────────────────────────── */
.cta {
    padding: 40px 0 100px;
}

.cta__card {
    max-width: 700px;
    margin: 0 auto;
    padding: 56px 48px;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.cta__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta__text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
    margin-top: auto;
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.footer__links {
    display: flex;
    gap: 20px;
}

.footer__link {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer__link:hover {
    color: var(--color-text);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .nav {
        display: none;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }

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

    .project-card {
        padding: 20px;
        gap: 14px;
    }

    .about__card {
        padding: 24px 20px;
    }

    .cta__card {
        padding: 32px 24px;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.5s ease both;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.3s; }
.project-card:nth-child(7) { animation-delay: 0.35s; }
.project-card:nth-child(8) { animation-delay: 0.4s; }
