html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

:root {
    /* Flutter logo: #02569B, #0175C2, #13B9FD */
    --flutter-deep: #02569B;
    --flutter-mid: #0175C2;
    --flutter-sky: #13B9FD;
    --flutter: #02569B;

    /* Node.js logo: #339933, #3C873A */
    --nodejs: #339933;
    --nodejs-bright: #68A063;
    --nodejs-dark: #215732;

    --primary: #0c1a2e;
    --secondary: #5c6b7f;
    --accent: var(--flutter-mid);
    --accent-secondary: var(--nodejs);
    --accent-glow: rgba(1, 117, 194, 0.35);
    --accent-glow-green: rgba(51, 153, 51, 0.35);
    --gradient-brand: linear-gradient(135deg, var(--flutter-mid) 0%, var(--flutter-sky) 42%, var(--nodejs) 100%);
    --gradient-brand-hover: linear-gradient(135deg, var(--flutter-deep) 0%, var(--flutter-mid) 40%, var(--nodejs-dark) 100%);
    --gradient-text: linear-gradient(120deg, var(--flutter-mid), var(--flutter-sky) 50%, var(--nodejs) 100%);

    --whatsapp: #25D366;
    --bg-light: #f4f8fc;
    --bg-secondary: #eef4f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.85);
    --border: #dce6f0;
    --shadow-sm: 0 2px 8px rgba(2, 86, 155, 0.06);
    --shadow-md: 0 12px 24px -4px rgba(2, 86, 155, 0.12);
    --shadow-lg: 0 24px 40px -8px rgba(2, 86, 155, 0.15);
    --radius: 14px;
}

[data-theme="dark"] {
    --primary: #f0f7ff;
    --secondary: #94a3b8;
    --accent: var(--flutter-sky);
    --accent-glow: rgba(19, 185, 253, 0.35);
    --accent-glow-green: rgba(104, 160, 99, 0.35);
    --bg-light: #0a1219;
    --bg-secondary: #111c28;
    --bg-card: #152232;
    --text-main: #f0f7ff;
    --text-muted: #94a3b8;
    --glass: rgba(10, 18, 25, 0.88);
    --border: #243447;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 40px -8px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(19, 185, 253, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(51, 153, 51, 0.06), transparent 50%);
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section--alt {
    background-color: var(--bg-secondary);
}

/* --- Header & Navigation --- */
header {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 5px 0;
    box-shadow: var(--shadow-md);
    border-bottom-color: transparent;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--flutter-mid);
}

.logo span {
    color: var(--nodejs);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--flutter-mid);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
    color: var(--flutter-sky);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.05rem;
    color: var(--flutter-mid);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--nodejs);
    border-color: var(--nodejs-bright);
    transform: rotate(-12deg);
}

[data-theme="dark"] .theme-toggle {
    color: var(--flutter-sky);
}

/* --- Mobile Menu Burger --- */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--gradient-brand);
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background:
        radial-gradient(circle at 85% 15%, rgba(19, 185, 253, 0.14), transparent 45%),
        radial-gradient(circle at 10% 85%, rgba(51, 153, 51, 0.12), transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(1, 117, 194, 0.05), transparent 60%);
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    margin-bottom: 28px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-brand);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -2px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--primary);
}

