/* ---- THEME VARIABLES ---- */
:root {
    --primary-color: #5a4ff3;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2c2c2c;
    --bg-card: #2c2c2c;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ---- GLOBAL RESETS ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* ---- HEADER ---- */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
}
.nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 20px;
}
.logo {
    font-size: 1.5rem; font-weight: bold;
    color: var(--primary-color);
}
.nav-menu {
    display: flex; gap: 2rem;
    list-style: none;
}
.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}
.nav-link:hover { color: var(--primary-color); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
}
.theme-toggle:hover { background-color: var(--bg-secondary); }
.hamburger {
    display: none;
    flex-direction: column; gap: 4px;
    cursor: pointer;
}
.hamburger span {
    width: 25px; height: 3px;
    background: var(--text-primary);
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* ---- HERO ---- */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    padding-top: 80px;
}
.hero-content { text-align: center; }
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.5rem; color: var(--text-secondary); }
.hero-tagline { font-size: 1.2rem; margin: 1rem 0 2rem; }
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4); }
.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-secondary:hover { background-color: var(--primary-color); color: white; }

/* ---- SECTION ---- */
.section {
    padding: 80px 0;
    opacity: 0; transform: translateY(30px);
    transition: all 0.6s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: ''; position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* ---- ABOUT ---- */
.about { background-color: var(--bg-secondary); }
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: center;
}
.about-text p { color: var(--text-secondary); margin-bottom: 1rem; }
.profile-img {
    width: 300px; height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex; align-items: center; justify-content: center;
    margin: auto;
    font-size: 6rem; color: white;
    overflow: hidden;
}
.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.profile-photo { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.contact-intro { color: #e0e0ff; margin-bottom: 2.2rem; line-height: 1.6; }
.contact-form-title { font-size:1.5rem; font-weight:600; margin-bottom:1.2rem; color:#222; }

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- SKILLS ---- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.skill-item {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}
.skill-name { display: flex; justify-content: space-between; }
.skill-bar {
    width: 100%; height: 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px; overflow: hidden;
}
.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- PROJECTS ---- */
.projects { background-color: var(--bg-secondary); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 430px; /* adjust as needed for your content */
}
.project-card:hover { transform: translateY(-10px); }
.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 3rem;
}
.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.project-content h3 {
    margin-bottom: 0.5rem;
}
.project-content p {
    flex: 0 0 auto;
}
.tech-stack {
    margin-top: 10px;
    margin-bottom: 1.5rem;
}
.tech-stack span {
    display: inline-block;
    background-color: #f1f1f1;
    color: #333;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 20px;
    font-size: 0.85rem;
}
.project-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* ---- QUALIFICATIONS & CERTIFICATIONS ---- */
.qualifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}
.qualification-card {
    background-color: var(--bg-card);
    padding: 1.6rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px var(--shadow);
    text-align: left;
}
.qualification-card h3 { margin-bottom: 0.4rem; color: var(--primary-color); }
.qualification-card .score { font-weight: 700; margin-top: 0.4rem; }

.certifications .projects-grid { gap: 1.4rem; }
.certifications .project-card { min-height: 320px; }


/* ---- CONTACT ---- */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    background: none;
    align-items: stretch;
    margin-top: 2rem;
    border-radius: 24px;
    overflow: visible;
    box-shadow: none;
    position: relative;
    min-height: 420px;
}
.contact-content > div:first-child {
    background: #5a4ff3;
    color: #fff;
    border-radius: 24px 0 0 24px;
    padding: 3rem 2.5rem 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}
.contact-content > div:first-child h2,
.contact-content > div:first-child p {
    color: #fff;
}
.contact-content > div:first-child .contact-item {
    background: none;
    color: #fff;
    padding: 0;
    border-radius: 0;
    margin-bottom: 1.2rem;
    font-size: 1.08rem;
    gap: 1.2rem;
}
.contact-content > div:first-child .contact-item i {
    background: none;
    color: #fff;
    font-size: 1.4rem;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-content > div:first-child .contact-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.contact-content > div:first-child .contact-item a:hover {
    text-decoration: underline;
}
.contact-content > div:first-child .contact-item:last-child {
    margin-bottom: 0;
}
.contact-content > div:first-child .contact-social {
    margin-top: 2rem;
    display: flex;
    gap: 1.1rem;
}
.contact-content > div:first-child .contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: #5a4ff3;
    font-size: 1.2rem;
    transition: background 0.2s, color 0.2s;
}
.contact-content > div:first-child .contact-social a:hover {
    background: #edeaff;
    color: #3d32b6;
}

.contact-form {
    background: #fff;
    border-radius: 0 24px 24px 0;
    box-shadow: 0 8px 32px rgba(90, 79, 243, 0.10), 0 1.5px 6px rgba(90, 79, 243, 0.06);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 100%;
    justify-content: center;
}
.contact-form input,
.contact-form textarea {
    padding: 1.1rem 1.2rem;
    border: 1.5px solid #e4e6f7;
    border-radius: 2rem;
    background: #fafbff;
    color: #222;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
    resize: none;
}
.contact-form textarea {
    border-radius: 1.2rem;
    min-height: 90px;
    max-height: 180px;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border: 1.5px solid #5a4ff3;
    background: #fff;
}
.contact-form .btn {
    background: #5a4ff3;
    color: #fff;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.9rem 0;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: 0 4px 16px rgba(90, 79, 243, 0.10);
    border: none;
    transition: background 0.2s, box-shadow 0.2s;
}
.contact-form .btn:hover {
    background: #3d32b6;
    box-shadow: 0 6px 24px rgba(90, 79, 243, 0.18);
}

/* ---- FOOTER ---- */
.footer {
    background-color: var(--bg-card);
    padding: 2.5rem 0 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px var(--shadow);
    margin-top: 2rem;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}
.social-links a {
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.3rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px var(--shadow);
}
.social-links a:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-3px) scale(1.07);
}
.footer p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

/* RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px; left: -100%;
        width: 100%; height: calc(100vh - 70px);
        background-color: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s;
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .contact-content {
        grid-template-columns: 1fr;
        border-radius: 24px;
        min-height: unset;
    }
    .contact-content > div:first-child,
    .contact-form {
        border-radius: 24px 24px 0 0;
        padding: 2rem 1.5rem;
    }
    .contact-form {
        border-radius: 0 0 24px 24px;
    }
}
@media (max-width: 600px) {
    .contact-content > div:first-child,
    .contact-form {
        padding: 1.2rem 0.7rem;
    }
    .contact-form .btn {
        font-size: 1rem;
        padding: 0.8rem 0;
    }
}