* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
} 

html, body {
  margin: 0;
  padding: 0;
  background-color: #000; /* Black background to match loader */
}

body {
  opacity: 0;
  transition: opacity 0.5s ease-out; /* Smooth transition over 0.5s */
}

/* Loader Styles */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #000;

  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease-out;
}

.loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  transition: opacity 10s ease-out;
}

.loader-text {

  gap: 10px;
  color: white;
  font-size: 36px;
  font-family: 'Unica One', cursive;
  opacity: 1;
}

.loader-text strong {
  font-weight: 700;
  font-size: 48px;
}

.loader-text span {
  font-family: 'Crimson Text', serif;
  font-size: 24px;
  font-weight: 400;
}

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

 

.video-background {
   position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full viewport height */ 
    overflow: hidden;
    z-index: 1; /* Send video to the back */

}

#myVideo {
  position: absolute; 
    top: 50%; 
    left: 50%; 
    min-width: 100%; 
    min-height: 100%; 
    width: auto; 
    height: auto; 
    transform: translate(-50%, -50%); /* Centering */ 
 
}

.overlay-content {
    position: relative; 
    color: white; 
    text-align: center;
    min-height: 100vh;
    width: 100%;
    padding: 120px 40px 40px 40px;
    z-index: 1; /* Ensure content is above video */ 
}

 main, footer {
    position: relative; 
    z-index: 2; /* Ensure these sections are above the video */ 
}

footer {
    display: flex;
    justify-content: space-between;

}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.title-section {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.title {
    color: white;
    font-size: 40px;
    font-family: 'Unica One', sans-serif;
    font-style: normal;
    font-weight: 400;
    word-wrap: break-word;
    margin: -0.1em 0 0 -0.04em;
    text-align: left;
}

.label {
    margin-top: 5px;
    font-weight: 400;
    text-align: left;
    font-family: 'Crimson Text', serif;
    font-size: 15px;
}   

.navbar {
    color: white;
font-size: 15px;
font-family: 'Crimson Text', serif;
font-weight: 100;
word-wrap: break-word;
justify-content: right;
display: flex;
gap: 30px;
z-index: 2;

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

}

.navbar a:hover {
        color: #d9d9d9;

}

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

.navbar a.active {
    font-size: 0;
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('/images/Moon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    animation: fadeIn 0.5s ease-in-out;
}


.page {
    display: none; /* Hide all sections by default */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    min-height: calc(100vh - 200px);
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.page span {
    font-size: 15px;
    font-family: 'Crimson Text', serif;
    font-weight: 100;
    display: block;
    text-align: center;
    line-height: 1.5;
  
}

.page p {
    margin-top: 70px;
  
}

#about .personal, #about .technical , #about .education {
    margin-bottom: 40px;
    text-align: right;
    
}

#about {
   
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
}

#about::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#about span {
    font-size: 35px;
    font-family: 'Crimson Text', serif;
    font-weight: 200;
    display: block;
    text-align: right;
    margin-bottom: 10px;
}

#about ul {
    list-style-type: none;
    padding: 0;
}

#about ul li {
    font-size: 15px;
    font-family: 'Crimson Text', serif;
    font-weight: 100;
    text-align: right;
    margin-bottom: 8px;
}

.education {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    max-width: 600px;
    opacity: 1;
    transform: translateX(0);

    span {
        font-size: 35px;
        font-family: 'Crimson Text', serif;
        font-weight: 200;
        text-align: right;
        margin-bottom: 15px;
    }
    
}

.personal {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
    text-align: right;
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0s 0.8s;
}

.technical {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
    text-align: right;
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0s 0.8s;
}

.personal.visible,
.technical.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0s;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    text-align: left;
    color: white;
    font-size: 14px;
    font-family: 'Crimson Text', serif;
    font-weight: 100;   
    word-wrap: break-word;
    z-index: 2;
    display: flex;
    justify-content: space-between;

}


.page ul {
    list-style-type: none;
    padding: 0;
}

/* Projects Section */
#projects {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.projects-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-around;
    padding-right: 100px;
    width: 100%;
    height: 100%;
    gap: 40px;
}

