/* ===============================
   GLOBAL & THEME VARIABLES
=================================*/
:root {
    --bg-color: #0a192f;
    --text-color: white;
    --accent: #00f7ff;
    --card-bg: #112240;
    --text-muted: #ccd6f6;
    --nav-bg: rgba(10, 25, 47, 0.85);
}

body.light-mode {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --accent: #0284c7;
    --card-bg: #ffffff;
    --text-muted: #475569;
    --nav-bg: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

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

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ===============================
   NAVIGATION
=================================*/
nav {
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px 10%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 10;
    transition: background 0.3s;
}

nav .logo {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.3rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    transition: 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 20px;
}

/* ===============================
   SECTIONS
=================================*/
.section {
    padding: 120px 10%;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: 0.8s ease;
}

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

.section h2 {
    font-size: 2.6rem;
    margin-bottom: 50px;
}

.section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* ===============================
   HERO SECTION
=================================*/
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    width: 90%;
    max-width: 1100px;
}

.hero-left {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent);
    box-shadow: 0 0 35px rgba(0, 247, 255, 0.6);
    transition: 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.hero-right {
    flex: 1.2;
}

.hero-right h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.glow {
    font-size: 4.8rem;
}

.role {
    font-size: 1.6rem;
    margin: 15px 0;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 25px;
}

.social-links a {
    font-size: 1.6rem;
    color: var(--text-muted);
    transition: 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-4px);
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero {
        text-align: center;
    }
}

/* ===============================
   ABOUT SECTION
=================================*/
.about-section {
    position: relative;
    padding: 180px 10%;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.about-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/about-bg.png") center center / cover no-repeat;
    opacity: 0.8; 
    z-index: -2;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.about-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--bg-color) 0%, transparent 20%, transparent 80%, var(--bg-color) 100%);
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s;
}

body.light-mode .about-section::before {
    opacity: 0.15;
}

.about-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent), #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(0, 247, 255, 0.4);
    z-index: 1;
}

body.light-mode .about-title {
    background: linear-gradient(90deg, #0369a1, #6b21a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.typing-text {
    font-size: 1.2rem;
    margin-bottom: 60px;
    color: var(--accent);
    letter-spacing: 1px;
    z-index: 1;
}

body.light-mode .typing-text {
    color: #0369a1;
    font-weight: 600;
}

#typing::after {
    content: "|";
    margin-left: 5px;
    animation: blink 1s infinite;
}

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

.about-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 1;
}

.about-card {
    width: 100%;
    max-width: 680px; 
    padding: 45px;
    border-radius: 20px;
    background: rgba(10, 25, 47, 0.65); 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(0, 247, 255, 0.3);
    position: relative;
    transition: 0.4s ease;
}

body.light-mode .about-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(120deg, var(--accent), transparent, #8a2be2);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.about-card p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 20px;
}

.about-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 45px rgba(0, 247, 255, 0.35);
}

/* ===============================
   SKILLS - MODERN UI
=================================*/
.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.glass {
    background: rgba(17, 34, 64, 0.55);
    backdrop-filter: blur(18px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 247, 255, 0.2);
    position: relative;
    transition: 0.4s ease;
}

body.light-mode .glass {
    background: var(--card-bg);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(120deg, var(--accent), transparent, var(--accent));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.glass:hover {
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.3);
    transform: translateY(-8px);
}

.skills-box h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.skills-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.skills-items .skill-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 9px);
}

.skill-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: 0.3s ease;
    transform-style: preserve-3d;
}

body.light-mode .skill-card {
    background: rgba(0, 0, 0, 0.04);
}

.skill-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 6px rgba(0, 247, 255, 0.4));
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.skill-card:hover {
    transform: rotateX(6deg) rotateY(-6deg) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 247, 255, 0.2);
    background: rgba(0, 247, 255, 0.08);
}

@media (max-width: 900px) {
    .skills-container {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   PROJECTS
=================================*/
.project-card, .education-card {
    background: var(--card-bg);
    transition: background 0.3s, transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card {
    padding: 35px;
    margin: 40px 0;
    border-radius: 18px;
    text-align: left;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 247, 255, 0.2);
}

.project-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-header h3, .edu-details h3 {
    color: var(--accent);
}

.project-date {
    opacity: 0.7;
    font-size: 0.9rem;
}

.project-points {
    margin-bottom: 20px;
    padding-left: 20px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-stack span {
    background: rgba(0, 247, 255, 0.05);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 247, 255, 0.3);
    transition: 0.3s ease;
}

.tech-stack span:hover {
    background: rgba(0, 247, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
}

.github-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s ease;
}

.github-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
}

/* ===============================
   CERTIFICATES GRID
=================================*/
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 40px auto 0;
}

