/* ==================== VARIABLES ==================== */
:root {
    /* Colors - Light Theme */
    --first-color: #8b5cf6; /* Neon Purple */
    --second-color: #ec4899; /* Magenta */
    --text-color: #334155;
    --text-color-light: #64748b;
    --body-color: #f8fafc; /* Slightly darker off-white */
    --container-color: #ffffff;
    --header-color: rgba(248, 250, 252, 0.8);
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --grid-color: rgba(0, 0, 0, 0.03); /* Subtle grid for light mode */
    
    /* Typography */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Outfit', sans-serif;
    
    /* Z-indexes */
    --z-fixed: 100;
}

/* ==================== DARK THEME (Lighter Charcoal) ==================== */
body.dark-theme {
    --text-color: #f1f5f9;
    --text-color-light: #94a3b8;
    --body-color: #111112; /* Softer Charcoal background */
    --container-color: #18181b; /* Slightly lighter for cards */
    --header-color: rgba(17, 17, 18, 0.8);
    --border-color: #27272a;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --grid-color: rgba(255, 255, 255, 0.03); /* Subtle grid for dark mode */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 1rem;
    background-color: var(--body-color);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px; /* Programmer grid size */
    color: var(--text-color);
    transition: background-color .4s, color .4s;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--title-font);
    color: var(--text-color);
    font-weight: 600;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* ==================== REUSABLE CLASSES ==================== */
.container {
    max-width: 1024px;
    margin-inline: auto; /* Centering fix */
    padding-inline: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding-block: 5rem 2rem;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--first-color), var(--second-color));
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.accent-text {
    background: linear-gradient(90deg, var(--first-color), var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: .5rem;
    font-weight: 600;
    transition: transform .3s, box-shadow .3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--first-color), var(--second-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--first-color);
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-color);
    backdrop-filter: blur(10px);
    z-index: var(--z-fixed);
    border-bottom: 1px solid var(--border-color);
    transition: background-color .4s;
}

.nav {
    height: 4.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.nav-link {
    font-weight: 500;
    transition: color .3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--first-color);
}

.theme-toggle {
    background: none;
    color: var(--text-color);
    display: flex;
    font-size: 1.25rem;
}

.sun-icon { display: none; }
body.dark-theme .sun-icon { display: block; }
body.dark-theme .moon-icon { display: none; }

/* ==================== HERO ==================== */
.hero-container {
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Center everything in Hero */
    min-height: calc(100vh - 4.5rem);
    justify-content: center;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    margin-inline: auto;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-img-box {
    margin-top: 1rem;
}

.hero-img-blob {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--first-color), var(--second-color));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    animation: blobify 8s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid rgba(255, 255, 255, 0.1);
}

@keyframes blobify {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%; }
}

.hero-img {
    width: 105%; /* Slight scale to hide edges better */
    height: 105%;
    object-fit: cover;
    transition: transform .5s ease;
}

.hero-img-blob:hover .hero-img {
    transform: scale(1.1);
}

/* ==================== ABOUT ==================== */
.about-container {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

.about-text {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-soft-skills {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-tag {
    padding: .5rem 1rem;
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: .875rem;
    font-weight: 500;
    transition: background-color .3s, border-color .3s;
}

.skill-tag:hover {
    border-color: var(--first-color);
    background-color: var(--body-color);
}

/* ==================== SKILLS ==================== */
.skills-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Better sizing */
    justify-content: center; /* Center the grid items */
}

.skill-card {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: transform .3s, border-color .3s;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items inside card */
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--first-color);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.skill-card-title {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.skill-list {
    width: 100%;
}

.skill-list li {
    margin-bottom: .75rem;
    color: var(--text-color-light);
}

/* ==================== EXPERIENCE ==================== */
.experience-container {
    max-width: 800px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.exp-item {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.exp-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background-color: var(--first-color);
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 5px;
    box-shadow: 0 0 10px var(--first-color);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.exp-role {
    font-size: 1.25rem;
}

.exp-date {
    font-size: .875rem;
    color: var(--first-color);
    font-weight: 600;
}

.exp-company {
    color: var(--text-color-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.exp-details {
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.exp-details li {
    margin-bottom: .5rem;
    list-style: disc;
    color: var(--text-color-light);
}

.exp-techs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.exp-techs span {
    font-size: .75rem;
    padding: .25rem .75rem;
    background: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: .25rem;
}

/* ==================== EDUCATION & HONORS ==================== */
.education-container {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

.education-item {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.honors-badge {
    display: inline-block;
    padding: .5rem 1.5rem;
    background: linear-gradient(90deg, #f59e0b, #d97706); /* Gold gradient */
    color: #fff;
    border-radius: 2rem;
    font-weight: 700;
    font-size: .875rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

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

.certificate-placeholder {
    aspect-ratio: 4/3;
    background-color: var(--body-color);
    border: 2px dashed var(--border-color);
    border-radius: .5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color-light);
    font-size: .875rem;
    transition: border-color .3s;
}

.certificate-placeholder:hover {
    border-color: var(--first-color);
}

/* ==================== CONTACT ==================== */
.contact-container {
    max-width: 800px;
    margin-inline: auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: .75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.contact-icon {
    font-size: 2rem;
    color: var(--first-color);
    margin-bottom: 1rem;
}

.contact-card-title {
    font-size: 1rem;
    margin-bottom: .25rem;
}

.contact-card-data {
    font-size: .875rem;
    margin-bottom: .75rem;
    word-break: break-all;
}

.contact-button {
    font-size: .875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    color: var(--first-color);
}

/* ==================== FOOTER ==================== */
.footer {
    padding-block: 4rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--container-color);
}

.footer-container {
    text-align: center;
}

.footer-logo {
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-link:hover {
    color: var(--first-color);
}

.footer-copy {
    font-size: .875rem;
    color: var(--text-color-light);
}

/* ==================== BREAKPOINTS ==================== */
@media screen and (min-width: 768px) {
    .container {
        padding-inline: 0;
    }
    
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 4rem;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-btns {
        justify-content: flex-start;
    }
    
    .hero-img-blob {
        width: 320px;
        height: 320px;
    }
    
    .nav-toggle {
        display: none;
    }
}

@media screen and (max-width: 767px) {
    .nav-menu {
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--header-color);
        backdrop-filter: blur(15px);
        padding: 1rem 2rem;
        border-radius: 3rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        border: 1px solid var(--border-color);
        width: max-content;
    }
    
    .nav-list {
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    body {
        background-size: 30px 30px; /* Smaller grid on mobile */
    }

    .hero-img-blob {
        width: 240px;
        height: 240px;
    }
}
