html {
    scroll-behavior: smooth;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    z-index: 1000;
    flex-wrap: nowrap;
}

/* Left side */
.nav-left {
    display: flex;
    align-items: center;
}

/* Links */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
    /*flex-wrap: nowrap;*/

    /*
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    */
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 14px;
}

.theme-btn-nav {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: white;
    padding: 0;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    /*   
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: white;
    */
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar a {
    text-decoration: none;
    color: white;
    font-size: 14px;
}

.cv-btn {
    padding: 6px 14px;
    border-radius: 20px;
    background: #ff0057;
    white-space: nowrap;

    /*
    padding: 5px 12px;
    border-radius: 20px;
    background: #ff0057;
    */
}

.cv-icon {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: 0.3s ease;
}

/* Animate to X */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* MOBILE VIEW */
@media (max-width: 900px) {

    .nav-links {
        position: absolute;
        top: 60px;
        right: 0;
        background: rgba(0,0,0,0.95);
        width: 220px;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-radius: 0 0 0 10px;

        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hamburger {
        display: flex;
    }
}


:root {
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: white;
    --card-text: #111;
}

/*
:root {
  --primary: #00f2fe;
  --secondary: #4facfe; 
  --accent: #f093fb; 
  --bg-dark: #0f172a; 
  --glass: rgba(255, 255, 255, 0.1);
}*/

body.light-mode {
    --bg-overlay: rgba(255, 255, 255, 0.75);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-color: #111;
    --card-text: #222;
}

/* Avatar Styling */
.avatar-container {
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.4s ease;
}

.avatar-container.show-avatar {
    opacity: 1;
    transform: translateY(0);
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    transition: 0.3s;
}

.nav-avatar:hover {
    transform: scale(1.05);
}

.avatar-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.menu-link {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}

.menu-contact-btn {
    padding: 6px 14px;
    border-radius: 20px;
    background: #ff0057;
    color: white;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s ease;
}

.menu-contact-btn:hover {
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .avatar-menu-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .menu-contact-btn {
        width: 100%;
    }
}

/* Dropdown menu */
.avatar-menu {
    position: absolute;
    top: 50px;
    left: 0;
    width: 220px;
    background: var(--card-bg);
    color: var(--card-text);
    border-radius: 10px;
    padding: 15px;
    display: none;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

.avatar-container:hover .avatar-menu {
    display: flex;
}

.avatar-menu a {
    text-decoration: none;
    color: inherit;
    padding: 6px 0;
    font-size: 14px;
}

.avatar-menu hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 10px 0;
}

.menu-name {
    font-weight: bold;
    margin: 0;
}

.menu-role {
    font-size: 12px;
    opacity: 0.7;
    margin: 0 0 10px 0;
}

/* BIO */
.bio-section {
    max-width: 800px;
    text-align: center;
}

.bio-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

.clickable-avatar {
    cursor: pointer;
    transition: 0.3s ease;
}

.clickable-avatar:hover {
    transform: scale(1.05);
}

/*  BODY */
body {
    margin: 0;
    padding: 0;
    padding-top: 80px;
    min-height: 100vh;
    font-family: Arial, sans-serif;

    background:
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        url("resources/images/background/img.png") no-repeat center center/cover;

    color: var(--text-color);

    display: flex;
    flex-direction: column;
    align-items: center;

    transition: background 0.4s ease, color 0.4s ease;
}

/*
body::before {
    content: "";
    position: fixed;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation: float 8s infinite alternate ease-in-out;
    z-index: -1;
}

@keyframes float {
    from { transform: translateY(0px); }
    to { transform: translateY(40px); }
}
*/

header {
    text-align: center;
    margin-top: 40px;
    position: relative;
}

header h1 {
    margin-bottom: 5px;
}

.container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 60px;
    animation: fadeIn 1.5s ease;
}

.card {
    position: relative;
    width: 300px;
    cursor: pointer;
}

.card .face {
    width: 300px;
    height: 200px;
    transition: 0.5s;
}

.card .face.face1 {
    position: relative;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(100px);
    border-radius: 15px 15px 0 0;
}

.card:hover .face.face1 {
    transform: translateY(0);
}

.card .face.face1 img {
    width: 80px;
    transition: 0.3s;
}

.card:hover .face.face1 img {
    transform: scale(1.1);
}

.card:nth-child(1):hover {
    box-shadow: 0 0 20px rgba(10, 102, 194, 0.7);
}

.card:nth-child(2):hover {
    /*box-shadow: 0 0 20px rgba(24, 119, 242, 0.7);*/
    box-shadow: 0 0 20px rgba(20, 168, 0, 0.7);
}

.card:nth-child(3):hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.card .face.face2 {
    position: relative;
    background: var(--card-bg);
    color: var(--card-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transform: translateY(-100px);
    border-radius: 0 0 15px 15px;
    text-align: center;
    transition: 0.4s;
}

.card:hover .face.face2 {
    transform: translateY(0);
}

.card .face.face2 h3 {
    margin: 0;
}

.card .face.face2 p {
    margin-top: 10px;
    font-size: 14px;
}

footer {
    margin-top: 80px;
    padding: 20px;
    font-size: 14px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
}

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

.theme-btn {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 2000; /* higher than navbar */
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 14px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.hero {
    text-align: center;
    margin-top: 80px;
    max-width: 700px;
    padding: 20px;
    animation: fadeIn 1.2s ease;
}

.profile-img {
    width: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid rgba(255,255,255,0.3);
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.hero h2 {
    font-weight: normal;
    opacity: 0.8;
}

.hero p {
    margin-top: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

.cta-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    background: #ff0057;
    color: white;
    transition: 0.3s;
}

.cta-btn:hover {
    transform: scale(1.05);
}

/* Skills Section */
.section {
    margin-top: 100px;
    max-width: 800px;
    width: 90%;

    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.section h2 {
    margin-bottom: 30px;
    text-align: center;
}

.skill {
    margin-bottom: 20px;
}

.progress {
    background: rgba(255,255,255,0.2);
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: #ff0057;
    transition: width 1.5s ease;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    color: var(--card-text);
    padding: 15px;
    border-radius: 15px;
    transition: 0.3s;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    border-radius: 10px;
}

.project-card p {
    opacity: 0.85;
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-icon {
    width: 28px;
    height: 28px;
}

.project-image {
    width: 100%;
    border-radius: 10px;
    margin: 15px 0;
}

/* Experience Timeline Section */
.timeline {
    border-left: 3px solid #ff0057;
    padding-left: 20px;
}

.timeline-item {
    margin-bottom: 30px;
}

/* Contact Section */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    border-radius: 8px;
    border: none;
}

button {
    padding: 10px;
    background: #ff0057;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.collapsible {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

.collapsible.active {
    max-height: 2000px; /* large enough */
    opacity: 1;
    transform: translateY(0);
}

/* Scroll to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ff0057;
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease;
    z-index: 1500;
}

.back-to-top.show-top {
    opacity: 1;
    transform: translateY(0);
}

/* Carousel */
.projects-carousel {
    position: relative;
    overflow: hidden;
    max-width: 1000px;
    margin: auto;
    padding: 0 20px; /* outer spacing */
}

.carousel-track {
    display: flex;
    gap: 10px; /* spacing between cards */
    transition: transform 0.5s ease;
}

.project-card {
    min-width: 50%; /* show 2 by default */
    box-sizing: border-box;
    padding: 10px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ff0057;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.carousel-btn.left {
    left: -10px;
}

.carousel-btn.right {
    right: -10px;
}

@media (max-width: 768px) {
    .project-card {
        min-width: 100%;
        padding: 15px;
    }

    .projects-carousel {
        padding: 0 10px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;

        transform: scale(0.9);
        opacity: 0;
        transition: 0.3s ease;
    }

    .modal-image {
        /*max-height: 250px;
        object-fit: contain;*/
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: contain;
        border-radius: 10px;
    }

    .close-modal {
        font-size: 24px;
        top: 10px;
        right: 15px;
    }

    .project-modal.active .modal-content {
        transform: scale(1);
        opacity: 1;
    }
}

.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.project-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    color: var(--card-text);
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-image {
    width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}
 
.modal-tech {
    margin-top: 15px;
    font-weight: bold;
    opacity: 0.8;
}

.modal-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #ff0057;
    color: white;
    border-radius: 25px;
    text-decoration: none;
}

.modal-description {
    margin-top: 10px;
    line-height: 1.6;
}

.read-more-btn {
    display: inline-block;
    margin-top: 5px;
    color: #ff0057;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* Tech Stack */
.tech-stack-link {
    margin-left: 10px;
    /*font-size: 16px;*/
    /*color: #ff0057;*/
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s ease;
}

.tech-stack-link:hover {
    text-decoration: underline;
    transform: translateY(-2px);
} 

.tech-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.tech-modal.active {
    display: flex;
}

.tech-modal-content {
    background: var(--card-bg);
    color: var(--card-text);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
}

.tech-modal-content h3 {
    margin-top: 20px;
}

.tech-modal-content ul {
    margin-left: 20px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .tech-modal-content {
        padding: 20px;
        width: 95%;
    }
}

/* Contact Modal */
.contact-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background: var(--card-bg);
    color: var(--card-text);
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.contact-modal-content h2 {
    margin-bottom: 10px;
}

.contact-subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.contact-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-modal-content input,
.contact-modal-content textarea {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: rgba(0,0,0,0.05);
}

.contact-modal-content textarea {
    resize: none;
    min-height: 120px;
}

.contact-submit-btn {
    padding: 12px;
    border-radius: 25px;
    background: #ff0057;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}

.contact-submit-btn:hover {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .contact-modal-content {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

.error-message {
    color: #ff0057;
    font-size: 12px;
    height: 14px;
}

.input-error {
    border: 1px solid #ff0057 !important;
    background: rgba(255,0,87,0.05);
}

/* ========================= */
/* PREMIUM SKILLS UI */
/* ========================= */

.skills-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
    align-items:start;
}

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


/* Card */

.skill-card
{
    position:relative;
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(12px);
    border-radius:14px;
    /*padding:0;*/
    /*overflow:hidden;*/
    transition:0.3s ease;
    border:1px solid rgba(255,255,255,0.15);
    overflow: visible;

}


/* gradient border */

.skill-card::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:14px;

    background:linear-gradient(
        120deg,
        #00f5ff,
        #7c3aed,
        #ff0057
    );

    opacity:0.15;
    z-index:-1;   /* ✅ important */
}


/* hover glow */

.skill-card:hover{

    transform:translateY(-5px);

    box-shadow:
        0 0 10px rgba(0,255,255,0.3),
        0 0 20px rgba(124,58,237,0.3),
        0 0 30px rgba(255,0,87,0.3);

}


/* header */

.skill-header{

    padding:16px;

    font-weight:bold;

    display:flex;
    justify-content:space-between;
    align-items:center;

    cursor:pointer;

    font-size:15px;

    background:rgba(0,0,0,0.2);

}


/* icon */

.skill-title{
    display:flex;
    align-items:center;
    gap:8px;
}


/* arrow */

.arrow{
    transition:0.3s;
}


/* body */

.skill-body{

    /*max-height:0;
    overflow:hidden;

    transition:
        max-height 0.4s ease,
        opacity 0.3s ease;

    padding:0 16px;*/

    height:0;
    overflow:hidden;

    transition:height 0.35s ease;

    padding:0 16px;
}


.skill-body ul{

    margin:10px 0 15px 0;
    padding-left:18px;

    line-height:1.7;
}


/* active */

.skill-card.active .skill-body{
    /*max-height:500px;
    opacity: 1;*/

    height:auto;
    padding:10px 16px 16px 16px;
}

.skill-card.active .arrow{
    transform:rotate(180deg);
}

/* Schedule a meeting */
.schedule-meeting {
    margin-top: 0px;
    margin-bottom: 5px !important;
    text-align: center;
}