:root {
    --bg-color: #0d120d;
    --text-main: #e8f5e9;
    --text-muted: #a5cca5;
    --accent-primary: #39ff14;
    --accent-secondary: #008f11;
    --glass-bg: rgba(57, 255, 20, 0.04);
    --glass-border: rgba(57, 255, 20, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: auto;
}

::selection {
    background: var(--accent-primary);
    color: #000;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 10;
    background: rgba(5, 5, 10, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand .logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-link:hover {
    color: var(--accent-primary);
    transform: scale(1.2) translateY(-2px);
    text-shadow: 0 0 15px var(--accent-primary), 0 0 30px var(--accent-primary);
    z-index: 10;
}

.nav-link.active {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

#main-content {
    position: relative;
    height: 100vh;
    width: 100vw;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 80px;
}

.page-section {
    min-height: calc(100vh - 80px);
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding: 4rem 5%;
    align-items: center;
    justify-content: center;
}

.page-section.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInPage 0.6s ease forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: scale(0.98) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.section-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 3.8rem;
    margin-bottom: 3.5rem;
    text-align: center;
    font-weight: 800;
}

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

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

#home {
    align-items: center;
    justify-content: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

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

.hero-image-wrapper {
    flex: 1;
    max-width: 480px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--accent-secondary);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.15);
    display: flex;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    /* Slight brightness tweak to blend with dark bg, original colors */
    filter: brightness(0.9) contrast(1.05);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-image-wrapper:hover .hero-image {
    filter: brightness(1) contrast(1.05);
    transform: scale(1.02);
}

.greeting {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.name {
    font-size: 6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.title {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 3.5rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.5);
}

.btn-primary:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 0 30px var(--accent-primary), 0 0 60px var(--accent-primary), 0 0 90px var(--accent-primary);
    color: #000;
    z-index: 10;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000;
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 0 30px #ffffff, 0 0 60px #ffffff;
    z-index: 10;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.about-text p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.about-text p strong {
    color: var(--text-main);
}

.education-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-primary);
}

.edu-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.edu-item .uni {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.edu-item .status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(57, 255, 20, 0.15);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.edu-item .cgpa {
    font-size: 1.2rem;
    font-weight: 600;
}
.edu-item .cgpa span {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-secondary);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
}
.skill-category li::before {
    content: '▹';
    color: var(--accent-primary);
    margin-right: 10px;
}
.skill-category li:last-child {
    border-bottom: none;
}

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

.project-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card.project-link-card::after {
    display: none; /* override nav-link underline */
}

.project-card.project-link-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 30px var(--accent-primary), 0 0 60px var(--accent-primary);
    border-color: var(--accent-primary);
    z-index: 10;
}

.project-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

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

.project-features {
    list-style: none;
}

.project-features li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.project-features li i {
    color: var(--accent-secondary);
    margin-top: 3px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 10, 0.98);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid var(--glass-border);
        padding: 3rem 0;
        transform: translateY(-200%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: -1;
        box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    }
    .nav-links.active {
        transform: translateY(0);
    }
    .hamburger {
        display: block;
    }
    .name { font-size: 3.5rem; }
    .title { font-size: 1.3rem; }
    .about-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; } /* Safety constraint */
    .projects-grid { grid-template-columns: 1fr; } /* Force projects to perfectly fit mobile screen width */
    .page-section { padding: 3rem 5%; }
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text { text-align: center; }
    .cta-buttons { 
        justify-content: center; 
        gap: 1rem;
        flex-wrap: wrap;
    }
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        white-space: nowrap;
    }
    .hero-image-wrapper { max-width: 250px; margin: 0 auto; }
    
    /* Mobile adjustments for Omnitrix Lock Screen */
    .omnitrix-container {
        transform: scale(0.8);
        margin-bottom: 1rem;
    }
    .entry-text {
        text-align: center;
        font-size: 1.3rem;
        padding: 0 1rem;
        letter-spacing: 2px;
    }
}

/* --- CUSTOM GLOWING CURSOR --- */
@media (pointer: fine) and (hover: hover) {
    body, a, button, input, textarea, select, .nav-link, .btn, .glass-card {
        cursor: none !important;
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background: transparent;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s;
        backdrop-filter: invert(1) hue-rotate(250deg);
        -webkit-backdrop-filter: invert(1) hue-rotate(250deg);
    }

    .custom-cursor.hover {
        width: 50px;
        height: 50px;
        background: transparent;
    }
}

