/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --success-color: #22c55e;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), #ef4444);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

ul {
    list-style: none;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

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

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

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

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-normal);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    color: var(--primary-light);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
}

.typing {
    border-right: 3px solid var(--primary-color);
    padding-right: 0.25rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { border-color: var(--primary-color); }
    50% { border-color: transparent; }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Code Window */
.hero-image {
    display: flex;
    justify-content: center;
}

.code-window {
    background: var(--darker-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 450px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

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

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

.keyword { color: #c678dd; }
.class-name { color: #e5c07b; }
.function { color: #61afef; }
.param { color: #e06c75; }
.string { color: #98c379; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

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

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

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes scroll {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.5; top: 16px; }
}

/* ===== About Section ===== */
.about {
    background: var(--darker-bg);
}

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

.image-frame {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    z-index: -1;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--text-muted);
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

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

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

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

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

.skill-category {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.category-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-header h3 {
    font-size: 1.125rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

.skill-info {
    flex: 1;
}

.skill-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.skill-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

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

/* ===== Experience Section ===== */
.experience {
    background: var(--darker-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    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: 2.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    border: 3px solid var(--darker-bg);
    z-index: 1;
}

.timeline-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.75rem;
}

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

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags span {
    padding: 0.25rem 0.75rem;
    background: var(--border-color);
    color: var(--text-secondary);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

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

.project-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.project-link:hover {
    color: var(--primary-light);
}

/* ===== Contact Section ===== */
.contact {
    background: var(--darker-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.contact-item h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.contact-item p {
    color: var(--text-primary);
}

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

.contact-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.contact-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

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

/* ===== Footer ===== */
.footer {
    background: var(--darker-bg);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

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

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .hero-image {
        order: -1;
    }

    .code-window {
        max-width: 400px;
    }

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

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

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

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

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: var(--darker-bg);
        width: 100%;
        height: 100vh;
        padding: 5rem 2rem;
        transition: all var(--transition-normal);
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

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

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-dot {
        left: -1.5rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 2rem;
    }

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

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

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

    .code-window {
        display: none;
    }

    .image-frame {
        width: 200px;
        height: 200px;
    }

    .profile-placeholder {
        font-size: 4rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