.hero-stack {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stack-tag {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-stack-tag--flutter {
    background: rgba(1, 117, 194, 0.12);
    color: var(--flutter-deep);
    border: 1px solid rgba(1, 117, 194, 0.25);
}

.hero-stack-tag--node {
    background: rgba(51, 153, 51, 0.12);
    color: var(--nodejs-dark);
    border: 1px solid rgba(51, 153, 51, 0.3);
}

[data-theme="dark"] .hero-stack-tag--flutter {
    color: var(--flutter-sky);
    background: rgba(19, 185, 253, 0.12);
    border-color: rgba(19, 185, 253, 0.25);
}

[data-theme="dark"] .hero-stack-tag--node {
    color: var(--nodejs-bright);
    background: rgba(104, 160, 99, 0.15);
    border-color: rgba(104, 160, 99, 0.35);
}

.hero p {
    max-width: 650px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.15rem;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tech-logos {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 56px;
    margin-bottom: 40px;
}

.tech-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-logo-wrap:hover {
    transform: translateY(-6px);
}

.tech-logo {
    height: 52px;
    filter: drop-shadow(0 4px 12px rgba(2, 86, 155, 0.15));
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-logo-wrap--node .tech-logo {
    filter: drop-shadow(0 4px 12px rgba(51, 153, 51, 0.2));
}

.tech-logo-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tech-logo-wrap--flutter .tech-logo-label {
    color: var(--flutter-mid);
}

.tech-logo-wrap--node .tech-logo-label {
    color: var(--nodejs);
}

/* --- Buttons --- */
.btn {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 18px var(--accent-glow), 0 2px 8px var(--accent-glow-green);
}

.btn-primary:hover {
    background: var(--gradient-brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(1, 117, 194, 0.35), 0 4px 12px rgba(51, 153, 51, 0.2);
}

.btn-outline {
    border-color: var(--flutter-mid);
    color: var(--flutter-deep);
    background: transparent;
}

[data-theme="dark"] .btn-outline {
    border-color: var(--flutter-sky);
    color: var(--flutter-sky);
}

.btn-outline:hover {
    background: rgba(1, 117, 194, 0.08);
    border-color: var(--nodejs);
    color: var(--nodejs-dark);
}

[data-theme="dark"] .btn-outline:hover {
    background: rgba(51, 153, 51, 0.12);
    color: var(--nodejs-bright);
}

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: var(--gradient-brand);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- About --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    background: var(--gradient-brand);
    opacity: 0.35;
    z-index: 0;
}

.about-image img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.02);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-links a:hover {
    border-color: var(--flutter-mid);
    color: var(--flutter-mid);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.social-links a:nth-child(2):hover {
    border-color: var(--nodejs);
    color: var(--nodejs);
}

/* --- Skills --- */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    border-top: 3px solid var(--border);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.skill-card--flutter {
    border-top-color: var(--flutter-mid);
}

.skill-card--flutter:hover {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(1, 117, 194, 0.15);
}

.skill-card--node {
    border-top-color: var(--nodejs);
}

.skill-card--node:hover {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(51, 153, 51, 0.15);
}

.skill-card i {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.skill-card i.icon-flutter {
    color: var(--flutter-mid);
}

.skill-card i.icon-node {
    color: var(--nodejs);
}

.skill-card img.skill-logo {
    height: 50px;
    margin-bottom: 15px;
    object-fit: contain;
}

.skill-card img.skill-logo--oauth {
    height: 80px;
    width: 80px;
}

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

.skill-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--gradient-brand);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    opacity: 0.85;
}

.timeline-item {
    padding: 20px 0;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 3px solid var(--flutter-mid);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(1, 117, 194, 0.15);
}

.timeline-item.right::after {
    border-color: var(--nodejs);
    box-shadow: 0 0 0 4px rgba(51, 153, 51, 0.15);
}

.left {
    left: 0;
    padding-right: 50px;
    text-align: right;
}

.right {
    left: 50%;
    padding-left: 50px;
}

.left::after {
    right: -9px;
}

.right::after {
    left: -9px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(1, 117, 194, 0.25);
}

.timeline-date {
    color: var(--flutter-mid);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.right .timeline-date {
    color: var(--nodejs);
}

/* --- Education --- */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.education-item {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.education-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-item:hover::before {
    opacity: 1;
}

.education-item h3 {
    font-size: 1.25rem;
    color: var(--primary);
    line-height: 1.3;
}

.education-item p {
    color: var(--text-muted);
}

.education-date {
    font-weight: 700;
    color: var(--flutter-mid);
    font-size: 0.9rem;
}

/* --- Projects & Blogs --- */
.projects-container,
.blogs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.project-card,
.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.project-card:hover,
.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(1, 117, 194, 0.2);
}

.project-image,
.blog-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.project-image img,
.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(2, 86, 155, 0.55));
}

.project-content,
.blog-content {
    padding: 28px;
}

.project-features {
    list-style: none;
    margin: 15px 0 24px;
}

.project-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-features li i {
    color: var(--flutter-mid);
    width: 1.1rem;
}

.project-features li:nth-child(even) i {
    color: var(--nodejs);
}

.project-links a {
    color: var(--flutter-mid);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.project-links a:hover {
    color: var(--nodejs);
}

.project-links a::after {
    content: '→';
}

.read-more {
    color: var(--flutter-mid);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--nodejs);
}

.section-cta {
    text-align: center;
    margin-top: 50px;
}

.section-cta--blogs {
    margin-top: 40px;
}

/* --- Contact Section --- */
.contact-simple {
    background:
        radial-gradient(circle at 20% 50%, rgba(19, 185, 253, 0.08), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(51, 153, 51, 0.08), transparent 50%),
        var(--bg-secondary);
    padding: 80px 0;
}

.contact-simple .section-title h2 {
    color: var(--primary);
}

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

.contact-option {
    padding: 16px 32px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.contact-option.whatsapp {
    background: var(--whatsapp);
    color: white;
}

.contact-option.email {
    background: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--flutter-mid);
}

.contact-option.email:hover {
    border-color: var(--nodejs);
    color: var(--nodejs-dark);
}

[data-theme="dark"] .contact-option.email:hover {
    color: var(--nodejs-bright);
}

.contact-option:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- Floating Elements --- */
.whatsapp-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--whatsapp);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* --- Footer --- */
footer {
    position: relative;
    background: linear-gradient(165deg, #051018 0%, #0a1a12 55%, #051018 100%);
    color: rgba(255, 255, 255, 0.65);
    padding: 48px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
}

footer p + p {
    margin-top: 6px;
}

.footer-tagline {
    margin-top: 12px;
    font-weight: 600;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        gap: 40px;
    }

    .about-text {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .timeline::after {
        left: 32px;
    }

    .timeline-item {
        width: 100%;
        padding: 20px 0 20px 70px;
        text-align: left;
    }

    .timeline-item::after {
        left: 24px;
    }

    .left,
    .right {
        left: 0;
        padding-right: 0;
        text-align: left;
    }

    .left::after,
    .right::after {
        left: 24px;
        right: auto;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero {
        padding: 140px 0 60px;
    }

    .contact-options {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.75rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .tech-logos {
        gap: 28px;
    }
}
