:root {
    /* colors */
    --one: #F6D4D3;
    --two: #FFFCF9;
    --three: #D8D0DC;
    --four: #82688D;
    --five: #201A23;
    --lowOpacity: rgba(66, 27, 87, 0.5);
    --lowOpacityBG: rgba(216, 208, 220,0.05);
    /* other color vars */
    --sectionColor: var(--three);
    --buttonNorm: var(--four);
    --buttonHover: var(--five);
    --buttonText: var(--one);
    --background: var(--five);
    /* other vars general */
    --border: 5px;
    --fontDisplay: "Titillium Web", sans-serif;
    --fontTimes: "Times New Roman", Times, serif;
    --sliderPadding: 10px;
}

/* Reset default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.section {
    margin: 10px;
    scroll-margin-top: 90px;
    color: var(--sectionColor);
    font-family: var(--fontDisplay);
    font-size: 300%;
}

h2 {
    margin: 20px;
    color: var(--one);
}

h3 {
    margin: 0 20px 0 20px;
    text-wrap: wrap;
    font-family: monospace;
}

p {
    margin: 15px;
}

/* Basic styles for header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--buttonNorm);
    padding: 10px 20px;
    color: var(--buttonText);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header a {
    text-decoration: none;
    color: var(--one);
}

/* Navigation links styling */
.header-right ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; /* for vertical alignment within the ul */
}

.header-right ul li {
    margin-left: 25px;
}

.header-right ul li:first-child {
    margin-left: 0;
}

.header-right ul li a {
    text-decoration: none;
    color: var(--buttonText);
    font-weight: bold;
    transition-property: background-color;
    transition-duration: .3s;
    display: inline-block; 
    line-height: 1;
}

.header-right ul li a:hover {
    background-color: var(--buttonHover);
    border-radius: var(--border);
}

/* resume link in nav bar */
#resumeLink {
    background-color: var(--buttonText);
    color: var(--buttonNorm);
    border-radius: var(--border);
    padding: 5px 10px; 
}

#resumeLink:hover {
    background-color: var(--buttonHover);
    color: var(--buttonText)
}

ul li ul.dropdown li {
    display: block;
    text-align: center;
    justify-content: center;
    text-wrap: nowrap;
    padding: 10px 0px 10px 0px;
    margin: auto;
}

ul li ul.dropdown {
    position: absolute;
    z-index: 1001;
    display: none;
    
    background-color: var(--four);
    width: 100px;
    padding: 10px 15px 5px 15px;
}


ul li:hover ul.dropdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    margin: 0px auto;
}

body{
    margin: 0;
    background-color: var(--background);
    background-image: url("../images/Background.png");
    background-size: 400px;
    background-repeat: repeat;
    background-attachment: fixed;
}

.content {
    padding: 15px;
    color: var(--buttonText);
    max-width: 900px;
    margin: 0px auto;
}

/* make Home font large and center */
#Home {
    font-size: 32px;
    line-height: 105px;
    text-align: center;
    margin: auto;
    padding-top: 15%;
    padding-bottom: 15%;
    transition-delay: 100ms;
}

#name {
    font-family: var(--fontTimes);
    color: var(--one);
    transition-property: color, font-size;
    transition-duration: .3s;
}

/* hover effect on my name */
#name:hover {
    color: var(--two);
    font-size: 101%; 
    /* transition: transform .2s; */
}

.aboutlink { 
    /* for the word Contact in about section */
    color: var(--one);
    text-decoration: none;
    font-style: italic;
}

.aboutlink:hover {
    color: var(--three);
    text-decoration: none;
}

img {
    width: auto;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 5%;
}

main{
    width: min(1200px, 90vw);
    margin: auto;
}

.project {
    /* padding: 10px; */
    display: none; /* Hide all projects initially */
}

/* format text over slider */
.item {
    position: relative;
    width: 300px; /* Adjust the width as needed */
    /* margin: 20px; Optional: for spacing around the item */
}

.item img {
    width: 100%;
    height: auto;
    display: block; 
    border: 5px ridge var(--one);
}

.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: .5s ease;
    background-color: var(--lowOpacity); /* Change the background color and opacity as needed */
    display: flex;
    justify-content: center;
    align-items: center;
}

.item:hover .overlay {
    opacity: 1;
}

.text {
    color: white;
    font-size: 20px;
    font-family: var(--fontDisplay);
    text-align: center;
    white-space: pre-wrap;
    margin-left: 15px;
    margin-right: 15px;
    background-color: var(--lowOpacity);
}

