/* --- Root Variables & Theme Definition --- */
:root {
    --bg-main: #0a0b10;
    --bg-card: rgba(18, 20, 29, 0.65);
    --bg-card-hover: rgba(26, 29, 41, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.2);
    
    --primary: #6366f1; /* Royal Indigo */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #14b8a6; /* Neon Teal */
    --secondary-glow: rgba(20, 184, 166, 0.5);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #6b7280;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* --- Base Resets & Global Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Ambient Background Glows --- */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(160px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.25;
}

.bg-glow-1 {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.bg-glow-2 {
    top: 50%;
    left: -200px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    opacity: 0.15;
}

.bg-glow-3 {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Reusable Components (Badges, Buttons, Sections) --- */
.badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 20px;
}

.section-badge {
    background: rgba(20, 184, 166, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(20, 184, 166, 0.25);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.btn-block {
    width: 100%;
}

.section-padding {
    padding: 120px 0;
}

.section-header {
    margin-bottom: 70px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

/* --- Header / Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 11, 16, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 12px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.logo-accent {
    color: var(--primary);
    font-weight: 800;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition-fast);
}

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

.contact-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 10px 20px !important;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.contact-btn::after {
    display: none;
}

.contact-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 650px;
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Coding Window / Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.visual-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
}

.card-header {
    background: rgba(0,0,0,0.2);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.card-title {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-left: 10px;
}

.card-body {
    padding: 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e7eb;
    overflow-x: auto;
}

.keyword { color: #f43f5e; }
.string { color: #10b981; }
.number { color: #f59e0b; }
.function-name { color: #3b82f6; }

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: block;
    position: relative;
}

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

@keyframes scroll-wheel {
    0% { top: 6px; opacity: 1; }
    50% { top: 16px; opacity: 0.3; }
    100% { top: 6px; opacity: 1; }
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.about-values {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.value-item {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.value-item:hover {
    transform: translateX(10px);
    border-color: var(--secondary);
    background: var(--bg-card-hover);
}

.value-icon {
    font-size: 1.8rem;
    color: var(--secondary);
    flex-shrink: 0;
}

.value-text h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.value-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.skill-category-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.1);
    background: var(--bg-card-hover);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.skill-category-card:hover .category-icon {
    background: var(--primary);
    color: #fff;
    transform: rotateY(180deg);
}

.skill-category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.skill-category-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-name {
    color: var(--text-main);
}

.skill-percent {
    color: var(--secondary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 24px !important;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: block;
    width: 0; /* Animated with JS or CSS loading */
    transition: width 1.5s ease-out;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px 24px;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: 0 15px 30px rgba(20, 184, 166, 0.1);
    background: var(--bg-card-hover);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

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

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 4px solid var(--secondary);
    top: 25px;
    z-index: 1;
    transition: var(--transition-smooth);
}

.timeline-item.left .timeline-dot {
    right: -10px;
}

.timeline-item.right .timeline-dot {
    left: -10px;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.timeline-content {
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.08);
    background: var(--bg-card-hover);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-block;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 16px;
}

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

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 50px;
    align-items: stretch;
}

.contact-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.contact-info-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.contact-info-panel > p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--secondary);
}

.info-details span {
    font-size: 0.8rem;
    color: var(--text-dark);
    text-transform: uppercase;
    font-weight: 700;
    display: block;
}

.info-details a, .info-details p {
    font-size: 1.05rem;
    font-weight: 600;
}

.info-details a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.01);
}

.social-links a:hover {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
    box-shadow: 0 5px 15px var(--primary-glow);
    transform: translateY(-4px);
}

/* Contact Form Panel */
.contact-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 50px;
    backdrop-filter: blur(10px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 20px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.form-group textarea {
    resize: none;
}

/* --- Footer --- */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    background-color: rgba(10, 11, 16, 0.9);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.footer-name-glow {
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 8px var(--primary-glow);
}

/* --- CSS Animations (Scroll & Entrance) --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

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

/* Scroll Animation Hooks (Managed by JS IntersectionObserver) */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries (Responsive Layouts) --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .mobile-toggle {
        display: block;
        z-index: 1100;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(10, 11, 16, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: var(--transition-smooth);
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .stats-grid {
        margin-top: 30px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-dot {
        left: 20px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}