.project-item {
    display: flex;
    flex-direction: column;
    text-align: right;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-item:hover {
    transform: translateX(-10px);
    opacity: 0.8;
}

.project-title {
    font-size: 120px;
    font-family: 'Unica One', sans-serif;
    font-weight: 400;
    color: white;
    text-align: right;
    margin: 0;
    line-height: 0.85;
    text-transform: lowercase;
    letter-spacing: -3px;
}

.project-subtitle {
    font-size: 18px;
    font-family: 'Crimson Text', serif;
    font-weight: 200;
    color: white;
    text-align: right;
    margin: 0;
    margin-top: 10px;
}

/* Project Detail View */
.project-detail {
    position: absolute;
    top: 0;
    left: 0;
  
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-detail.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

.close-detail {
    position: absolute;
    top: 40px;
    left: 40px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.close-detail:hover {
    transform: translateX(-5px);
    opacity: 0.7;
}

.back-arrow {
    font-size: 24px;
    font-weight: 300;
}

.back-text {
    font-size: 18px;
    font-family: 'Crimson Text', serif;
    font-weight: 400;
}

.detail-content {
    width: 100%;
    height: 100%;
    padding: 60px 100px 60px 40px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.detail-content::-webkit-scrollbar {
    display: none;
}

.detail-title {
    font-size: 80px;
    font-family: 'Unica One', sans-serif;
    font-weight: 400;
    color: white;
    text-align: right;
    margin: 0;
    line-height: 0.9;
    text-transform: lowercase;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.detail-role {
    font-size: 18px;
    font-family: 'Crimson Text', serif;
    font-weight: 200;
    color: white;
    text-align: right;
    margin: 0 0 40px 0;
}

.detail-description {
    text-align: right;
    max-width: 700px;
    margin-left: auto;
}

.detail-description p {
    font-size: 16px;
    font-family: 'Crimson Text', serif;
    font-weight: 200;
    color: white;
    line-height: 1.8;
    margin: 0 0 30px 0;
}

.detail-description h3 {
    font-size: 24px;
    font-family: 'Unica One', sans-serif;
    font-weight: 400;
    color: white;
    margin: 30px 0 15px 0;
    text-transform: lowercase;
}

.detail-description ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.detail-description ul li {
    font-size: 15px;
    font-family: 'Crimson Text', serif;
    font-weight: 200;
    color: white;
    margin-bottom: 10px;
    text-align: right;
}

#contact {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
}

#contact ul {
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    
    a {
        color: white;
        text-decoration: none;   
        font-size: 18px;    
        font-family: 'Crimson Text', serif;
        font-weight: 100; 

    }

    a:hover {
        color: #d9d9d9;
    }
}  

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablets and smaller desktops (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    header {
        padding: 30px;
    }

    .title {
        font-size: 32px;
    }

    .overlay-content {
        padding: 100px 30px 30px 30px;
    }

    #projects .projects-list {
        padding-right: 60px;
    }

    .project-title {
        font-size: 90px;
    }

    #about {
        padding-right: 60px;
    }

    .detail-content {
        padding: 50px 60px 50px 30px;
    }

    .detail-title {
        font-size: 60px;
    }
}

/* Tablets portrait (max-width: 768px) */
@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .title {
        font-size: 28px;
    }

    .label {
        font-size: 14px;
    }

    .navbar {
        gap: 20px;
        font-size: 14px;
    }

    .overlay-content {
        padding: 140px 20px 20px 20px;
    }

    .page {
        height: calc(100vh - 140px);
    }

    .page span {
        font-size: 14px;
    }

    #home p {
        margin-top: 40px;
    }

    /* About Section */
    #about {
        padding-right: 40px;
        height: calc(100vh - 140px);
    }

    #about span {
        font-size: 28px;
    }

    #about ul li {
        font-size: 14px;
    }

    .education, .personal, .technical {
        min-height: 40vh;
    }

    /* Projects Section */
    #projects {
        height: calc(100vh - 140px);
    }

    .projects-list {
        padding-right: 40px;
        gap: 30px;
    }

    .project-title {
        font-size: 70px;
        letter-spacing: -2px;
    }

    .project-subtitle {
        font-size: 16px;
    }

    /* Project Details */
    .close-detail {
        top: 30px;
        left: 20px;
    }

    .back-text {
        font-size: 16px;
    }

    .back-arrow {
        font-size: 20px;
    }

    .detail-content {
        padding: 40px 40px 40px 20px;
    }

    .detail-title {
        font-size: 50px;
    }

    .detail-role {
        font-size: 16px;
    }

    .detail-description {
        max-width: 100%;
    }

    .detail-description p {
        font-size: 15px;
    }

    .detail-description h3 {
        font-size: 20px;
    }

    .detail-description ul li {
        font-size: 14px;
    }

    /* Contact */
    #contact ul a {
        font-size: 16px;
    }

    footer {
        font-size: 12px;
        padding: 15px;
    }
}

/* Mobile devices (max-width: 480px) */
@media screen and (max-width: 480px) {
    header {
        padding: 15px;
    }

    .title {
        font-size: 24px;
    }

    .label {
        font-size: 12px;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 15px;
        font-size: 13px;
    }

    .navbar a.active {
        width: 16px;
        height: 16px;
    }

    .overlay-content {
        padding: 120px 15px 15px 15px;
    }

    .page {
        height: calc(100vh - 120px);
    }

    .page span {
        font-size: 13px;
    }

    #home p {
        margin-top: 30px;
    }

    /* About Section */
    #about {
        padding-right: 20px;
        height: calc(100vh - 120px);
    }

    #about span {
        font-size: 24px;
    }

    #about ul li {
        font-size: 13px;
    }

    /* Projects Section */
    #projects {
        height: calc(100vh - 120px);
    }

    .projects-list {
        padding-right: 20px;
        gap: 20px;
        justify-content: center;
    }

    .project-title {
        font-size: 50px;
        letter-spacing: -1px;
    }

    .project-subtitle {
        font-size: 14px;
        margin-top: 5px;
    }

    /* Project Details */
    .close-detail {
        top: 20px;
        left: 15px;
        gap: 8px;
    }

    .back-text {
        font-size: 14px;
    }

    .back-arrow {
        font-size: 18px;
    }

    .detail-content {
        padding: 30px 20px 30px 15px;
    }

    .detail-title {
        font-size: 36px;
    }

    .detail-role {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .detail-description p {
        font-size: 14px;
        line-height: 1.6;
    }

    .detail-description h3 {
        font-size: 18px;
        margin: 20px 0 10px 0;
    }

    .detail-description ul {
        margin-bottom: 20px;
    }

    .detail-description ul li {
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* Contact */
    #contact ul {
        gap: 8px;
    }

    #contact ul a {
        font-size: 15px;
    }

    footer {
        font-size: 11px;
        padding: 12px;
    }

    /* Loader */
    .loader-text strong {
        font-size: 36px;
    }

    .loader-text span {
        font-size: 20px;
    }
}

/* Small mobile devices (max-width: 375px) */
@media screen and (max-width: 375px) {
    .title {
        font-size: 20px;
    }

    .navbar {
        font-size: 12px;
        gap: 12px;
    }

    .project-title {
        font-size: 40px;
    }

    .detail-title {
        font-size: 32px;
    }

    #about span {
        font-size: 20px;
    }