/* resume button */
#resumeButton {
    background-color: var(--buttonNorm); /* Blue background */
    color: var(--buttonText); /* White text color */
    padding: 10px 15px; /* Padding inside the button */
    border-radius: var(--border); /* Rounded border */
    cursor: pointer; /* Cursor style */
    font-size: 16px;
    font-weight: bold;
    margin: 10px; /* Margin around the button */
    transition: background-color 0.3s; /* Smooth transition for background color */
}

#resumeButton:hover {
    background-color: var(--buttonHover); /* Darker blue background */
    color: var(--buttonText); /* White text color remains */
}
/* end of resume button */

/* resume link in nav bar */
#resumeLink {
    background-color: var(--buttonText);
    color: var(--buttonNorm);
    border-radius: var(--border);
}

#resumeLink:hover {
    background-color: var(--buttonHover);
    color: var(--buttonText)
}
/* end of resume link in nav bar */

/* mobile layout */
@media screen and (max-width: 769px) {
    /* i used width 342 - 768 pixels for mobile */
    .homesechide {
        color: transparent;
    }

    .homesechide #name {
        color: transparent;
        transition: 1.5s;
    }

    header {
        flex-direction: column;
        padding: 3%;
    }
    
    .header-right ul {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 4%;
        padding-bottom: 2%;
    }

    .header-right ul li {
        margin-left: 1vw; /* Adjust spacing between menu items */
    }
    
    .header-right ul li:first-child {
        margin-left: 0; /* Remove margin for the first item */
    }
    
    .header-right ul li a {
        text-decoration: none;
        color: var(--buttonText); /* Link color */
        font-weight: bold; /* Optional: Adjust font weight */
        padding: 1vh 1vw; /* Optional: Adjust padding for each link */
    }

    .section {
        scroll-margin-top: 120px;
    }
    
    main {
        width: 90%;
        margin: auto;
        padding: 2%;
    }
    
    #Home {
        padding-top: 10vh;
        padding-bottom: 25vh;
        font-size: 150%;
    }

    img {
        width: 100%;
        height: auto;
        border-radius: 5%;
    }
    
    .slider .list {
        scroll-behavior: smooth; /* Smooth scrolling */
    }

    body {
        background-attachment: scroll;
    }

    /*mobile responsive slider */
    .slider {
        overflow-x: scroll;
    }
    .slider .list{
        display: flex;
    }
    .slider .list .item{
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        width: 50vw;
        height: auto;
    }
    .slider .list .item img{
        width: 40vw;
        margin: 1vw;
    }
    .text {
        color: white;
        font-size: 20px;
        text-align: center;
        text-decoration-color: transparent;
        text-decoration: none;
        white-space: pre-wrap;
    }
    .slider a {
        color: white;
        font-size: 20px;
        text-align: center;
        text-decoration-color: transparent;
        text-decoration: none;
    }
}


/* home section scroll animation */
/* css mostly from https://youtu.be/T33NN_pPeNI */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(100%);
    transition: all 0.75s;
}

@media(prefers-reduced-motion){
    .hidden {
        transition: none;
    }
}

.show {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}
/* end of css from https://youtu.be/T33NN_pPeNI */

/* social icons */
.social-icons {
    display: flex;
    gap: 30px;
    margin: 20px;
}

.social-icons a {
    display: inline-block;
}

.social-icons img {
    width: 40px;
    height: 40px;
}

.social-icons img:hover {
    transform: scale(1.2);
}

/* delay each social icon by 100ms more for staggering effect */
#social1 {
    transition-delay: 100ms;
}

#social2 {
    transition-delay: 200ms;
}

/* typewriter effect section */
.typewriter-container {
    font-family: monospace;
    white-space: nowrap;
    display: inline-block;
    transition-delay: 100ms
}

#typewriter {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.caret {
    display: inline-block;
    width: 0.1em;
    background-color: transparent;
    margin-left: 0.1em;
    animation: blink-caret 0.75s step-end infinite;
    vertical-align: bottom;
}

@keyframes blink-caret {
    from, to { background-color: transparent; }
    50% { background-color: var(--one); }
}

/* typewriter effect section */

/* button formatting */
#ProjLinkBtn{
    margin: 20px;
}

button {
    padding: 0;
    margin: 5px;
    border: var(--one);
    font-size: medium;
}

button a{
    text-decoration: none;
    background-color: var(--four); /* Adjust hover background color */
    color: var(--one);
    font-weight: bold; /* Optional: Adjust font weight */
    padding: 5px 10px; /* Optional: Adjust padding for each link */
    transition-property: background-color;
    transition-duration: .3s;
    border-radius: var(--border);
}

button a:hover {
    background-color: var(--three);
    color: var(--five); /* Link color */
    border-radius: var(--border);
}
/* end button formatting */