:root {
    /* Color Palette */
    --primary: #067caf;
    --primary-hover: #08036b;
    --bg-light: #f8fafc;
    --bg-dark: #090f1d;
    --text-light: #1e293b;
    --text-dark: #f1f5f9;
    --card-light: rgba(255, 255, 255, 0.7);
    --card-dark: rgba(30, 41, 59, 0.7);
    --border-light: rgba(226, 232, 240, 0.8);
    --border-dark: rgba(51, 65, 85, 0.8);
    --accent: #7cbdfa;

    /* Spacing & Transitions */
    --container-width: 1100px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* -------- Glass Background -------- */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #CDE7F4 0%, #68B7DE 100%);
    z-index: -1;
}

body.dark .glass-bg {
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        #0f172a;
}

/* -------- Header & Navigation -------- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(var(--glass-blur));
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

body.dark header {
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--border-dark);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.theme-btn {
    background: none;
    border: 1px solid var(--border-light);
    padding: 0.6rem;
    border-radius: 12px;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: white;
}

body.dark .theme-btn {
    background: var(--bg-dark);
    border-color: var(--border-dark);
}

.theme-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.light-icon {
    display: none;
}

body.dark .dark-icon {
    display: none;
}

body.dark .light-icon {
    display: block;
}

/* -------- Home Section -------- */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.profile-frame {
    width: 360px;
    height: 360px;
    max-width: 90vw;
    aspect-ratio: 1/1;
    margin: 0 auto 2rem;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    border: 4px solid white;
}

body.dark .profile-img {
    border-color: var(--bg-dark);
}

@keyframes morph {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}

body.dark .subtitle {
    color: #94a3b8;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn.secondary {
    background: transparent;
    border: 2px solid var(--border-light);
    color: inherit;
}

body.dark .btn.secondary {
    border-color: var(--border-dark);
}

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

/* -------- About Section -------- */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    grid-column: 1 / -1;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.edu-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    align-items: center;
}

body.dark .edu-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.edu-card i {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

.skills-container {
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: 20px;
}

body.dark .skills-container {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.skills-container h3 {
    margin-bottom: 1.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

body.dark .skill-progress {
    background: #334155;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transition: width 1.5s ease-out;
}

.skills-dropdowns {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-dropdown {
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--card-light);
    transition: all 0.3s ease;
}

body.dark .skill-dropdown {
    border-color: var(--border-dark);
    background: var(--card-dark);
}

.dropdown-header {
    width: 100%;
    padding: 1.25rem;
    background: var(--card-light);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
    transition: all 0.3s ease;
}

body.dark .dropdown-header {
    background: var(--card-dark);
}

.dropdown-header:hover {
    background: rgba(104, 183, 222, 0.1);
}

.dropdown-header i {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.skill-dropdown.active .dropdown-header i {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.skill-dropdown.active .dropdown-content {
    max-height: 1000px;
}

.dropdown-content ul {
    list-style: none;
    padding: 0 1.25rem 1.25rem;
    margin: 0;
}

.dropdown-content li {
    padding: 0.75rem 0;
    color: #64748b;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

body.dark .dropdown-content li {
    color: #94a3b8;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dropdown-content li:last-child {
    border-bottom: none;
}

/* -------- Projects Section -------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
}

body.dark .project-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.project-num {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.05;
    font-family: 'Outfit';
}

.project-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

body.dark .project-card p {
    color: #94a3b8;
}

.tech-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tech-tags span {
    padding: 0.4rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.view-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.view-link i {
    width: 18px;
    height: 18px;
}

/* -------- Contact Section -------- */
.contact-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    padding: 4rem;
    border-radius: 32px;
}

body.dark .contact-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.contact-card .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-card p {
    color: #64748b;
}

body.dark .contact-card p {
    color: #94a3b8;
}

form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

body.dark .input-group input,
body.dark .input-group textarea {
    border-color: var(--border-dark);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #64748b;
    pointer-events: none;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

.input-group input:focus+label,
.input-group textarea:focus+label,
.input-group input:not(:placeholder-shown)+label,
.input-group textarea:not(:placeholder-shown)+label {
    top: -0.7rem;
    left: 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-light);
    padding: 0 0.4rem;
}

body.dark .input-group input:focus+label,
body.dark .input-group textarea:focus+label,
body.dark .input-group input:not(:placeholder-shown)+label,
body.dark .input-group textarea:not(:placeholder-shown)+label {
    background: #1e293b;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

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

/* -------- Footer -------- */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

body.dark footer {
    border-top-color: var(--border-dark);
}

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

.footer-info p {
    color: #64748b;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: #64748b;
    transition: var(--transition);
}

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

/* -------- Achievements Section -------- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.achievement-card {
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

body.dark .achievement-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

body.dark .achievement-card:hover {
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.1);
}

.achievement-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: var(--transition);
}

.achievement-card:hover .achievement-image img {
    transform: scale(1.05);
}

.achievement-content {
    padding: 1.5rem;
}

.achievement-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.achievement-content p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

body.dark .achievement-content p {
    color: #94a3b8;
}

/* -------- Experience Section -------- */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.experience-card {
    background: var(--card-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

body.dark .experience-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

body.dark .experience-card:hover {
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.1);
}

.experience-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.experience-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: var(--transition);
}

.experience-card:hover .experience-image img {
    transform: scale(1.05);
}

.experience-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.experience-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.experience-content .company {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.experience-content p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

body.dark .experience-content p {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .achievement-image {
        height: 300px;
    }

    .experience-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .experience-image {
        height: 200px;
    }
}