.cert-card {
    background: var(--card-bg);
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: 0.4s ease;
    border: 1px solid rgba(0, 247, 255, 0.1);
}

body.light-mode .cert-card {
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 247, 255, 0.15);
    border-color: rgba(0, 247, 255, 0.3);
}

.cert-logo-bg {
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.cert-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cert-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 25px;
}

.cert-info h3 {
    color: var(--accent);
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.cert-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cert-btn {
    display: inline-block;
    width: 100%;
    padding: 10px 0;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
}

.cert-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
}

@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   CV SECTION ENHANCEMENTS
=================================*/
.cv-card {
    background: var(--card-bg);
    padding: 50px 40px;
    border-radius: 18px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(0, 247, 255, 0.1); 
    transition: 0.4s ease;
}

body.light-mode .cv-card {
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.cv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 247, 255, 0.15);
    border-color: rgba(0, 247, 255, 0.3); 
}

.cv-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.cv-card p {
    color: var(--text-muted);
    margin-bottom: 30px; 
    line-height: 1.7;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; 
    padding: 12px 28px;
    border: 2px solid var(--accent); 
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: transparent;
}

.cv-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.4); 
}

/* ===============================
   EDUCATION
=================================*/
.education-card {
    margin: 50px auto;
    padding: 28px 40px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 25px;
    max-width: 550px;
}

.edu-logo {
    width: 75px;
}

.edu-details h3 {
    margin-bottom: 6px;
}

/* ===============================
   BACKGROUND EFFECTS (Global)
=================================*/
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at 20% 30%, rgba(0,247,255,0.12), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,0,255,0.12), transparent 50%);
    animation: moveLights 20s infinite alternate;
}

@keyframes moveLights {
    0% { background-position: 20% 30%, 80% 70%; }
    100% { background-position: 30% 40%, 70% 60%; }
}

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
}

.grid-bg::before {
    content: "";
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(0,247,255,0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,247,255,0.25) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(1000px) rotateX(var(--rotateX,65deg)) rotateY(var(--rotateY,0deg)) scale(1.5);
    animation: moveGrid 15s linear infinite;
    filter: blur(1px);
    opacity: 0.7;
}

body.light-mode .grid-bg::before {
    background-image: 
        linear-gradient(rgba(2, 132, 199, 0.4) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(2, 132, 199, 0.4) 1px, transparent 1px);
    opacity: 0.9;
}

.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.particles span {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(0, 247, 255, 0.6);
    box-shadow: 0 0 15px var(--accent);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

body.light-mode .particles span {
    background: rgba(2,132,199,0.6);
}

@keyframes floatParticle {
    from { transform: translateY(100vh); }
    to   { transform: translateY(-10vh); }
}



/* ===============================
   EDUCATION - TIMELINE UI
=================================*/
.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0;
    padding-left: 45px; 
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(0, 247, 255, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -51px; 
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    z-index: 2;
    transition: 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}

.timeline-content.education-card {
    margin: 0;
    max-width: 100%;
    background: var(--card-bg);
    border: 1px solid rgba(0, 247, 255, 0.1);
    border-radius: 18px;
    padding: 30px;
    display: block; 
    text-align: left;
    transition: 0.4s ease;
}

body.light-mode .timeline-content.education-card {
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.timeline-content.education-card:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 247, 255, 0.15);
    border-color: rgba(0, 247, 255, 0.3);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

body.light-mode .edu-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.edu-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.edu-date {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 247, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 247, 255, 0.2);
}

.edu-details h3 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.edu-details h4 {
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.edu-score {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .edu-score {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.edu-score span {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 30px;
    }
    .timeline-dot {
        left: -36px;
    }
    .edu-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}


/* ===============================
   CONTACT SECTION
=================================*/
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 40px auto 0;
}

.contact-card {
    background: var(--card-bg);
    padding: 25px 30px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid rgba(0, 247, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

body.light-mode .contact-card {
    border: 1px solid rgba(2, 132, 199, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.contact-card:hover {
    transform: translateX(10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 247, 255, 0.15);
}

.contact-icon {
    width: 55px;
    height: 55px;
    background: rgba(0, 247, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 25px;
    transition: 0.3s ease;
}

.contact-icon i {
    color: var(--accent);
    font-size: 1.5rem;
}

.contact-card:hover .contact-icon {
    background: var(--accent);
}

.contact-card:hover .contact-icon i {
    color: var(--bg-color);
}

.contact-info {
    text-align: left;
    flex-grow: 1;
}

.contact-info h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-info p {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.contact-arrow {
    color: var(--accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: 0.3s ease;
}

.contact-card:hover .contact-arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 600px) {
    .contact-card {
        padding: 20px;
    }
    .contact-icon {
        width: 45px;
        height: 45px;
        margin-right: 15px;
    }
    .contact-info p {
        font-size: 0.95rem;
    }
}