:root {
    /* Elegant Gradient Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --secondary-color: #ec4899;
    /* Pink 500 */
    --accent-color: #8b5cf6;
    /* Violet 500 */

    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
    --gradient-text: linear-gradient(to right, #c7d2fe, #fbcfe8);

    /* Text - Softer Whites */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    /* Slate 300 */

    /* Backgrounds - Richer Depth */
    --bg-body: #030014;
    /* Very Dark Indigo/Black */
    --bg-card: rgba(17, 25, 40, 0.75);
    /* Glassy Deep Blue */
    --bg-nav: rgba(3, 0, 20, 0.8);

    /* UI Elements */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(168, 85, 247, 0.4);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    --radius: 1.5rem;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Spacing */
    --section-padding: 7rem 0;
}

[data-theme="light"] {
    --primary-color: #4f46e5;
    --text-main: #1e1b4b;
    /* Dark Indigo */
    --text-muted: #475569;
    --bg-body: #fdfbf7;
    /* Warm White */
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-nav: rgba(255, 255, 255, 0.9);
    --border-color: rgba(99, 102, 241, 0.2);
    --gradient-text: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 25%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
    color: var(--text-main);
    line-height: 1.2;
    font-family: 'Space Grotesk', sans-serif;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 2em rgba(168, 85, 247, 0.2));
}

h2 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] h2 {
    background: linear-gradient(to right, #1e1b4b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 6px;
    bottom: -15px;
    left: 0;
    background: var(--gradient-main);
    border-radius: 10px;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.4s ease;
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: #fff;
    background: var(--gradient-main);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Decorative Background Blobs - Enhanced */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    animation: float 15s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Profile Image - Elegant Morph */
.profile-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-img-container {
    width: 380px;
    height: 380px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    position: relative;
    animation: morph 8s ease-in-out infinite;
    background: transparent;
    padding: 10px;
    /* Space for border */
}

.profile-img-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 3px;
    background: var(--gradient-main);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 10s linear infinite;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

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

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

@keyframes spin {
    to {
        --angle: 360deg;
    }

    /* Simulating gradient spin effect if property supported, else just static gradient */
}

/* Button Styles - Gradient & Glow */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: #fff;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

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

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
}

.social-icon:hover {
    border-color: transparent;
    color: #fff;
    background: var(--gradient-main);
    transform: translateY(-5px) rotate(10deg);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* About Section */
.about {
    padding: var(--section-padding);
}

.about-content {
    background: var(--bg-card);
    padding: 3.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.about-content::before {
    content: '"';
    position: absolute;
    top: -30px;
    left: 20px;
    font-size: 12rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.1;
    font-family: serif;
}

/* Skills Section */
/* Skills Section */
.skills {
    padding: var(--section-padding);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

/* Glass & Glow Skill Cards */
.skill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Very subtle border */
    padding: 1.5rem 1rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.3);
}

.skill-card:hover::before {
    opacity: 0.1;
    /* Soft tint on hover */
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.3));
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
}

.skill-name {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-name {
    color: #fff;
}

/* Timeline */
.timeline-section {
    padding: var(--section-padding);
}

.timeline {
    border-left: 2px solid rgba(99, 102, 241, 0.3);
    margin-left: 1rem;
    padding-left: 2.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: -3.15rem;
    top: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--bg-body);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.timeline-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.timeline-content:hover {
    border-color: var(--accent-color);
    background: rgba(17, 25, 40, 0.9);
    transform: translateX(10px);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-main);
}

.timeline-date {
    font-size: 0.9rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 6rem;
    align-items: center;
}

.project-card:nth-child(even) .project-img-wrapper {
    order: 2;
}

.project-img-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: var(--transition);
}

.project-img-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.2);
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(3, 0, 20, 0.6), transparent);
    opacity: 0.6;
}

.project-img {
    width: 100%;
    height: auto;
    transition: transform 0.8s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tech-tag {
    font-size: 0.85rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.link-btn {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.link-btn:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}


/* Contact Section */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
}

.form-input,
.form-textarea {
    background: rgba(3, 0, 20, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 1rem;
    width: 100%;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    outline: none;
    background: rgba(3, 0, 20, 0.6);
}

.submit-btn {
    background: var(--gradient-main);
    color: #fff;
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Footer & Scoll Top (unchanged mostly, just verify colors) */
footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    background-color: var(--bg-body);
}

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-main);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    z-index: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 968px) {
    h1 {
        font-size: 3rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero p {
        margin: 0 auto 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .profile-visual {
        justify-content: center;
    }

    .project-card {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-card:nth-child(even) .project-img-wrapper {
        order: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        border-radius: 0;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .container {
        width: 92%;
    }

    .timeline {
        margin-left: 0;
        padding-left: 1.5rem;
    }

    .timeline-dot {
        left: -2.15rem;
    }
}
/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-main);
  z-index: 2000;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: width 0.1s ease-out;
}

/* Typing Cursor Effect */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--secondary-color);
  margin-left: 5px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Staggered Reveal Delays */
.reveal.active:nth-child(1) { transition-delay: 0.1s; }
.reveal.active:nth-child(2) { transition-delay: 0.2s; }
.reveal.active:nth-child(3) { transition-delay: 0.3s; }
.reveal.active:nth-child(4) { transition-delay: 0.4s; }
