@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Open Sans', sans-serif;
}

html{
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

.back-vid{
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
}

@media (max-aspect-ratio: 16/9){
  .back-vid{
    width: auto;
    height: 100%;
  }
}

@media (min-aspect-ratio: 16/9){
  .back-vid{
    width: 100%;
    height: auto;
  }
}

header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: black;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 3rem;
    color: #E0B0FF;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover{
    transform: scale(1.1);
}

#menu-icon {
    font-size: 3.6rem;
    color: #E0B0FF;
    display: none;
    cursor: pointer;
    transition: 0.3s ease;
}

#menu-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px #E0B0FF);
}

nav a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active{
    color: #E0B0FF;
    border-bottom: 3px solid #E0B0FF;
}

/* Styled Mobile Popup Navigation */
@media(max-width:995px){
    #menu-icon {
        display: block;
    }

    nav{
        position: absolute;
        top: 100%;
        right: 5%;
        width: 260px;
        max-height: 80vh;
        overflow-y: auto;
        background: rgba(15, 12, 22, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(224, 176, 255, 0.3);
        border-radius: 1.5rem;
        padding: 1.5rem 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(224, 176, 255, 0.15);
        
        /* Smooth Slide and Fade Animation */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px) scale(0.95);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    nav.active{
        opacity: 1;
        visibility: visible;
        transform: translateY(10px) scale(1);
    }

    nav a{
        display: block;
        font-size: 1.8rem;
        margin: 0;
        padding: 1.2rem 1.5rem;
        border-radius: 1rem;
        border-bottom: none;
        color: #ffffff;
        text-align: left;
        transition: all 0.3s ease;
    }

    nav a:hover,
    nav a.active{
        color: #E0B0FF;
        background: rgba(224, 176, 255, 0.12);
        border-bottom: none;
        padding-left: 2rem;
        box-shadow: inset 0 0 10px rgba(224, 176, 255, 0.1);
    }
}

/* Base Section Spacing (Original Desktop Values Unchanged) */
section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}

.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span{
    color: #E0B0FF;
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p{
    font-size: 2rem;
}

.home-img{
    border-radius: 50%;
}

.home-img img{
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px solid #E0B0FF;
    cursor: pointer;
    transition: 0.2s linear;
}

.home-img img:hover{
    font-size: 1.8rem;
    font-weight: 500;
}

.education-content {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 2.5rem;
    gap: 20px;
}

.education-card {
    border: 2px solid #E0B0FF;
    border-radius: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-sizing: border-box;
    width: 600px;
    max-width: 100%;
    transition: 0.3s ease;
}

.education-card h3 {
    margin-bottom: 5px;
    color: #E0B0FF;
}

.education-card span {
    font-size: 24px;
    color: #E0B0FF;
}

.education-card p {
    margin: 8px 0;
}

.education-card:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px #E0B0FF;
}

.certifications{
    display: flex;
    justify-content: center;
    align-items: top;
    gap: 8rem;
    background-color: black;
}

.certifications .certifications-content h1{
    margin-top: 8rem;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.certifications .certifications-links {
    margin-top: 40px;
    font-size: 4rem;
    font-weight: 500;
    line-height: 1.3;
}

.certifications .certifications-links a{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #E0B0FF;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #E0B0FF;
    transition: 0.3s ease;
    cursor: pointer;
    margin-bottom: 40px;
    max-width: 100%;
    word-wrap: break-word;
}

.certifications .certifications-links a:hover,
.certifications .certifications-links a.active{
    transform: scale(1.1) translateY(-5px);
    background-color: black;
    color: black;
    box-shadow: 0 0 25px #E0B0FF;
    border: 2px solid #E0B0FF;
}

.skills-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    font-size: 2.5rem;
    gap: 20px;
}

.skills h1{
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6rem;
    gap: 50px;
}

.skill-card {
    width: 300px;
    max-width: 100%;
    min-height: 200px;
    padding: 30px;
    border: 2px solid #E0B0FF;
    border-radius: 15px;
    background: black;
    transition: 0.3s ease;
}

.skill-card h3 {
    color: #E0B0FF;
}

.skill-card ul {
    padding-left: 3rem;
}

.skill-card li {
    margin: 10px 0;
}

.skill-card:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px #E0B0FF;
}

.projects-content {
    margin-top: 60px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    gap: 20px;
}

.projects-content h1{
    display: flex;
    justify-content: center;
    font-size: 6rem;
    gap: 50px;
}

.project-card {
    width: 1000px;
    max-width: 100%;
    min-height: 200px;
    padding: 30px;
    border: 2px solid #E0B0FF;
    border-radius: 15px;
    background: black;
    transition: 0.3s ease;
}

.project-card h3 {
    color: #E0B0FF;
}

.project-card ul {
    padding-left: 3rem;
}

