@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #2563EB;
    --background-dark: #050816;
    --card-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-light: #f0f0f0;
    --text-secondary: #aaa;
    --glow-color: rgba(37, 99, 235, 0.5);
}

*{margin:0;padding:0;box-sizing:border-box;scroll-behavior:smooth;font-family:'Poppins',sans-serif; text-decoration: none;}

body{
color: var(--text-light);
overflow-x: hidden;
cursor: none; /* Hide default cursor for custom one */
    /* Animated Gradient Background for a premium, 3D feel */
    background: linear-gradient(-45deg, #02040a, #050816, #111827, #050816);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
background-attachment:fixed;
}

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

body.no-scroll {
    overflow: hidden;
}

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

ul { list-style: none; }
/* =================================
   2. PARTICLES & CURSOR
   ================================= */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.cursor-glow {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    opacity: 0.3;
    filter: blur(20px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    z-index: 9999;
}

/* =================================
   3. WELCOME SCREEN
   ================================= */
#welcome-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1001; transition: opacity 0.5s ease;
}

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

.welcome-box {
    background: var(--card-glass); border: 1px solid var(--border-glass);
    padding: 40px; border-radius: 20px; text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
    transform: scale(0.9);
    animation: popIn 0.5s forwards;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.btn, .btn2 {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.welcome-logo { width: 80px; margin-bottom: 20px; }
.welcome-box h1 { font-size: 48px; margin-bottom: 10px; }
.welcome-box p { color: var(--text-secondary); margin-bottom: 30px; }

header{position:fixed;top:0;left:0;width:100%;z-index:1000; transition: background 0.3s ease;}

.navbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    height: 80px;
}

.logo img{width:50px;transition:transform 0.3s ease}
.logo img:hover{transform:scale(1.1)}

.nav-links{display:flex}
.nav-links li{margin-left:35px}
.nav-links a{
color: var(--text-light);
font-size:17px;
font-weight: 500;
position: relative;
}
.nav-links a:hover, .nav-links a.active{color:var(--primary-blue)}
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--primary-blue);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

header.scrolled {
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.hero{
min-height:100vh;
display:flex;
justify-content:space-between;
align-items: center;
position:relative;
}

.hero::before{
content:"";
position:absolute;
width:300px;
height:300px;
right: 0;
top: 0;
background:var(--primary-blue);
filter:blur(180px);
border-radius:50%;
opacity: 0.4;
}

.hero-content{width:55%;z-index:2}
.hero-content h3{font-size:28px;color:#60a5fa}
.hero-content h1{font-size:60px;margin:10px 0}
.hero-content h2{font-size:32px;color:var(--primary-blue); margin-bottom: 20px;}
.hero-content p{
font-size:17px;
line-height:1.8;
color:var(--text-secondary);
}

/* Typing Animation Placeholders */
.hero-content .animate-text {
    opacity: 0;
    transform: translateY(20px);
}

.hero-btn{display:flex;gap:20px;margin-top:40px}

.btn,.btn2{
padding:12px 28px;
border-radius:50px;
font-weight:600;
transition:.3s;
}

.btn{
background:#2563eb;
color: var(--text-light);
box-shadow:0 0 25px var(--glow-color);
}

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

.welcome-box #enter-btn {
    border: none;
    cursor: pointer;
    font-size: 16px;
    /* Inherit styles from .btn for consistency */
    background: var(--primary-blue);
    box-shadow: 0 0 25px var(--glow-color);
    color: #fff;
}

.btn2{
border:2px solid #2563eb;
color: var(--text-light);
}

.btn2:hover, #enter-btn:hover{
    background: var(--primary-blue);
    color: #fff;
    transform: translateY(-3px);
}

.social-icons{
display:flex;
gap:15px;
margin-top:40px
}

.social-icons a{
width:45px;
height:45px;
display:flex;
justify-content:center;
align-items:center;
border-radius:50%;
background: var(--card-glass);
border:1px solid var(--border-glass);
color: var(--text-light);
font-size:20px;
transition:.3s;
}

.social-icons a:hover{
background:#2563eb;
transform:translateY(-5px);
box-shadow:0 0 25px var(--glow-color);
}

.hero-image{
width:40%;
display:flex;
justify-content:center;
}

.hero-image img{
width:350px;
height:350px;
object-fit:cover;
border-radius:50%;
padding:8px;
background:linear-gradient(45deg, var(--primary-blue), #60a5fa);
box-shadow:0 0 60px var(--glow-color);
animation:float 4s ease-in-out infinite, rotateBorder 8s linear infinite;
transition: transform 0.3s ease;
}

@keyframes float{
0%,100%{transform:translateY(0)}
50%{transform:translateY(-20px)}
}

@keyframes rotateBorder{
    from{ transform:rotate(0deg); }
    to{ transform:rotate(360deg); }
}

section {
    padding: 120px 8%;
    position: relative;
    z-index: 2;
}

.section-title-sub {
    color: var(--primary-blue);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 42px;
    margin-bottom: 50px;
}

/* =================================
   6. ABOUT SECTION
   ================================= */
.about {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-image {
    flex-basis: 35%;
    position: relative;
    border-radius: 20px;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-blue), transparent 30%, transparent 70%, var(--primary-blue));
    transition: all 0.4s ease;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 0 40px var(--glow-color);
    display: block;
    transition: transform 0.4s ease;
}

.about-image:hover {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue));
}

.about-image:hover img {
    transform: scale(0.95);
}

