/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #71C9CE;
    --secondary-color: #A6E3E9;
    --accent-color: #E3FDFD;
    --text-color: #40514E;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --shadow: rgba(0,0,0,0.1);
    --gradient-start: #E3FDFD;
    --gradient-end: #CBF1F5;
    --footer-gradient-start: #A6E3E9;
    --footer-gradient-end: #71C9CE;
}

[data-theme="dark"] {
    --primary-color: #5BA4A9;
    --secondary-color: #8BC6CB;
    --accent-color: #2C5F65;
    --text-color: #E0E0E0;
    --background-color: #1a1a1a;
    --card-background: #2d2d2d;
    --shadow: rgba(255,255,255,0.1);
    --gradient-start: #2C5F65;
    --gradient-end: #3A7B82;
    --footer-gradient-start: #2C5F65;
    --footer-gradient-end: #5BA4A9;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(163, 227, 233, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(44, 95, 101, 0.95);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Typography */
h1 {
    font-size: clamp(3rem, 8vw, 5.625rem);
    color: var(--primary-color);
    margin: 2rem auto;
    font-family: 'Parisienne', cursive;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin: 1rem 0;
    font-family: 'Merriweather', serif;
    font-weight: normal;
}

h3 {
    color: var(--primary-color);
    font-family: 'Merriweather', serif;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 1rem 0;
}

p {
    line-height: 1.8;
    margin: 1rem 0;
}

a {
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #388b90;
}

/* Container styles */
.top-container {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    text-align: center;
    padding: 8rem 2rem 4rem;
    margin-top: 0;
}

.middle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.bottom-container {
    background: linear-gradient(135deg, var(--footer-gradient-start), var(--footer-gradient-end));
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

/* Profile section */
.profile {
    text-align: center;
    margin: 4rem 0;
}

.profile img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.profile img:hover {
    transform: scale(1.05);
}

/* Skills section */
.skills {
    margin: 4rem 0;
}

.skills h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.skill-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.skill-item img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    object-fit: contain;
}

.skill-item h3 {
    margin: 1rem 0;
}

.skill-progress {
    background: #f0f0f0;
    border-radius: 10px;
    height: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1s ease;
}

/* Experience section */
.experience {
    margin: 4rem 0;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.experience-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.experience-item:hover {
    transform: translateY(-5px);
}

.experience-date {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.experience-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

/* Education section */
.education {
    margin: 4rem 0;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.education-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Portfolio section */
.portfolio {
    margin: 4rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.portfolio-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.portfolio-tag {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Contact section */
.contact-me {
    text-align: center;
    margin: 4rem 0;
    padding: 2rem;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #30e3cb, #2bc4ad);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin: 1rem;
}

.btn:hover {
    background: linear-gradient(135deg, #3cb0fd, #3498db);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Footer */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-link {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.footer-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.copyright {
    color: #ffffff;
    font-size: 0.9rem;
    margin-top: 2rem;
    opacity: 0.8;
}

/* Sections */
.section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

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

/* Stagger animations for grid items */
.skills-grid .skill-item:nth-child(1) { animation-delay: 0.1s; }
.skills-grid .skill-item:nth-child(2) { animation-delay: 0.2s; }
.skills-grid .skill-item:nth-child(3) { animation-delay: 0.3s; }
.skills-grid .skill-item:nth-child(4) { animation-delay: 0.4s; }
.skills-grid .skill-item:nth-child(5) { animation-delay: 0.5s; }

.experience-grid .experience-item:nth-child(1) { animation-delay: 0.1s; }
.experience-grid .experience-item:nth-child(2) { animation-delay: 0.2s; }
.experience-grid .experience-item:nth-child(3) { animation-delay: 0.3s; }
.experience-grid .experience-item:nth-child(4) { animation-delay: 0.4s; }

.education-grid .education-item:nth-child(1) { animation-delay: 0.1s; }
.education-grid .education-item:nth-child(2) { animation-delay: 0.2s; }
.education-grid .education-item:nth-child(3) { animation-delay: 0.3s; }

/* Utility classes */
.text-center {
    text-align: center;
}

.intro {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(163, 227, 233, 1);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

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

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .skills-grid,
    .experience-grid,
    .education-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .top-container {
        padding: 6rem 1rem 2rem;
    }

    .middle-container {
        padding: 2rem 1rem;
    }

    .contact-me {
        padding: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .skill-item,
    .experience-item,
    .education-item,
    .portfolio-item {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}