@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;    
}

html, body {
    min-height: 100%;
    background: linear-gradient(135deg, #1e1b24 0%, #232224 30%, #301e4d 60%, #3e2b64 100%);
    color: #fff; /*temporary font color */
}

.container {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto auto auto;
    overflow-y: auto;
    margin-top: 50px;
    padding-top: 50px;
    background: transparent;
}

ul {
    list-style: none;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    background-color: rgba(40, 30, 50, 0.95); /* semi-transparent for modern glassy look */
    backdrop-filter: blur(8px);         /* subtle glass effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 16px rgba(126, 84, 159, 0.3),
                0 8px 32px rgba(126, 84, 159, 0.15);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.logo {
    color: rgb(126, 84, 159);
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    font-size: 30px;
    text-shadow: 0 0 12px rgba(126, 84, 159, 0.8),
               0 0 24px rgba(126, 84, 159, 0.6);
}

.nav-items {
    display: flex;
    gap: 35px;
}


.nav-item a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    display: inline-block;
    text-align: center;
    position: relative;
    transition: color 0.3s ease;
}

.nav-item a:hover {
    color: rgb(126, 84, 159);
}

.nav-item a::after{
    content: "";
    width: 100%;
    height: 3px;
    display: block;
    background-color: rgb(126, 84, 159);
    opacity: 0;
    transition: opacity 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    opacity: 1;
}

.nav-item a.active::after,
.nav-item a:hover::after {
    transform: scaleX(1);
}

.active {
    color: rgb(126, 84, 159);
}

/* Home Section Styling */

.home-section {
    display: flex;
    height: 85vh;
    padding: 0 80px;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    width: 100%;
    scroll-margin-top: 80px;
}

.info-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 50%;
}

.title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 900;
    font-size: 48px;
    color: rgb(255, 255, 255);
    text-shadow: 0 0 12px rgba(126, 84, 159, 0.8),
               0 0 24px rgba(126, 84, 159, 0.6);
}

.title span {
    display: block;
    color: rgb(126, 84, 159);
    letter-spacing: 1px;
}

.info-text {
    margin-top: 5px;
    font-size: 24px;
    color: #b0b0b0;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(126, 84, 159, 0.25),
        0 0 16px rgba(126, 84, 159, 0.2);
}

.language-items {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.language-item {
    border-radius: 20px;
    padding: 11px 17px;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 10px rgba(126, 84, 159, 0.2),
              0 0 22px rgba(35, 24, 43, 0.1);
                backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow:
    0 4px 12px rgba(126, 84, 159, 0.2),
    0 0 30px rgba(126, 84, 159, 0.1),
    inset 0 1px 3px rgba(255, 255, 255, 0.1);

  transition: all 0.3s ease;
}

.language-item:hover {
  box-shadow:
    0 6px 16px rgba(126, 84, 159, 0.3),
    0 0 35px rgba(126, 84, 159, 0.15),
    inset 0 2px 5px rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.link-items {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    margin-left: 5px;
}

.link-item {
    padding: 13px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 12px rgba(126, 84, 159, 0.7),
               0 0 24px rgba(126, 84, 159, 0.5);
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(3px);
}

.link-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 14px rgba(150, 100, 200, 0.8),
              0 0 28px rgba(150, 100, 200, 0.6),
              0 0 36px rgba(150, 100, 200, 0.3);
    transform: translateY(-2px) scale(1.02);
}

.link-item:active {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 8px rgba(100, 60, 140, 0.6),
              0 0 16px rgba(100, 60, 140, 0.3);
    transform: translateY(1px) scale(0.99);
}

svg {
    color: #fff;
}

.img-container {
    width: 40%;
    height: 100%;
    align-items: center;
    display: flex;
    justify-content: center;
}

.img-container img {
    max-width: 100%;
    aspect-ratio: 1;
}

/*About Section Styling */

.about-section {
    padding-top: 120px;
    width: 100%;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 70px;
}

.about-header {
    grid-column: 1 / 3;
    justify-self: center;
}

.about-title {
    text-align: center;
    color: rgb(126, 84, 159);
    text-shadow:  0 0 14px rgba(126, 84, 159, 0.85),
               0 0 26px rgba(126, 84, 159, 0.6);
    font-size: 46px;
    font-weight: 800;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}


.about-quote {
    margin-top: 5px;
    font-size: 24px;
    color: #808080;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(126, 84, 159, 0.25),
        0 0 16px rgba(126, 84, 159, 0.2);
        text-align: center;
}

.about-content {
    display: flex;
    grid-column: 1 / 3;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    padding: 30px 50px;
    align-items: center;
}

.about-info {
    width: 50%;
}

.info-title {
    text-align: center;
    color: rgb(151, 92, 196);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 36px;
    margin-bottom: 20px;
}

.about-info .info-text {
    margin-top: 10px;
    line-height: 1.7rem;
    font-family: 'Courier New', Courier, monospace;
    padding-left: 10px;
}

.btn-resume {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-left: 80px;
    margin-top: 30px;
    padding: 15px 30px;
    background-color: rgb(150, 101, 187);
    color: #e0e0e0;
    font-size: 18px;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-weight: bold;
    border: none;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow:
    0 4px 12px rgba(154, 107, 189, 0.4),
    0 0 24px rgba(154, 107, 189, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-resume:hover {
    background-color: rgb(170, 125, 200);
    box-shadow:
        0 6px 16px rgba(154, 107, 189, 0.5),
        0 0 30px rgba(154, 107, 189, 0.25);
    transform: translateY(-2px);
}

/* Active (click) effect */
.btn-resume:active {
    background-color: rgb(139, 94, 170);
    box-shadow:
        0 3px 10px rgba(154, 107, 189, 0.3),
        0 0 20px rgba(154, 107, 189, 0.15);
    transform: translateY(1px) scale(0.98);
}

.about-image {
    width: 50%;
    margin-top: 20px;
    padding: 30px 0;
    display: flex;
    justify-content: center;
}

.about-img {
    max-width: 50%;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(126, 84, 159, 0.8),
               0 0 28px rgba(126, 84, 159, 0.6);
    transition: transform 0.3s ease;
}

.about-img:hover {
    transform: scale(1.05); 
}

/* Portfolio Styling */

.portfolio-section {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    scroll-margin-top: 80px;
}

.portfolio-title {
    max-width: 70%;
}

.portfolio-title .title {
    color: rgb(126, 84, 159);
    text-align: center;
}

.portfolio-title .info-text {
    font-size: 20px;
    text-align: center;
}

.portfolio-buttons {
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    max-width: 65%;
    width: 100%;
    justify-content: center;
    gap: 10px;
}

.portfolio-button {
    flex: 1;
    border: none;
    border-radius: 14px;
    outline: none;
    height: 90px;
    color: #f0eaff;
    font-size: 18px;
    font-weight: 500;
    background: linear-gradient(145deg, rgba(42, 33, 77, 0.8), rgba(24, 18, 56, 0.8));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.portfolio-button:hover {
    background: linear-gradient(145deg, rgba(60, 50, 110, 0.9), rgba(36, 30, 80, 0.9));
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transform: scale(1.01);
}

.portfolio-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) inset;
}

.portfolio-button.active {
    background: linear-gradient(145deg, rgba(100, 70, 180, 0.9), rgba(60, 40, 120, 0.9));
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(120, 100, 200, 0.4);
    transform: scale(1.01);
    font-weight: 600;
    border: 1px solid rgba(160, 130, 255, 0.3);
}

.tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  display: grid;
  opacity: 1;
}

#projects, #tech, #certificates {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    max-width: 65%;
    width: 100%;
    gap: 20px;
    margin-top: 20px;
    overflow: hidden;
    padding: 10px;
}