.about-content {
    flex-basis: 60%;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.about-counters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.counter-card {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.counter-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.counter-card h3 {
    font-size: 36px;
    color: var(--primary-blue);
}

.counter-card p {
    margin: 0;
    font-size: 16px;
}

/* =================================
   7. SKILLS SECTION
   ================================= */
.skills {
    text-align: center;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.skill-card {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.skill-card:nth-child(2n) { animation-delay: -3s; }

.skill-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-blue);
    box-shadow: 0 0 30px var(--glow-color);
    animation-play-state: paused;
}

.skill-card h3 {
    font-size: 18px;
    font-weight: 600;
}

/* =================================
   8. PROJECTS SECTION
   ================================= */
.projects {
    text-align: center;
}

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

.project-card {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    overflow: hidden;
    text-align: left;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Specific style for the EduTrack logo to display it correctly */
#edutrack-logo {
    object-fit: contain; /* Ensures the whole logo is visible */
    padding: 1.5rem;     /* Adds some space around the logo */
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-badges span {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    font-size: 14px;
    padding: 8px 18px;
}

.project-links i {
    margin-right: 5px;
}

/* =================================
   9. EDUCATION TIMELINE
   ================================= */
.timeline-section {
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--border-glass);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transition: all 0.8s ease;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(odd).visible {
    transform: translateX(0);
    opacity: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0);
    opacity: 1;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-blue);
    top: 24px;
    border-radius: 50%;
    z-index: 1;
    border: 3px solid var(--background-dark);
    box-shadow: 0 0 10px var(--glow-color);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

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

.timeline-date {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.timeline-content {
    background: var(--card-glass);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--primary-blue);
}

.timeline-content h3 {
    font-size: 20px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

/* =================================
   10. CERTIFICATES SECTION
   ================================= */
.certificates {
    text-align: center;
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.certificate-card {
    position: relative;
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 150px;
    padding: 20px;
    transition: all 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow: 0 0 20px var(--glow-color);
}

.certificate-card h3 {
    font-size: 20px;
    font-weight: 500;
}

/* =================================
   11. CONTACT SECTION
   ================================= */
.contact-alternative {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-message {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.email-box {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.email-box span {
    padding: 0 20px;
    color: var(--text-light);
    font-size: 16px;
}

#copy-email-btn {
    border-radius: 50px;
    padding: 10px 25px;
    cursor: pointer;
}

#copy-toast {
    margin-top: 20px;
    display: inline-block;
    background: #22c55e;
    color: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* =================================
   12. TOAST NOTIFICATION
   ================================= */
#toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px var(--glow-color);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#toast-notification.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* =================================
   MODAL STYLES
   ================================= */
.modal {
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    overflow-y: auto; /* Allow vertical scrolling */
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--background-dark);
    border: 1px solid var(--border-glass);
    margin: 5vh auto; /* Add margin for spacing */
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: popIn 0.4s forwards;
}

.close-btn {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover { color: var(--text-light); }

/* New Case Study Modal Styles */
.case-study-modal-header {
    margin-bottom: 20px;
}

#case-study-modal-title {
    font-size: 32px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

#case-study-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#case-study-modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-glass);
}

.case-study-section h4 {
    font-size: 22px;
    color: var(--text-light);
    margin-top: 25px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-blue);
    display: inline-block;
}

.case-study-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

#case-study-modal-features {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}

#case-study-modal-features li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.modal-footer { margin-top: 30px; display: flex; gap: 15px; }
.modal-footer a i { margin-left: 5px; }

/* =================================
   12. FOOTER
   ================================= */
footer {
    padding: 40px 8%;
    text-align: center;
    position: relative;
    margin-top: 60px;
}

.footer-line {
    width: 100%;
    height: 1px;
    background: var(--border-glass);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.footer-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    to { left: 100%; }
}

footer .social-icons {
    justify-content: center;
    margin-bottom: 20px;
}
footer .visitor-counter {
    margin-bottom: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--primary-blue);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 0 20px var(--glow-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* =================================
   13. SCROLL REVEAL ANIMATIONS
   ================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

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

/* =================================
   14. RESPONSIVE DESIGN
   ================================= */
@media (max-width: 992px) {
    section { padding: 100px 6%; }
    .section-title { font-size: 36px; }

    .menu-icon { display: block; z-index: 1001; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background: rgba(5, 8, 22, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
    }
    .nav-links li { margin: 20px 0; }
    .nav-links.active { right: 0; }

    .hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-content { width: 100%; }
    .hero-content h1 { font-size: 48px; }
    .hero-btn, .social-icons { justify-content: center; }
    .hero-image { width: 60%; margin-top: 40px; }
    .hero-image img { width: 280px; height: 280px; }

    .about { flex-direction: column; text-align: center; }
    .about-image { flex-basis: auto; width: 70%; margin-bottom: 40px; }
    .about-content { flex-basis: auto; }
    .about-counters { grid-template-columns: 1fr 1fr; }

    .timeline::after { left: 30px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; text-align: left; }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot { left: 22px; }
}
@media (max-width: 992px) {
    .timeline-item:nth-child(odd) { transform: translateX(-30px); }
    .timeline-item:nth-child(even) { transform: translateX(30px); }
}

@media (max-width: 768px) {
    .skills-container { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .projects-container { grid-template-columns: 1fr; }
    .certificates-container { grid-template-columns: 1fr; }
    .about-counters { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body { cursor: auto; }
    .cursor-glow { display: none; }
    .section-title { font-size: 32px; }
    .hero-content h1 { font-size: 40px; }
    .hero-content h2 { font-size: 24px; }
    .hero-image img { width: 250px; height: 250px; }
    .contact-form { padding: 25px; }
}