:root {
    color-scheme: dark;
    --bg: #050712;
    --surface: rgba(5, 7, 18, 0.92);
    --surface-strong: rgba(9, 14, 33, 0.96);
    --surface-soft: rgba(10, 18, 44, 0.72);
    --border: rgba(105, 170, 255, 0.18);
    --text: #e9f1ff;
    --muted: #aab6cf;
    --accent: #50e3ff;
    --accent-2: #7c4dff;
    --accent-3: #4b96ff;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    --radius: 28px;
    --radius-sm: 18px;
    --max-width: 1180px;
    --transition: 0.35s ease;
}

.light-mode {
    color-scheme: light;
    --bg: #f7f8fc;
    --surface: rgba(255, 255, 255, 0.95);
    --surface-strong: rgba(255, 255, 255, 1);
    --surface-soft: rgba(244, 247, 255, 0.9);
    --border: rgba(79, 141, 255, 0.12);
    --text: #0f172a;
    --muted: #64748b;
    --accent: #0f7cff;
    --accent-2: #7c4dff;
    --accent-3: #0f62ff;
    --shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top, rgba(79, 141, 255, 0.18), transparent 22%),
                radial-gradient(circle at 20% 20%, rgba(92, 229, 255, 0.08), transparent 16%),
                var(--bg);
    color: var(--text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea {
    font: inherit;
}

.site-shell {
    position: relative;
    overflow-x: hidden;
}

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(18px);
    background: rgba(5, 7, 18, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background var(--transition), box-shadow var(--transition);
}

.site-header.header-scrolled {
    background: rgba(5, 7, 18, 0.92);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.nav-menu.nav-open {
    display: grid;
    gap: 1rem;
    position: absolute;
    top: 100%;
    right: 1.5rem;
    background: rgba(5, 7, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 1rem 1.25rem;
    width: min(260px, 80vw);
}

.nav-menu.nav-open li a {
    display: block;
    padding: 0.55rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.primary-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li a {
    color: var(--muted);
    transition: color var(--transition);
}

.nav-menu li a:hover,
.nav-menu li .current-menu-item > a {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-toggle,
.theme-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 999px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 1.4rem;
    height: 2px;
    background: currentColor;
    position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle span::before {
    top: -6px;
}

.nav-toggle span::after {
    top: 6px;
}

.hero-section {
    min-height: 88vh;
    display: grid;
    align-items: center;
    padding: 4rem 0 3rem;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(80, 227, 255, 0.12), transparent 18%),
                radial-gradient(circle at top right, rgba(124, 77, 255, 0.1), transparent 25%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 2rem;
    align-items: center;
}

.hero-copy .eyebrow,
.section .eyebrow {
    display: inline-flex;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 0.78rem;
}

.hero-copy h1 {
    font-size: clamp(3rem, 4vw, 5.2rem);
    line-height: 0.98;
    margin: 0;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted);
    margin: 1.75rem 0 2rem;
    line-height: 1.9;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.95rem 1.85rem;
    font-weight: 700;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.button-glow {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #050712;
    box-shadow: 0 20px 60px rgba(80, 227, 255, 0.28);
}

.button-glow:hover {
    transform: translateY(-2px);
}

.button-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.code-panel {
    background: rgba(12, 18, 41, 0.92);
    border-radius: 28px;
    border: 1px solid rgba(79, 141, 255, 0.14);
    padding: 1.5rem;
}

.code-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.code-dots span {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    margin-left: 0.35rem;
}

.code-panel pre {
    margin: 0;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.94rem;
    color: #d8f8ff;
    line-height: 1.75;
}

.stats-bar {
    padding: 2.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(15, 24, 47, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 1.7rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
}

.stat-card span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--accent);
}

.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2.25rem;
}

.section-header h2 {
    font-size: clamp(2.35rem, 2.6vw, 3.25rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--muted);
    line-height: 1.9;
    margin: 0 auto;
}

.cards-grid,
.portfolio-grid,
.pricing-grid,
.testimonial-grid,
.posts-grid,
.archive-card,
.featured-grid,
.contact-grid {
    display: grid;
    gap: 1.5rem;
}

.cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.glow-card,
.service-card,
.project-card,
.pricing-card,
.testimonial-card,
.post-card,
.archive-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.glow-card::before,
.service-card::before,
.pricing-card::before,
.testimonial-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(80, 227, 255, 0.2), rgba(124, 77, 255, 0.2));
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: inherit;
}

.glow-card:hover::before,
.service-card:hover::before,
.pricing-card:hover::before,
.testimonial-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    margin-bottom: 1.35rem;
    background: linear-gradient(135deg, rgba(80, 227, 255, 0.45), rgba(124, 77, 255, 0.35));
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12);
}

