/* ---------------------------
   Global Styles & Variables
---------------------------- */
:root {
    --bg: #0a0e27;
    --bg-secondary: #12172f;
    --text: #ffffff;
    --text-muted: #a0a0b8;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-hover: #4f46e5;
    --card-bg: #161d3f;
    --border: #2a3155;
    --success: #10b981;
    --warning: #f59e0b;
}

html[data-theme="light"] {
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --text: #111111;
    --text-muted: #666666;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-hover: #4f46e5;
    --card-bg: #f3f4f6;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
}

/* Cache bust: v2024-blink-animation */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ---------------------------
        Navigation
---------------------------- */
nav {
    background: rgba(10, 14, 39, 0.95);
    border-bottom: 2px solid var(--accent);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

html[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
}

nav .container {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

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

.lightning {
    display: inline-block;
    color: #ffff00;
    text-shadow: 0 0 2px rgba(255, 255, 0, 0.5);
    font-weight: bold;
}

@keyframes stutter-blink {
    0% {
        opacity: 1;
        text-shadow: 0 0 2px rgba(251, 191, 36, 0.3);
    }
    10% {
        opacity: 0.4;
        text-shadow: 0 0 1px rgba(251, 191, 36, 0.2);
    }
    20% {
        opacity: 1;
        text-shadow: 0 0 2px rgba(251, 191, 36, 0.3);
    }
    30% {
        opacity: 0.3;
        text-shadow: 0 0 1px rgba(251, 191, 36, 0.2);
    }
    40% {
        opacity: 1;
        text-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 2px rgba(251, 191, 36, 0.3);
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-light);
}

nav ul li a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--accent);
    color: var(--text);
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--accent);
    transform: scale(1.1) rotate(20deg);
}

/* ---------------------------
          Hero Section
---------------------------- */
.hero {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1829 50%, #1a1f3a 100%);
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

html[data-theme="light"] .hero {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 50%, #f0f4ff 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.08), transparent);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-decorative {
    position: absolute;
    font-size: 5rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.hero-deco-left {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.hero-deco-right {
    bottom: 15%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(20px) rotate(5deg); }
}

.led-indicator {
    display: none;
}

.led {
    display: none;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
        box-shadow: 0 0 10px #ef4444, inset 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50%, 100% {
        opacity: 0.3;
        box-shadow: 0 0 5px #ef4444;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

html[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #111111, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.cta-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-content p:last-child {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn {
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-light);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ---------------------------
          Containers
---------------------------- */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ---------------------------
        About Section
---------------------------- */
#about {
    padding: 80px 20px 60px 20px;
}

.about-section {
    padding: 80px 20px 60px 20px !important;
    overflow: visible !important;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    margin-top: 20px;
}

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

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

.interests {
    margin-top: 10px;
    display: grid;
    gap: 15px;
}

.interest-item {
    padding: 18px;
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.interest-item:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent);
    transform: translateX(5px);
}

.interest-item strong {
    font-size: 1.05rem;
    color: var(--accent-light);
    display: block;
    margin-bottom: 8px;
}

.interest-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ---------------------------
       Skills Section
---------------------------- */
.skills-section {
    background: rgba(99, 102, 241, 0.02);
    padding: 60px 20px;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-category {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(129, 140, 248, 0.03));
    padding: 25px;
    border-radius: 14px;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
    transition: left 0.5s ease;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(129, 140, 248, 0.08));
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.2);
}

.skill-category h3 {
    margin-bottom: 16px;
    color: var(--accent-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    color: var(--accent-light);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: default;
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ---------------------------
       Projects Section
---------------------------- */
.projects-section {
    padding: 60px 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: linear-gradient(135deg, rgba(22, 29, 63, 0.9), rgba(18, 23, 47, 0.9));
    padding: 28px;
    border-radius: 14px;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

html[data-theme="light"] .project-card {
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.9), rgba(249, 250, 251, 0.9));
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(129, 140, 248, 0.08));
    transform: translateY(-12px);
    box-shadow: 0 16px 45px rgba(99, 102, 241, 0.25);
}

html[data-theme="light"] .project-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(129, 140, 248, 0.05));
}

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

.project-card h3 {
    margin-bottom: 12px;
    color: var(--accent-light);
    font-size: 1.25rem;
    font-weight: 600;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 18px;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.project-tag {
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 11px;
    border-radius: 6px;
    color: var(--success);
    font-size: 0.8rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.project-link {
    display: inline-block;
    padding: 10px 18px;
    margin-top: 15px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.2);
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* ---------------------------
        Contact Section
---------------------------- */
.contact-section {
    padding: 80px 20px;
    background: rgba(99, 102, 241, 0.02);
    border-top: 2px solid var(--border);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

.social-link {
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.social-link:hover {
    color: var(--accent-light);
    background: var(--accent);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* ---------------------------
           Footer
---------------------------- */
footer {
    padding: 25px 20px;
    text-align: center;
    background: rgba(10, 14, 39, 0.8);
    border-top: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

html[data-theme="light"] footer {
    background: rgba(255, 255, 255, 0.8);
}

/* ---------------------------
         Responsive
---------------------------- */
@media (max-width: 850px) {
    nav ul {
        gap: 15px;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-decorative {
        font-size: 3rem;
        opacity: 0.05;
    }
}