.project-card li {
    margin: 10px 0;
}

.project-card p {
    text-indent: 2rem;
}

.project-card:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px #E0B0FF;
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #E0B0FF;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #E0B0FF;
}

.social-icons a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #E0B0FF;
    box-shadow: 0 0 25px #E0B0FF;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: transparent;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #E0B0FF;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #E0B0FF;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale3d(1.03);
    background-color: #E0B0FF;
    color: black;
    box-shadow: 0 0 25px #E0B0FF;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "Electronics Engineer";
    color: #E0B0FF;
    animation: words 20s infinite;
}

.typing-text span::after{
    content: "";
    background-color: transparent;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor{
    to{
        border-left: 3px solid #E0B0FF;
    }
}

@keyframes words{
    0%, 20%{
        content: "Electronics Engineer";
    }
    21%, 40%{
        content: "VLSI Engineer";
    }
    41%, 60%{
        content: "Tech Enthusiast";
    }
    61%, 80%{
        content: "Youtuber";
    }
    81%, 100%{
        content: "Gamer";
    }
}

@media (max-width: 1000px){
    .home{
        gap: 4rem;
    }
}

/* Tablet Adjustments */
@media(max-width: 995px){
    .home{
        flex-direction: column;
        margin-top: 8rem;
    }

    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    html {
        font-size: 50%;
    }

    header {
        padding: 1rem 5%;
    }

    .home {
        padding-top: 10rem;
    }

    section {
        min-height: auto;
        padding: 2rem 5% 2rem;
    }

    .education-content,
    .skills-content,
    .projects-content {
        margin-top: 1.5rem;
        font-size: 1.6rem;
        gap: 1.5rem;
    }

    .skills h1 {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .certifications .certifications-content h1 {
        margin-top: 1.5rem;
    }

    .certifications .certifications-links {
        margin-top: 1.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Removes forced line breaks for mobile certifications buttons */
    .certifications .certifications-links a {
        display: inline-block;
        margin-bottom: 0;
        margin: 0.5rem;
    }

    /* Hides HTML <br> tags in mobile view if present inside the container */
    .certifications .certifications-links br {
        display: none;
    }

    .logo {
        font-size: 2.4rem;
    }

    .home .home-content h1,
    .certifications .certifications-content h1,
    .skills h1,
    .projects-content h1 {
        font-size: 3.8rem;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .typing-text {
        font-size: 2.2rem;
        min-width: unset;
    }

    .education-card,
    .skill-card,
    .project-card {
        padding: 20px;
    }

    .education-card span {
        font-size: 1.8rem;
    }

    /* Hover style fallback for touch interaction */
    .education-card:hover,
    .skill-card:hover,
    .project-card:hover {
        transform: translateY(-5px);
    }

    /* Scroll Highlight State for Cards (Triggered by JS on Mobile) */
    .education-card.active,
    .skill-card.active,
    .project-card.active,
    .certifications .certifications-links a.active {
        transform: scale(1.05) translateY(-5px);
        box-shadow: 0 0 20px #E0B0FF;
        border-color: #E0B0FF;
    }

    .certifications {
        flex-direction: column;
        gap: 2rem;
    }

    .certifications .certifications-links {
        font-size: 2.4rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 45%;
    }

    header {
        padding: 1rem 4%;
    }

    #menu-icon {
        font-size: 3rem;
    }

    .home .home-content h1,
    .certifications .certifications-content h1,
    .skills h1,
    .projects-content h1 {
        font-size: 3.2rem;
    }

    .btn,
    .certifications .certifications-links a {
        padding: 0.8rem 2rem;
        font-size: 1.4rem;
    }
}

/* Footer Container */
.footer-name-container {
    width: 100%;
    padding: 4rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

/* Styled Line Above Name */
.footer-line {
    width: 80%;
    max-width: 1000px;
    height: 2px;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        #E0B0FF 50%, 
        transparent 100%
    );
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* Cursive Name Signature */
.footer-name {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #E0B0FF;
    text-shadow: 0 0 20px rgba(224, 176, 255, 0.6);
    letter-spacing: 1px;
    text-align: center;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
    user-select: none;
}

.footer-name:hover {
    transform: scale(1.03);
    text-shadow: 0 0 35px rgba(224, 176, 255, 0.9);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .footer-name-container {
        padding: 3rem 1rem 2rem;
    }

    .footer-line {
        width: 90%;
        margin-bottom: 2rem;
    }

    .footer-name {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .footer-line {
        width: 95%;
        margin-bottom: 1.5rem;
    }

    .footer-name {
        font-size: 3.8rem;
    }
}
/* Base styling for nav links */
nav a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

/* Active class highlight state */
nav a.active {
    color: #E0B0FF; /* Highlight color */
    border-bottom: 2px solid #E0B0FF; /* Optional underline indicator */
}