.glow-card h3,
.service-card h3,
.project-copy h3,
.pricing-card h3,
.testimonial-copy h4,
.post-copy h3,
.archive-copy h3 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
}

.glow-card p,
.service-card p,
.project-copy p,
.pricing-card p,
.testimonial-copy p,
.post-copy p,
.archive-copy p {
    color: var(--muted);
    line-height: 1.85;
}

.service-card {
    transition: transform var(--transition), border-color var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(80, 227, 255, 0.22);
}

.portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    padding: 0;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-copy {
    padding: 1.45rem 1.5rem 1.75rem;
}

.project-label {
    display: inline-flex;
    color: var(--accent);
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

.section-featured {
    padding-top: 0;
}

.featured-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.featured-copy h2 {
    margin-top: 0;
    font-size: clamp(2.7rem, 3.1vw, 3.9rem);
}

.featured-copy p {
    color: var(--muted);
    max-width: 640px;
}

.featured-image {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 360px;
    background: rgba(255, 255, 255, 0.04);
}

.placeholder-box {
    min-height: 360px;
    background: linear-gradient(135deg, rgba(12, 18, 41, 0.95), rgba(22, 30, 58, 0.95));
}

.pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
    padding: 2rem;
}

.pricing-card.featured-plan {
    border-color: rgba(80, 227, 255, 0.22);
    transform: scale(1.04);
}

.price {
    display: block;
    margin: 1rem 0;
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--accent);
}

.tier-copy {
    color: var(--muted);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 1.5rem;
}

.pricing-card li {
    margin-bottom: 0.9rem;
    color: var(--muted);
}

.testimonial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1.25rem;
}

.testimonial-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(80, 227, 255, 0.4), rgba(124, 77, 255, 0.35));
    color: var(--text);
    font-weight: 700;
}

.cta-hero {
    background: linear-gradient(135deg, rgba(80, 227, 255, 0.12), rgba(124, 77, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
}

.cta-grid {
    grid-template-columns: 1.35fr minmax(200px, 0.65fr);
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-panel {
    padding: 3.5rem 0 5rem;
}

.contact-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 2.75rem 2rem;
    background: rgba(10, 18, 44, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
    padding: 3.5rem 0 2rem;
}

.footer-brand a,
.footer-links a,
.footer-social a {
    color: var(--text);
}

.footer-links ul {
    padding: 0;
    list-style: none;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.85rem;
}

.social-row {
    display: flex;
    gap: 0.85rem;
}

.social-row a {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copy {
    text-align: center;
    padding: 1.35rem 0 2rem;
    color: var(--muted);
}

.post-card,
.archive-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
}

.post-copy,
.archive-copy {
    display: grid;
    gap: 0.75rem;
}

.post-meta {
    color: var(--accent);
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.read-more {
    color: var(--accent);
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.error-404 {
    min-height: 60vh;
    display: grid;
    align-items: center;
}

.error-grid {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6rem 0;
}

.error-grid h1 {
    font-size: clamp(4.5rem, 9vw, 7rem);
    margin: 0 0 1rem;
}

.reveal-from-bottom {
    opacity: 0;
    transform: translateY(25px);
    animation: reveal .8s forwards ease-out;
}

.reveal-from-left {
    opacity: 0;
    transform: translateX(-20px);
    animation: reveal .8s forwards ease-out;
}

.reveal-from-right {
    opacity: 0;
    transform: translateX(20px);
    animation: reveal .8s forwards ease-out;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@media (max-width: 960px) {
    .hero-grid,
    .featured-grid,
    .pricing-grid,
    .cards-grid,
    .testimonial-grid,
    .footer-grid,
    .post-card,
    .archive-card {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding-top: 3rem;
    }
}

@media (max-width: 720px) {
    .nav-menu,
    .header-actions {
        display: none;
    }

    .header-inner {
        justify-content: space-between;
    }

    .hero-copy h1 {
        font-size: clamp(2.6rem, 9vw, 3.7rem);
    }

    .contact-grid,
    .cta-grid {
        padding: 2rem;
    }

    .site-header {
        padding: 0.6rem 0;
    }
}
