/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --secondary-light: #34d399;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-text: linear-gradient(135deg, #818cf8 0%, #34d399 50%, #f59e0b 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* ===== Cursor Glow Effect ===== */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-bracket {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
}

.logo-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

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

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

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px 60px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

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

.hero-greeting {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wave {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60%, 100% { transform: rotate(0deg); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    min-height: 45px;
}

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

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
    margin-left: 2px;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

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

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

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

.btn-secondary {
    background: var(--dark-light);
    color: var(--text);
    border: 1px solid var(--dark-lighter);
}

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

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

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

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

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

/* Code Window */
.hero-visual {
    perspective: 1000px;
}

.code-window {
    background: var(--dark-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--dark-lighter);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.code-window:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--dark);
    border-bottom: 1px solid var(--dark-lighter);
}

.code-dots {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

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

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

.code-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.code-body {
    padding: 24px;
    overflow-x: auto;
}

.code-body pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-keyword { color: #c792ea; }
.code-variable { color: #82aaff; }
.code-property { color: #f78c6c; }
.code-string { color: #c3e88d; }
.code-method { color: #82aaff; }

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

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

/* ===== Section Styles ===== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

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

.section-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 48px;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

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

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

.about-highlights {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--dark-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--dark-lighter);
}

.highlight-item i {
    color: var(--primary);
    font-size: 1.25rem;
}

.highlight-item span {
    font-weight: 500;
    font-size: 0.95rem;
}

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

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

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--white);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.frame-decoration {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    z-index: 0;
}

/* ===== Skills Section ===== */
.skills {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

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

.skill-category {
    background: var(--dark);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

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

.skill-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    background: var(--dark-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Experience Section ===== */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    padding-bottom: 48px;
}

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

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 6px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: 4px solid var(--dark);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.timeline-content {
    background: var(--dark-light);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--primary);
}

.timeline-header {
    margin-bottom: 12px;
}

.job-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.company {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
}

.timeline-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-meta i {
    color: var(--secondary);
}

.timeline-details {
    list-style: disc;
    padding-left: 20px;
}

.timeline-details li {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Projects Section ===== */
.projects {
    background: linear-gradient(180deg, var(--dark-light) 0%, var(--dark) 100%);
}

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

.project-card {
    background: var(--dark-light);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

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

.project-image {
    position: relative;
    height: 200px;
    background: var(--dark);
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-lighter) 0%, var(--dark) 100%);
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.5;
    transition: var(--transition);
}

.project-card:hover .project-placeholder {
    opacity: 0.3;
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    transform: scale(0);
    transition: var(--transition);
}

.project-card:hover .project-link {
    transform: scale(1);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-info {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tech span {
    padding: 4px 10px;
    background: var(--dark);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--secondary);
    font-family: 'Fira Code', monospace;
}

.project-credentials {
    color: var(--text-dark);
    font-size: 0.85rem;
    font-style: italic;
}

/* ===== Education Section ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.education-card {
    display: flex;
    gap: 24px;
    background: var(--dark-light);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--dark-lighter);
    transition: var(--transition);
}

.education-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

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

.education-content {
    flex: 1;
}

.degree {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.school {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.education-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.education-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.education-meta i {
    color: var(--secondary);
}

.education-award {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.9rem;
}

.education-award i {
    font-size: 1rem;
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--text);
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-text p,
.contact-text a {
    font-size: 1rem;
    color: var(--text);
}

.contact-text a:hover {
    color: var(--primary);
}

.contact-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border: 1px solid var(--dark-lighter);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--dark);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--dark-lighter);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    background: var(--dark-light);
    border: 1px solid var(--dark-lighter);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

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

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    background: var(--dark);
    border-top: 1px solid var(--dark-lighter);
}

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

.footer-text {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-dark);
}

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

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

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

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

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

    .hero-visual {
        display: none;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .about-image {
        order: -1;
    }

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

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

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
        flex-direction: column;
        padding: 100px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--dark-lighter);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

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

    .nav-menu .nav-link {
        font-size: 1.2rem;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-link:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active .nav-link:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active .nav-link:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active .nav-link:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active .nav-link:nth-child(6) { transition-delay: 0.35s; }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .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);
    }

    /* Mobile Hero - More Dynamic */
    .hero {
        padding: 100px 20px 60px;
        min-height: 100vh;
        min-height: 100dvh;
    }

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

    .hero-greeting {
        font-size: 1.1rem;
        justify-content: center;
        opacity: 1;
        animation: fadeInUp 0.6s ease forwards;
    }

    .hero-title {
        font-size: 2.8rem;
        line-height: 1.15;
        opacity: 1;
        animation: fadeInUp 0.6s ease 0.1s both;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        justify-content: center;
        opacity: 1;
        animation: fadeInUp 0.6s ease 0.2s both;
    }

    .hero-description {
        font-size: 1rem;
        opacity: 1;
        animation: fadeInUp 0.6s ease 0.3s both;
    }

    .hero-cta {
        opacity: 1;
        animation: fadeInUp 0.6s ease 0.4s both;
    }

    .hero-social {
        justify-content: center;
        opacity: 1;
        animation: fadeInUp 0.6s ease 0.5s both;
    }

    .scroll-indicator {
        display: none;
    }

    /* Mobile Section Styling */
    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-title::after {
        width: 60px;
        height: 3px;
        background: var(--gradient);
        border-radius: 3px;
    }

    .section-description {
        font-size: 1rem;
    }

    /* Mobile Skills - Card Style */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .skill-category {
        padding: 24px;
        background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
        border: 1px solid rgba(99, 102, 241, 0.2);
    }

    .skill-category:active {
        transform: scale(0.98);
        border-color: var(--primary);
    }

    .skill-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .skill-category h3 {
        font-size: 1.1rem;
    }

    .skill-tags {
        gap: 6px;
    }

    .skill-tag {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    /* Mobile Timeline */
    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 5px;
        width: 3px;
    }

    .timeline-marker {
        left: -24px;
        width: 14px;
        height: 14px;
    }

    .timeline-content {
        padding: 20px;
        background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    }

    .job-title {
        font-size: 1.25rem;
    }

    .company {
        font-size: 1rem;
    }

    .timeline-meta {
        flex-direction: column;
        gap: 6px;
    }

    .timeline-details li {
        font-size: 0.9rem;
    }

    /* Mobile Projects - Swipeable Look */
    .projects-grid {
        gap: 24px;
    }

    .project-card {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .project-card:active {
        transform: scale(0.98);
    }

    .project-image {
        height: 180px;
    }

    .project-placeholder {
        font-size: 3rem;
    }

    .project-info {
        padding: 20px;
    }

    .project-title {
        font-size: 1.15rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .project-tech span {
        font-size: 0.75rem;
    }

    /* Mobile About */
    .about-content {
        gap: 40px;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-highlights {
        flex-direction: column;
        gap: 12px;
    }

    .highlight-item {
        padding: 14px 18px;
        background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
        border: 1px solid rgba(99, 102, 241, 0.2);
    }

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

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

    .frame-decoration {
        top: 15px;
        left: 15px;
        right: -15px;
        bottom: -15px;
    }

    /* Mobile Education */
    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    }

    .education-icon {
        margin: 0 auto 16px;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .degree {
        font-size: 1.2rem;
    }

    .school {
        font-size: 1rem;
    }

    .education-meta {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }

    .education-award {
        justify-content: center;
    }

    /* Mobile Contact */
    .contact-content {
        gap: 40px;
    }

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

    .contact-details {
        gap: 20px;
    }

    .contact-item {
        gap: 14px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

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

    .contact-form-wrapper {
        padding: 24px;
        border-radius: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 90px 16px 50px;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
        min-height: 35px;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 1rem;
    }

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

    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .section {
        padding: 50px 0;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }

    .section-description {
        margin-bottom: 32px;
    }

    /* Extra small timeline */
    .timeline-content {
        padding: 16px;
    }

    .job-title {
        font-size: 1.1rem;
    }

    .timeline-details {
        padding-left: 16px;
    }

    .timeline-details li {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    /* Extra small projects */
    .project-image {
        height: 160px;
    }

    .project-info {
        padding: 16px;
    }

    .project-credentials {
        font-size: 0.8rem;
    }

    /* Extra small education */
    .education-card {
        padding: 20px;
    }

    .degree {
        font-size: 1.1rem;
    }

    .education-award {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    /* Footer */
    .footer {
        padding: 30px 0;
    }

    .footer-text {
        font-size: 0.9rem;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Mobile-specific animations */
@media (max-width: 768px) {
    .hero-title .gradient-text {
        background-size: 200% auto;
        animation: gradientFlow 3s ease infinite;
    }

    .skill-category {
        animation: fadeInUp 0.5s ease forwards;
    }

    .project-card {
        animation: fadeInUp 0.5s ease forwards;
    }

    .scroll-indicator {
        animation: float 2s ease-in-out infinite;
    }

    /* Touch feedback */
    .btn:active {
        transform: scale(0.95);
    }

    .social-link:active {
        transform: scale(0.9);
    }

    .social-btn:active {
        transform: scale(0.9);
    }

    /* Glowing effect for buttons on mobile */
    .btn-primary {
        position: relative;
        overflow: hidden;
    }

    .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        animation: shimmer 2s infinite;
    }
}

/* Smooth scrolling for touch devices */
@supports (-webkit-touch-callout: none) {
    html {
        scroll-behavior: auto;
    }
    
    .section {
        scroll-snap-align: start;
    }
}

/* Safe area for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: calc(16px + env(safe-area-inset-top));
    }
    
    .hero {
        padding-top: calc(100px + env(safe-area-inset-top));
    }
    
    .footer {
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}

/* Dark mode scrollbar for mobile browsers */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--dark);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
    }
}
