:root {
    font-family: "InterVariable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f6f6f9;
    --surface: rgba(13, 18, 33, 0.9);
    --surface-strong: rgba(19, 25, 48, 0.95);
    --accent: #7c5dff;
    --accent-2: #f472b6;
    --accent-3: #22d3ee;
    --border: rgba(255, 255, 255, 0.2);
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1e1b4b 0%, #05040c 60%) fixed;
    overflow-x: hidden;
    animation: gradientShift 24s ease-in-out infinite alternate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 0, 153, 0.25), transparent 55%),
                radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.25), transparent 45%);
    filter: blur(60px);
    z-index: -1;
}

.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0 2rem;
}

.site-header nav a {
    color: #c3dafe;
    margin-right: 1rem;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.site-header nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.3rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s ease;
}

.site-header nav a:hover::after {
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.2rem;
}

.lang-switcher select {
    background: var(--surface);
    color: inherit;
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 3.5rem 2rem;
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(124, 93, 255, 0.25), rgba(34, 211, 238, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.4), transparent 55%);
    opacity: 0.6;
    pointer-events: none;
    animation: floaty 12s ease-in-out infinite alternate;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    font-size: 0.8rem;
    color: #7dd3fc;
    margin-bottom: 0.5rem;
}

h1, h2, h3 {
    color: #f9fafb;
    margin: 0.2rem 0 0.6rem;
}

.tagline {
    color: #d1d5db;
    font-size: 1.1rem;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.btn {
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 93, 255, 0.3);
}

.btn:hover::after {
    opacity: 1;
}

.btn.primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #fff;
}

.btn.secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #e0e7ff;
    background: rgba(255, 255, 255, 0.05);
}

.metrics {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.metric {
    background: rgba(5, 6, 10, 0.6);
    border-radius: 1.25rem;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    animation: pulse 6s ease-in-out infinite;
}

.metric .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
}

.section {
    padding: 3.5rem 0;
    position: relative;
}

[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

[data-animate].is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

[data-animate="fade"] {
    opacity: 0;
    transform: translateY(30px);
}

[data-animate="fade"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="slide-left"] {
    opacity: 0;
    transform: translateX(-60px);
}

[data-animate="slide-right"] {
    opacity: 0;
    transform: translateX(60px);
}

[data-animate="slide-up"] {
    opacity: 0;
    transform: translateY(60px);
}

[data-animate="zoom-in"] {
    opacity: 0;
    transform: scale(0.85);
}

[data-animate="slide-left"].is-visible {
    opacity: 1;
    transform: translateX(0);
}

[data-animate="slide-right"].is-visible {
    opacity: 1;
    transform: translateX(0);
}

[data-animate="slide-up"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="zoom-in"].is-visible {
    opacity: 1;
    transform: scale(1);
}

.section-header {
    margin-bottom: 1.5rem;
}

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

.highlight-list,
.bullet-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #cbd5f5;
}

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

.card {
    background: var(--surface);
    border-radius: 1.25rem;
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 93, 255, 0.6);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    background: var(--surface-strong);
    border-radius: 1.75rem;
    padding: 2.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(124, 93, 255, 0.2), rgba(244, 114, 182, 0.15));
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.project-card > * {
    position: relative;
}

.tech-tags span {
    background: rgba(125, 211, 252, 0.2);
    color: #7dd3fc;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    margin-right: 0.4rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tech-tags span::before {
    content: "•";
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.project-links a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: #f472b6;
    text-decoration: none;
    margin-right: 1rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.project-links a:hover {
    transform: translateX(4px);
}

.contact {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.75rem;
    padding: 3.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-links {
    list-style: none;
    padding: 0;
}

.contact-links li {
    margin-bottom: 0.75rem;
}

form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #d1d5db;
    font-weight: 600;
    margin-bottom: 1rem;
}

input, textarea, select {
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 6, 10, 0.6);
    padding: 0.95rem 1.1rem;
    color: #f5f5f7;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-3);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
    outline: none;
}

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

.flash {
    padding: 0.85rem 1.35rem;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flash-success {
    background: rgba(16, 185, 129, 0.2);
}

.flash-error {
    background: rgba(248, 113, 113, 0.2);
}

.site-footer {
    text-align: center;
    color: #cdd5ff;
    padding-top: 3rem;
}

.site-footer a {
    color: inherit;
}

.intro-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(124, 93, 255, 0.4), transparent 60%),
                radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.35), transparent 55%),
                #05040c;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
    animation: introPop 1.2s ease;
}

.intro-logo {
    display: inline-flex;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 20px 60px rgba(124, 93, 255, 0.4);
    margin-bottom: 1rem;
}

.intro-content p {
    color: #e0e7ff;
    letter-spacing: 0.1em;
}

.blog-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.blog-card h2 a,
.blog-card h3 a {
    color: #f8fafc;
    text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
    color: var(--accent-3);
}

.blog-cover {
    width: 100%;
    padding-top: 56%;
    border-radius: 1rem;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-detail {
    max-width: 800px;
    margin: 0 auto;
}

.blog-detail .detail-cover {
    width: 100%;
    padding-top: 50%;
    border-radius: 1.5rem;
    background-size: cover;
    background-position: center;
    margin: 2rem 0;
}

.article-body {
    line-height: 1.8;
    color: #e2e8f0;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    color: #cbd5f5;
}

.pagination a {
    color: #f472b6;
    text-decoration: none;
    font-weight: 600;
}

.blog-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.back-link {
    color: #a5f3fc;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    .hero {
        padding: 2.5rem 1.5rem;
    }

    .metrics {
        justify-content: space-between;
    }

    .project-card {
        padding: 1.75rem;
    }

    .contact {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics {
        flex-direction: column;
    }

    .page-shell {
        padding: 1.5rem;
    }

    .cta-group {
        width: 100%;
    }

    .cta-group .btn {
        flex: 1 1 100%;
        text-align: center;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 600px) {
    .hero {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.25rem;
    }

    .metrics {
        flex-direction: column;
    }

    .contact {
        padding: 2rem 1.5rem;
    }

    .site-header nav a {
        margin-right: 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow: 0 20px 45px rgba(124, 93, 255, 0.35);
    }
    100% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 50% 100%;
        filter: hue-rotate(30deg);
    }
    100% {
        background-position: 100% 50%;
        filter: hue-rotate(0deg);
    }
}

@keyframes floaty {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(-15px, 15px, 0) scale(1.05);
    }
}

@keyframes introPop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