@media (pointer: coarse), (hover: none) {
    .custom-cursor {
        display: none !important;
    }
}

/* --- BUTTON FLASH ANIMATION --- */
@keyframes flashGlow {
    0% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 10px var(--accent-primary); }
    40% { transform: scale(1.1); filter: brightness(1.5); box-shadow: 0 0 40px var(--accent-primary), 0 0 80px var(--accent-primary); background: var(--accent-primary); color: #000; }
    100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 10px var(--accent-primary); }
}

.flash-effect {
    animation: flashGlow 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

/* --- PAGE TRANSITION FLASH --- */
#page-transition-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, #ffffff 0%, var(--accent-primary) 50%, #002200 100%);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

#page-transition-flash.active {
    opacity: 1;
    transition: opacity 0.1s ease-in; /* faster flash in */
}

/* --- OMNITRIX ENTRY SCREEN --- */
#entry-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0d120d;
    z-index: 100000;
    display: none; /* Hidden by default to prevent flicker */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

html.show-entry-lock #entry-screen {
    display: flex;
}

#entry-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.omnitrix-container {
    position: relative;
    margin-bottom: 3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.omnitrix-knob {
    position: absolute;
    width: 30px;
    height: 60px;
    background: #111;
    border: 3px solid #222;
    border-radius: 6px;
    z-index: 1;
    box-shadow: inset 0 0 8px rgba(57, 255, 20, 0.3);
}

.omnitrix-knob.left { left: -22px; border-right: none; }
.omnitrix-knob.right { right: -22px; border-left: none; }

.omnitrix-knob::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 3px;
    background: rgba(57, 255, 20, 0.5);
}
.omnitrix-knob.left::after { right: 0; }
.omnitrix-knob.right::after { left: 0; }

.omnitrix-dial {
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: #050505;
    border: 18px solid #111;
    box-shadow: 0 0 75px rgba(57, 255, 20, 0.2), inset 0 0 30px #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.omnitrix-container:hover .omnitrix-dial {
    transform: scale(1.05);
    box-shadow: 0 0 120px rgba(57, 255, 20, 0.5), inset 0 0 30px #000;
}

.omnitrix-dial::before {
    content: '';
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid rgba(57, 255, 20, 0.4);
    border-bottom: 3px solid rgba(57, 255, 20, 0.4);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    transform: rotate(45deg);
}

.omnitrix-dial::after {
    content: '';
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid rgba(57, 255, 20, 0.4);
    border-bottom: 3px solid rgba(57, 255, 20, 0.4);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    transform: rotate(-45deg);
}

.omnitrix-accent {
    position: absolute;
    width: 75px;
    height: 12px;
    background: #111;
    border-radius: 6px;
    box-shadow: inset 0 0 8px rgba(57, 255, 20, 0.3);
}

.omnitrix-accent.top { top: -6px; }
.omnitrix-accent.bottom { bottom: -6px; }

.omnitrix-inner-ring {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: #000;
    border: 9px solid #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 22px rgba(57, 255, 20, 0.6);
}

.omnitrix-core {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: var(--accent-primary);
    position: relative;
    box-shadow: 0 0 75px var(--accent-primary), inset 0 0 30px #fff;
    overflow: hidden;
}

.omnitrix-side-cover {
    position: absolute;
    width: 50%;
    height: 100%;
    background: #050505;
    top: 0;
}

.omnitrix-side-cover.left-cover {
    left: -3px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.omnitrix-side-cover.right-cover {
    right: -3px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.omnitrix-dial.spin {
    animation: spinDial 1.5s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

@keyframes spinDial {
    0% { transform: rotate(0deg) scale(1.05); filter: brightness(1); }
    100% { transform: rotate(1080deg) scale(1.2); filter: brightness(3); }
}

.entry-text {
    font-size: 1.8rem;
    color: var(--text-main);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    animation: pulseText 1.5s infinite alternate;
}

@keyframes pulseText {
    0% { opacity: 0.5; text-shadow: 0 0 5px transparent; }
    100% { opacity: 1; text-shadow: 0 0 20px var(--accent-primary); color: var(--accent-primary); }
}
