/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    /* Dark theme (default) */
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1a1a28;
    --border: #2a2a3e;
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.15);
    --accent: #00d2ff;
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --nav-bg: rgba(10, 10, 15, 0.8);
    --card-hover-bg: rgba(108, 92, 231, 0.1);
}

[data-theme="light"] {
    --bg: #f5f5fa;
    --surface: #ffffff;
    --surface2: #f0f0f5;
    --border: #d0d0e0;
    --primary: #6c5ce7;
    --primary-glow: rgba(108, 92, 231, 0.08);
    --accent: #0099cc;
    --text: #1a1a2e;
    --text-muted: #6b6b80;
    --shadow: 0 8px 32px rgba(0,0,0,0.08);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --card-hover-bg: rgba(108, 92, 231, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== ANIMATED BG ===== */
.bg-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    top: -30vh; left: -20vw;
    width: 80vw; height: 80vh;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: var(--card-hover-bg);
    color: var(--text);
    transform: rotate(15deg);
}

#langToggle {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    width: auto !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    letter-spacing: 0.5px;
}

#langToggle:hover {
    transform: none !important;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero .bio {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn {
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b7cf7);
    color: white;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-2px);
}

/* ===== AVATAR ===== */
.hero-avatar {
    flex-shrink: 0;
    position: relative;
}

.avatar-ring {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 4px;
    animation: pulse-ring 3s ease-in-out infinite;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transition: transform 0.5s ease;
}

.avatar-ring:hover .avatar-inner img {
    transform: scale(1.05);
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.3); }
    50% { box-shadow: 0 0 0 20px rgba(108, 92, 231, 0); }
}

/* ===== SECTIONS ===== */
section {
    padding: 100px 0;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 48px;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.skill-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s;
    cursor: default;
}

.skill-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: var(--surface2);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.skill-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

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

.project-card:hover::before {
    transform: scaleX(1);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    font-size: 0.75rem;
    color: var(--primary);
}

/* ===== CONTACT ===== */
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.contact-link:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-2px);
}

/* ===== INTERESTS TAGS ===== */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.interest-tag {
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    font-size: 0.8rem;
    color: var(--primary);
    transition: all 0.3s;
}

.interest-tag:hover {
    background: rgba(108, 92, 231, 0.2);
    transform: translateY(-2px);
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

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

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

.service-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ===== LAB / FARMING / BLOG ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

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

.content-card .card-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.content-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.content-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.content-card ul {
    list-style: none;
    padding: 0;
}

.content-card ul li {
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-left: 16px;
    position: relative;
}

.content-card ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* ===== FOCUS ===== */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.focus-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 18px;
    text-align: center;
    transition: all 0.3s;
    cursor: default;
}

.focus-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: var(--surface2);
}

.focus-item .focus-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.focus-item span {
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
}

/* ===== BLOG SECTION ===== */
.blog-cat {
    margin-bottom: 24px;
}

.blog-cat:last-child {
    margin-bottom: 0;
}

.blog-cat h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.blog-posts {
    list-style: none;
    padding: 0;
}

.blog-posts li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    cursor: default;
}

.blog-posts li:last-child {
    border-bottom: none;
}

.blog-posts li::before {
    content: '📄';
    position: absolute;
    left: 0;
    font-size: 0.75rem;
}

.blog-posts li:hover {
    color: var(--text);
    padding-left: 24px;
}

/* ===== ABOUT REFINED ===== */
.about-intro {
    max-width: 700px;
    margin-bottom: 32px;
}

.about-intro p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 16px;
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .hero h1 { font-size: 2.5rem; }
    .hero .bio { max-width: 100%; }
    .hero-actions { justify-content: center; }

    .avatar-ring {
        width: 200px;
        height: 200px;
    }

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

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .contact-card {
        padding: 32px 20px;
    }

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

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

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

    .interests-grid {
        justify-content: center;
    }
}
