:root {
    --primary-color: #2563eb;
    --primary-color-rgb: 37, 99, 235;
    --secondary-color: #666666;
    --bg-color: #ffffff;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --hover-color: #1d4ed8;
    --section-spacing: 80px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

.dark-theme {
    --primary-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
    --secondary-color: #a0a0a0;
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --light-gray: #1e1e1e;
    --border-color: #333333;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-theme nav {
    background-color: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-theme nav.scrolled {
    background-color: rgba(30, 41, 59, 0.98);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 140px 0 100px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Toggle Container and Mobile Navigation Toggle */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-nav-toggle {
    display: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 100;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav.scrolled {
    padding: 10px 20px;
    background-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo:hover {
    transform: translateY(-2px) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
}

.logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.logo:hover::after {
    animation: shine 1.5s ease;
}

@keyframes shine {
    0% {
        opacity: 0;
        transform: translateX(-100%) rotate(45deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(100%) rotate(45deg);
    }
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: white;
    transition: var(--transition);
}

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

.theme-toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 10;
    margin-left: 15px;
}

.theme-toggle:hover {
    transform: translateY(-2px) rotate(-5deg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active {
    transform: translateY(0);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover::before {
    opacity: 1;
}

/* Ripple effect for theme toggle */
.ripple {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Tech-inspired animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0);
    }
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 16px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 22px;
    margin-bottom: 32px;
    opacity: 0.9;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-links a {
    color: white;
    font-size: 22px;
    transition: var(--transition);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-links a:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Sections */
.section {
    padding: var(--section-spacing) 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

/* About Section */
.about-text {
    font-size: 18px;
    margin-bottom: 40px;
    width: 100%;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}


.education {
    margin-bottom: 40px;
}

.education h3, .skills h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.education-item {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.education-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--primary-color-rgb), 0) 70%);
    opacity: 0;
    transition: all 0.5s ease;
}

.education-item:hover::after {
    opacity: 1;
}


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

.edu-header h4 {
    font-size: 18px;
    font-weight: 600;
}

.date {
    color: var(--secondary-color);
    font-size: 14px;
}

.edu-details, .edu-gpa {
    font-size: 16px;
    color: var(--text-color);
}

.edu-gpa {
    margin-top: 5px;
    font-weight: 500;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.skill-category {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.skill-category h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    padding: 0 5px;
}

.skill-category p {
    font-size: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    padding: 5px;
    border-left: 2px solid transparent;
}

/* Skill category hover effects */
.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--light-gray), var(--light-gray) 80%, rgba(var(--primary-color-rgb), 0.05));
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 25px 25px 0;
    border-color: transparent var(--primary-color) transparent transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-category:hover::before {
    opacity: 0.7;
}

.skill-category:hover h4 {
    transform: translateX(5px);
    color: var(--primary-color);
}

.skill-category h4::after {
    content: '</';
    position: absolute;
    right: -20px;
    opacity: 0;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-weight: normal;
}

.skill-category h4::before {
    content: '<';
    position: absolute;
    left: -15px;
    opacity: 0;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-weight: normal;
}

.skill-category:hover h4::before,
.skill-category:hover h4::after {
    opacity: 0.7;
}

.skill-category:hover p {
    color: var(--text-color);
    text-shadow: 0 0 1px rgba(var(--primary-color-rgb), 0.3);
    border-left: 2px solid var(--primary-color);
    padding-left: 10px;
}

/* Experience Section */
.experience-item, .project-item, .contribution-item, .leadership-item {
    background-color: var(--light-gray);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.experience-item:hover, .project-item:hover, .contribution-item:hover, .leadership-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.exp-header, .project-header, .contrib-header, .lead-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.exp-header h3, .project-header h3, .contrib-header h3, .lead-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
}

.company, .project-links, .contrib-links {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.company span {
    font-weight: 500;
    font-size: 18px;
    margin-right: 15px;
}

.certificate-link, .project-links a, .contrib-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.certificate-link:hover, .project-links a:hover, .contrib-links a:hover {
    color: var(--hover-color);
}

.certificate-link i, .project-links i, .contrib-links i {
    margin-right: 5px;
}

.exp-details, .project-details, .contrib-details, .lead-details {
    list-style-type: none;
}

.exp-details li, .project-details li, .contrib-details li, .lead-details li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.exp-details li:before, .project-details li:before, .contrib-details li:before, .lead-details li:before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Projects Section */
.project-description, .project-tech {
    margin-bottom: 15px;
}

.project-tech {
    color: var(--secondary-color);
    font-size: 15px;
}

.lead-role {
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 17px;
}

/* Footer */
footer {
    background-color: var(--light-gray);
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-links a {
    color: var(--primary-color);
    font-size: 20px;
    transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile navigation */
    nav {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
        background-color: transparent;
        backdrop-filter: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .toggle-container {
        margin-left: auto;
    }
    
    /* Overlay for background blur when menu is open */
    .nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 90;
        pointer-events: none;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: transparent;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        padding: 20px 30px;
        z-index: 99;
    }
    
    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: right;
    }
    
    .nav-links a {
        display: block;
        text-align: right;
        padding: 12px 20px;
        background-color: transparent;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .nav-links a:after {
        display: none;
    }
    
    .nav-links a:hover {
        transform: translateY(-2px) translateX(-5px);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        letter-spacing: 1px;
    }
    
    .logo, .theme-toggle {
        margin: 0;
        z-index: 100;
    }
    
    .dark-theme nav, 
    .dark-theme .nav-links {
        background-color: transparent;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .exp-header, .project-header, .contrib-header, .lead-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date {
        margin-top: 5px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .nav-links {
        top: 70px;
        padding: 15px 20px;
    }
    
    .nav-links li {
        width: 100%;
        margin: 8px 0;
    }
    
    .nav-links a {
        font-size: 15px;
        padding: 10px 15px;
        text-align: right;
    }
    
    .nav-links a:hover {
        transform: translateY(-2px) translateX(-3px);
    }
    
    header {
        padding-top: 160px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .experience-item, .project-item, .contribution-item, .leadership-item {
        padding: 20px 15px;
    }
}

/* Code formatting */
code {
    font-family: 'Inconsolata', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

.dark-theme code {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Tooltip for better UX */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
