:root {
    /* Dark Mode (Default) */
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary-color: #00f3ff;
    /* Neon Cyan */
    --secondary-color: #ff00ff;
    /* Neon Pink */
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --glow-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.light-mode {
    /* Light Mode Overrides */
    --bg-color: #f0f2f5a3;
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --primary-color: #0066cc;
    /* Deep Blue */
    --secondary-color: #cc00cc;
    /* Deep Purple */
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(240, 242, 245, 0.8);
    --glow-shadow: 0 0 15px rgba(0, 102, 204, 0.2);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Text Selection */
::selection {
    background: var(--primary-color);
    color: #000;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

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

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

.nav-links li a {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

/* Neon Effect  on the navigation button*/
.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.3s;
}

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

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

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

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

.dot {
    color: var(--primary-color);
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

#theme-toggle:hover {
    transform: rotate(20deg);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
    /* Ensure background elements don't overflow */
}

#canvas1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    /* Subtle effect */
    pointer-events: none;
    /* Let clicks pass through if needed, but we want interaction so moving logic to JS if pointer events required, actually keeping it enabled for mouse interaction */
    pointer-events: auto;
}

/* Hero Aurora Background Effect */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, rgba(255, 0, 255, 0.05) 50%, transparent 70%);
    animation: rotateBackground 20s linear infinite;
    z-index: 0;
    filter: blur(80px);
}

@keyframes rotateBackground {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    max-width: 600px;
    z-index: 10;
}

.greeting {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-color), var(--primary-color), var(--secondary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 5s linear infinite;
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.typewriter {
    color: var(--secondary-color);
    font-weight: 600;
    margin-left: 5px;
}

.cursor {
    color: var(--secondary-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 2px solid rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    animation: morph 8s ease-in-out infinite, float 6s ease-in-out infinite;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.glow-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.2), transparent 70%);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

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

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    /* Always black text on neon for contrast */
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 5rem 5%;
    /* Reduced side padding (was 10%) to fill more space */
    max-width: 1400px;
    /* Prevent it from getting too wide on huge screens */
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* About Grid */
.about-grid {
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.achievements {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.achievement-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    width: 200px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-shadow);
    border-color: var(--primary-color);
}

.achievement-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.achievement-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.achievement-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Education Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Vertical Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

/* Left side */
.timeline-item:nth-child(odd) {
    left: 0;
}

/* Right side */
.timeline-item:nth-child(even) {
    left: 50%;
}

/* Dot */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-color);
    border: 4px solid #111;
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

/* Content Box */
.timeline-content {
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 15px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    position: relative;
    transition: transform 0.3s;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-shadow);
}

.timeline-date {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
    display: inline-block;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.timeline-content h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 300;
}

.scholarship,
.location {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.gpa-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.gpa-tag {
    background: rgba(0, 243, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Timeline Mobile Responsive */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
        right: auto;
    }
}

/* Cards Grid (Skills & Hobbies) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    /* Faster transform for tilt */
    transform-style: preserve-3d;
    perspective: 1000px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    box-shadow: var(--glow-shadow);
    border-color: var(--secondary-color);
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    transform: translateZ(20px);
    /* Pop out effect */
}

.card h3 {
    margin-bottom: 1rem;
    transform: translateZ(15px);
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    transform: translateZ(10px);
}

/* Contact */
/* Contact Form */
.contact-container {
    display: flex;
    justify-content: space-between;
    /* Push elements to the edges */
    gap: 2rem;
    flex-wrap: wrap;
    align-items: stretch;
    /* Make them same height if possible */
    width: 100%;
}

.glass-form {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    width: 100%;
    flex: 2;
    /* Take up more space */
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    /* Darker background for contrast */
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.social-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    flex: 1;
    /* Take up remaining space */
    min-width: 280px;
    justify-content: center;
}

.social-links-vertical .social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.social-links-vertical .social-btn:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateX(10px);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    border-color: transparent;
}

.social-links-vertical .social-btn i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
    margin-top: 3rem;
}

footer i {
    color: var(--secondary-color);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        display: none;
        /* Simple hide for now, could add hamburger later */
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 80px;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .title {
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .section {
        padding: 5rem 5%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .contact-container {
        flex-direction: column;
    }

    .glass-form,
    .social-links-vertical {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        display: none;
        /* Hide nav links on mobile for simplicity or implement burger */
    }

    .navbar {
        justify-content: space-between;
        padding: 1.5rem 5%;
    }

    /* Hero */
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        align-items: center;
        margin-top: 2rem;
    }

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

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

    .profile-img {
        width: 250px;
        height: 250px;
        margin-bottom: 2rem;
    }

    /* Sections */
    .section-title {
        font-size: 2rem;
    }

    /* Cards */
    .about-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card {
        width: 100%;
    }

    /* Contact */
    .contact-container {
        gap: 3rem;
    }
}