@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color-light: #2c5282; 
    --secondary-color-light: #38b2ac;
    --accent-color-light: #ed8936; 
    --bg-color-light: #f7fafc;
    --text-color-light: #1a202c;
    --card-bg-light: #ffffff;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --primary-color-dark: #63b3ed; 
    --secondary-color-dark: #4fd1c5; 
    --accent-color-dark: #f6ad55;
    --bg-color-dark: #1a202c;
    --text-color-dark: #e2e8f0;
    --card-bg-dark: #2d3748;
    --shadow-dark: 0 4px 15px rgba(0, 0, 0, 0.2);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    transition: background-color 0.4s, color 0.4s;
    scroll-behavior: smooth;
}

body.light-theme {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --accent-color: var(--accent-color-light);
    --card-bg: var(--card-bg-light);
    --shadow: var(--shadow-light);
    --text-muted: #718096;
}

body.dark-theme {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --accent-color: var(--accent-color-dark);
    --card-bg: var(--card-bg-dark);
    --shadow: var(--shadow-dark);
    --text-muted: #a0aec0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
}

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

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

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

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 5%;
    background: transparent;
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: hsla(0, 0%, 100%, 0.8);
    box-shadow: var(--shadow);
}
body.dark-theme header.scrolled {
    background-color: rgba(45, 55, 72, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s;
}

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

.theme-icon {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
}
.theme-icon:hover {
    transform: rotate(45deg);
    color: var(--accent-color);
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
    flex-wrap: wrap-reverse;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.typed {
    color: var(--secondary-color);
    font-weight: 600;
}

.social-links a {
    color: inherit;
    font-size: 2rem;
    margin-right: 1.5rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.btn {
    padding: 14px 32px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}
.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.btn i {
    margin-left: 8px;
}

.hero-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 7px solid var(--secondary-color);
    animation: float 4s ease-in-out infinite;
}

#about {
    padding: 6rem 5%;
    background: var(--card-bg);
}
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills-container {
    margin-top: 3rem;
}
.skills-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.skills-container .skill {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 8px 18px;
    margin: 5px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s, background-color 0.3s;
}
.skills-container .skill:hover {
    transform: scale(1.1);
    background-color: var(--accent-color);
}
#experience {
    padding: 6rem 5%;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    opacity: 0.2;
    z-index: 1;
}

.timeline-item {
    padding: 10px 0;
    position: relative;
    width: 50%;
    z-index: 2;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 4px solid var(--secondary-color);
    top: 24px;
    z-index: 3;
    transition: transform 0.3s;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1rem;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0.5rem 0 0 0;
}
.timeline-content p strong {
    color: var(--text-color);
    opacity: 0.9;
}
#projects {
    padding: 6rem 5%;
}
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter 0.3s;
}
.project-card:hover .project-image {
    filter: grayscale(0%);
}

.project-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { margin-top: 0; font-weight: 600; }
.project-info p { font-size: 0.95rem; color: var(--text-muted); flex-grow: 1; }
.project-tech { margin: 1rem 0; }
.project-tech span {
    background: #e2e8f0; color: #4a5568; padding: 4px 12px;
    border-radius: 15px; font-size: 0.8rem; margin-right: 5px; font-weight: 500;
}
body.dark-theme .project-tech span { background: #4a5568; color: #e2e8f0; }
.project-links a { margin-right: 1.5rem; text-decoration: none; color: var(--primary-color); font-weight: 600; transition: color 0.3s; }
.project-links a:hover { color: var(--accent-color); }

#achievements {
    padding: 6rem 5%;
    background: var(--card-bg);
}
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.achievement-card {
    background: var(--bg-color-light);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
body.dark-theme .achievement-card { background: var(--bg-color-dark); }
.achievement-card:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.achievement-icon { font-size: 3rem; color: var(--secondary-color); margin-bottom: 1rem; }
.achievement-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 600; }
.achievement-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

#certifications {
    padding: 6rem 5%;
}
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.certification-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--accent-color);
    transition: transform 0.3s;
}
.certification-card:hover {
    transform: translateY(-10px);
}
.cert-provider {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}
.certification-card h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.certification-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

#contact {
    padding: 6rem 5%;
    text-align: center;
    background: var(--card-bg);
}
#contact p { max-width: 600px; margin: 0 auto 2rem auto; color: var(--text-muted); }
#contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.2rem; }
#contact-form input, #contact-form textarea {
    padding: 1rem; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 1rem;
    font-family: 'Poppins', sans-serif; background: var(--bg-color-light); color: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}
body.dark-theme #contact-form input, body.dark-theme #contact-form textarea {
    background: var(--bg-color-dark); border-color: #4a5568;
}
#contact-form input:focus, #contact-form textarea:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(var(--primary-color-hsl), 0.2);
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none !important;
}