.projects-card {
    border-radius: 15px;
    padding-top: 20px;
    padding-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto;
    align-items: center;
    background: rgba(34, 30, 40, 0.6); /* semi-transparent dark purple */
    backdrop-filter: blur(12px);      /* glass blur effect */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 0 10px rgba(126, 84, 159, 0.15),
        0 0 25px rgba(126, 84, 159, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.projects-card:hover {
    box-shadow:
        0 12px 30px rgba(173, 111, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.project-img {
    max-width: 90%;
    border-radius: 8px;
}

.project-info {
    max-width: 90%;
    align-self: flex-start;
    padding-left: 5%;
}

.project-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #f8f6ff;;
    margin-bottom: 0.5rem;
}

.project-details {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.90rem;
    line-height: 1.5;
    color: #cfc9dc; /* soft greyish-lavender tone */
}

.project-buttons {
    display: flex;
    width: 90%;
    justify-content: space-between;
    margin: auto 0;
}

.project-buttons a {
    text-decoration: none;
    color: #f8f6ff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(83, 55, 129, 0.4), rgba(42, 29, 78, 0.4));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-buttons a:hover {
    background: linear-gradient(145deg, rgba(110, 78, 158, 0.6), rgba(60, 42, 100, 0.6));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.project-buttons a svg {
    fill: #f8f6ff;
}

.project-buttons a:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Tech Tab */
#tech {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tech-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    background: rgba(34, 30, 40, 0.6); /* semi-transparent dark purple */
    border-radius: 15px;
    padding-top: 15px;
    padding-bottom: 10px;
    background: rgba(34, 30, 40, 0.75); /* Slightly more solid for readability */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* NEW: Subtle border for a crisp edge */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); /* NEW: Softer, deeper shadow */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {

    transform: translateY(-8px); /* Lifts the card up */
    border-color: rgba(255, 255, 255, 0.3); /* Makes the border brighter */
    box-shadow: 0 0 25px rgba(173, 111, 255, 0.3); /* A more vibrant, colorful glow */
}

.tech-img {
    max-width: 80%;
    max-height: 80px;
    border-radius: 10px;
    object-fit: contain;
    margin: auto 0;
}

.tech-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem; /* Slightly smaller for a cleaner look */
    font-weight: 500; /* NEW: Lighter font weight */
    color: rgba(248, 246, 255, 0.9); /* Slightly transparent to blend better */
    text-align: center;
    line-height: 1.4; /* NEW: Improves spacing if title wraps */
}

/* Contact Section*/
.contact-section {
    margin-top: 120px;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}

.contact-card {
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    background: rgba(36, 28, 52, 0.65); /* deeper purple tint */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 0 10px rgba(126, 84, 159, 0.15),
        0 0 40px rgba(126, 84, 159, 0.05);
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-card svg {
    fill: #f0eaff;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.contact-card p, .contact-card a{
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f8f6ff;
    background: rgba(83, 55, 129, 0.3);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-card a:hover {
    background: rgba(126, 84, 159, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/*--------------*/

/* --- Hamburger Menu Icon Styling --- */
.hamburger {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* --- Media Queries for Responsiveness --- */

/* For smaller desktops and large tablets (<= 1200px) */
@media (max-width: 1200px) {
    .header, .home-section {
        padding-left: 50px;
        padding-right: 50px;
    }
    .about-content {
        gap: 50px;
        padding: 30px 20px;
    }
    #projects, #tech, #certificates {
        max-width: 85%;
    }
    .portfolio-buttons {
        max-width: 85%;
    }
}


/* For tablets (<= 992px) */
@media (max-width: 992px) {
    /* --- General Adjustments --- */
    .title {
        font-size: 40px;
    }
    .info-text {
        font-size: 20px;
    }
    .about-title {
        font-size: 40px;
    }

    /* --- Header & Nav --- */
    .nav-items {
        gap: 20px;
    }
    .nav-item a {
        font-size: 18px;
    }

    /* --- Home Section --- */
    .home-section {
        flex-direction: column-reverse; /* Stack image above text */
        height: auto;
        text-align: center;
        gap: 50px;
        padding-top: 50px;
        padding-bottom: 50px;
    }
    .info-container, .img-container {
        width: 100%;
        align-items: center;
    }
    .img-container {
        display: none;
    }
    .img-container img {
        max-width: 60%;
    }
    .language-items, .link-items {
        justify-content: center;
    }

    /* --- About Section --- */
    .about-section {
        grid-template-columns: 1fr; /* Single column layout */
    }
    .about-content {
        flex-direction: column;
        width: 100%;
        gap: 40px;
    }
    .about-info, .about-image {
        width: 100%;
        text-align: center;
    }
    .about-info .info-text {
        text-align: left;
        padding: 0 20px;
    }
    .about-img {
        max-width: 40%;
    }
    .btn-resume {
        margin-left: 0;
    }

    /* --- Portfolio Section --- */
    #projects, #tech, #certificates {
        max-width: 90%;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    .portfolio-buttons {
        max-width: 90%;
        flex-wrap: wrap;
    }
}


/* For mobile phones (<= 768px) */
@media (max-width: 768px) {
    /* --- Header & Hamburger Menu --- */
    .header {
        padding: 20px;
    }
    .nav-list {
        position: fixed;
        left: -100%; /* Hide off-screen */
        top: 75px; /* Position below header */
        width: 100%;
        height: calc(100vh - 75px);
        background-color: rgba(25, 22, 35, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.35s ease;
        z-index: 1000;
    }
    .nav-list.active {
        left: 0; /* Slide in */
    }
    .nav-items {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        height: 100%;
    }
    .nav-item a {
        font-size: 24px;
    }
    .hamburger {
        display: flex; /* Show the hamburger icon */
    }
    /* Hamburger animation to 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- Section Paddings --- */
    .home-section, .about-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* --- Font Sizes --- */
    .title {
        font-size: 36px;
    }
    .info-text {
        font-size: 18px;
    }
    .about-title {
        font-size: 34px;
    }
    .about-quote {
        font-size: 20px;
    }
    .info-title {
        font-size: 30px;
    }

    /* --- About Section --- */
    .about-img {
        max-width: 50%;
    }

    /* --- Portfolio Section --- */
    .portfolio-title {
        max-width: 90%;
    }
    #projects, #tech, #certificates {
        max-width: 100%;
        width: 100%; /* Ensure it takes full width */
        padding: 10px;
        grid-template-columns: 1fr; /* Force single column to prevent overflow */
    }
    .portfolio-buttons {
        max-width: 100%;
        padding: 0 10px;
    }
    .portfolio-button {
        font-size: 16px;
        height: 70px;
    }

    /* --- Contact Section --- */
    .contact-card {
        padding: 2rem 1.5rem;
        width: 90%; /* Ensure card does not overflow */
    }
    .contact-card p, .contact-card a {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
  .home-section,
  .about-section,
  .portfolio-section,
  .contact-section {

    /* 1. Reset padding to be mobile-friendly. */
    padding-left: 15px !important;
    padding-right: 15px !important;

    /* 2. Crucial: Reset any minimum width that might be set. */
    min-width: 0 !important;

    /* 3. Re-affirm the width calculation. */
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .language-items {
    flex-wrap: wrap;
  }
}