/* CSS Variables for Theme */
:root {
    --bg-primary: #f4f4f4;
    --bg-secondary: #fff;
    --bg-tertiary: #f9f9f9;
    --text-primary: #333;
    --text-secondary: #555;
    --nav-bg: #222;
    --nav-text: #fff;
    --accent: #00bcd4;
    --accent-dark: #0097a7;
    --border-color: #eee;
    --section-shadow: rgba(0, 0, 0, 0.1);
    --item-shadow: rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
}

html[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --nav-bg: #0f0f0f;
    --nav-text: #e0e0e0;
    --accent: #00d4ff;
    --accent-dark: #00a3b3;
    --border-color: #444;
    --section-shadow: rgba(0, 0, 0, 0.5);
    --item-shadow: rgba(0, 0, 0, 0.3);
}

/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}


nav {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

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

.logo span {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--nav-text);
    color: var(--nav-text);
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle i {
    display: block;
    transition: var(--transition);
}

.links {
    display: flex;
    gap: 60px; 
}

.link a {
    color: var(--nav-text);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease-in-out;
    padding-bottom: 5px;
}

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

.link a:hover {
    color: var(--accent);
}

.link a:hover::after {
    width: 100%;
}



section {
    padding: 30px 40px; 
    max-width: 1400px;
    margin: 0 auto;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 100px; 
    padding-top: 20px; 
    width: 100%;
}

.image {
    flex: 1;
    min-width: 450px;
    text-align: center;
}

.image img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.content {
    flex: 2;
    min-width: 300px;
}

.content h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.content h1 span {
    color: var(--accent);
}

.typewriter {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.typewriter span {
    color: var(--accent);
    font-weight: bold;
}

.content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    color: var(--text-primary);
    font-size: 1.8rem;
    transition: color 0.3s ease-in-out;
}

.social-links a:hover {
    color: var(--accent);
}

.btn button {
    background-color: var(--accent);
    color: var(--nav-text);
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.btn button:hover {
    background-color: var(--accent-dark);
}


.section {
    background-color: var(--bg-secondary);
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--section-shadow);
    padding: 40px;
    transition: var(--transition);
}

.section h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    transition: var(--transition);
}


.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


.section-item {
    padding: 20px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--item-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
}


.section-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: var(--transition);
}
.section-item p,
.section-item ul {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.section-item ul {
    list-style: disc inside;
    padding-left: 20px;
}
.section-item ul li {
    margin-bottom: 5px;
}
.section-item a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.section-item a:hover {
    text-decoration: underline;
}


/* Footer Styles */
footer {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}


/* Skills Section Styles */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skill-item {
    padding: 20px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--item-shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--item-shadow);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.skill-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.skill-percentage {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--accent);
    transition: var(--transition);
}

.skill-bar {
    height: 10px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: 10px;
    width: 0%;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

html[data-theme="dark"] .skill-progress {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.skill-progress.animate {
    animation: fillSkill 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fillSkill {
    0% {
        width: 0%;
    }
    100% {
        width: var(--skill-width);
    }
}



@media (max-width: 1024px) {
    .nav-container {
        padding: 0 15px;
    }

    .links {
        gap: 40px;
    }

    section {
        padding: 20px 25px; 
    }

    .main-container {
        flex-direction: column;
        text-align: center;
        gap: 60px;
        padding-top: 15px; 
    }

    .content {
        order: 2;
    }

    .image {
        order: 1;
    }

    .content h1 {
        font-size: 2.2rem;
    }

    .typewriter {
        font-size: 1.3rem;
    }

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

    .section {
        padding: 30px;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}


@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .link a {
        display: block;
        padding: 8px 0;
        background-color: #333;
        border-radius: 4px;
        &::after {
            display: none;
        }
    }

    section {
        padding: 30px 20px; 
    }

    .main-container {
        padding-top: 20px; 
        gap: 40px;
    }

    .image img {
        width: 160px;
        height: 160px;
    }

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

    .typewriter {
        font-size: 1.2rem;
    }

    .content p {
        font-size: 1rem;
    }

    .btn button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .section {
        padding: 25px;
        margin-top: 30px;
    }

    .section h2 {
        font-size: 1.6rem;
    }

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

    .section-item {
        padding: 15px;
    }

    .section-item h3 {
        font-size: 1.2rem;
    }

    .section-item p,
    .section-item ul {
        font-size: 0.95rem;
    }

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

    .skill-item {
        padding: 15px;
    }

    .skill-name {
        font-size: 0.95rem;
    }

    .skill-percentage {
        font-size: 0.9rem;
    }
}


/* ============================================
   ANIMATION SYSTEM - Professional Scroll Reveals
   ============================================ */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Base animation states - initial state before reveal */
.section {
    opacity: 1;
}

.animate-children {
    position: relative;
}

.animate-stagger-item {
    opacity: 0;
    transform: translateY(40px) translateX(-20px);
    will-change: opacity, transform;
}

.animate-card {
    opacity: 0;
    transform: translateY(40px);
}

.contact-card {
    opacity: 0;
    transform: translateY(40px);
}

/* Animation keyframes */
@keyframes revealFadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes revealFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealCardUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleXReveal {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

/* Applied animation classes */
.animate-stagger-item.active {
    animation: revealFadeSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-card.active,
.contact-card.active {
    animation: revealCardUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Individual stagger delays (for sequential animations) */
.animate-stagger-item:nth-child(1) { animation-delay: 0ms; }
.animate-stagger-item:nth-child(2) { animation-delay: 100ms; }
.animate-stagger-item:nth-child(3) { animation-delay: 200ms; }
.animate-stagger-item:nth-child(4) { animation-delay: 300ms; }
.animate-stagger-item:nth-child(5) { animation-delay: 400ms; }
.animate-stagger-item:nth-child(6) { animation-delay: 500ms; }
.animate-stagger-item:nth-child(7) { animation-delay: 600ms; }
.animate-stagger-item:nth-child(8) { animation-delay: 700ms; }
.animate-stagger-item:nth-child(9) { animation-delay: 800ms; }
.animate-stagger-item:nth-child(10) { animation-delay: 900ms; }

/* Project cards hover effect */
.animate-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px var(--section-shadow);
}

/* Contact card hover effects */
.contact-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--section-shadow);
    cursor: pointer;
}

/* Achievement list items */
.achievement-list {
    list-style: none;
    padding-left: 0;
}

.achievement-list li {
    margin-bottom: 15px;
    padding-left: 28px;
    position: relative;
}

.achievement-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Info items base styles */
.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--bg-tertiary);
    transition: var(--transition);
}

.info-item i {
    color: var(--accent);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.info-item:hover {
    transform: translateX(8px);
    background-color: var(--border-color);
}

/* Divider line animation for sections */
.section h2::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    width: 50px;
    margin-top: 10px;
    border-radius: 2px;
}