/* ========================================
   CSS Variables & Theme
   ======================================== */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(26, 26, 36, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --code-bg: #1e1e2e;
    --code-keyword: #c678dd;
    --code-string: #98c379;
    --code-number: #d19a66;
    --code-class: #e5c07b;
    --code-method: #61afef;
    --particle-color: #6366f1;
}

[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --text-primary: #18181b;
    --text-secondary: #3f3f46;
    --text-muted: #71717a;
    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --code-bg: #f8f8f8;
    --particle-color: #4f46e5;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
    background: var(--accent-primary);
    color: white;
}

/* ========================================
   Particles Background
   ======================================== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: var(--bg-primary);
}

/* ========================================
   Theme Toggle
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--text-primary);
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: rotate(-90deg);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="light"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0);
}

[data-theme="light"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--card-bg);
    box-shadow: 0 4px 30px var(--shadow-color);
    padding: 0.8rem 5%;
}

.nav-brand .brand-text {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.4s;
}

.hero-title-wrapper {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.6s;
}

.typing-text {
    color: var(--text-primary);
    font-weight: 600;
}

.cursor {
    color: var(--accent-primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-location {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
}

.hero-location i {
    color: var(--accent-primary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Code Window */
.hero-visual {
    opacity: 0;
    animation: fadeInRight 0.8s ease forwards;
    animation-delay: 1.2s;
}

.code-window {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.file-name {
    margin-left: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    color: var(--text-secondary);
}

.keyword { color: var(--code-keyword); }
.string { color: var(--code-string); }
.number { color: var(--code-number); }
.class-name { color: var(--code-class); }
.method { color: var(--code-method); }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

.scroll-indicator span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 6rem 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-number {
    font-family: 'Fira Code', monospace;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    max-width: 300px;
}

/* ========================================
   About Section
   ======================================== */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-description strong {
    color: var(--text-primary);
}

.about-highlights {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.highlight-item {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 280px;
    height: 280px;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    z-index: -1;
    transition: all 0.3s ease;
}

.image-frame:hover::before {
    top: 10px;
    left: 10px;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

/* ========================================
   Experience Timeline
   ======================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
}

.timeline-marker i {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.timeline-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-left: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content .company {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-content .location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-content .location i {
    color: var(--accent-primary);
    margin-right: 0.3rem;
}

.timeline-content .role {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-content .period {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-content .period i {
    margin-right: 0.3rem;
}

.timeline-content .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ========================================
   Skills Section
   ======================================== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.skills-category {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.category-title i {
    color: var(--accent-primary);
}

.skill-item {
    margin-bottom: 1.2rem;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-percent {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease-out;
}

/* Tech Icons */
.tech-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.tech-icon {
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-icon:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.tech-icon svg {
    width: 28px;
    height: 28px;
}

/* ========================================
   Education Section
   ======================================== */
.education-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.education-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.education-content .institution {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-content .degree {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.education-content .period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.education-content .period i {
    margin-right: 0.3rem;
}

.certifications {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.cert-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
}

.cert-item i {
    color: var(--accent-primary);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 2rem 10%;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-year {
    margin-top: 0.3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-location {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

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

    .about-image {
        order: -1;
    }

    .about-highlights {
        justify-content: center;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 5%;
    }

    .hero {
        padding: 0 5%;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .theme-toggle {
        top: 80px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        width: 30px;
        height: 30px;
        left: -1.5rem;
    }

    .timeline-content {
        margin-left: 1rem;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}

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

    .hero-title-wrapper {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 0.2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .about-highlights {
        flex-direction: column;
        gap: 1.5rem;
    }

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