html {
    scroll-behavior: smooth;
}

header {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(to bottom, #ea4904 0%, #ff7700  40%, rgb(221, 122, 2));
}

nav {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: fixed;
    top: 0;
    left: 0;
    height: 4rem;
    z-index: 1000;
    background-color: #ea4904;

}

.nav-link {
    color:white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;    
}

.nav-link:active {
    color:grey;
}

.nav-link.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: default;
  color: lightgray;
}

#personal-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}


#personal-image {
    height: 12rem;
    width: 12rem;
}

section {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;  
    scroll-snap-align: start;
    padding-top: 4rem;
    box-sizing: border-box;
    background: radial-gradient(
        circle at center,
        white 0%,
        orange 40%,
        rgb(221, 122, 2)
    );
}

#skills ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
    list-style: none;
    padding: 0;
    justify-items: center;
}

#skills li {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    font-size: 0.7rem;
}

.skills-pics {
    height: 3rem;
    width: 3rem;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

li {
    padding: 1rem;
    list-style-type: none;
}

h1 {
    font-size: 2.5rem;
    margin: 0.5rem 0;
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    text-decoration: underline;
}

h3 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    padding-bottom: 1rem;
}

h5 {
    font-size: 1rem;
}

p {
    font-size: 1.2rem;
    padding: 1rem 1rem;
    margin: 0.5rem 0;
}

.project-link {
    color: rgb(104, 104, 237);
}

.project-link:active {
    color:rgb(38, 10, 63);
}

.personal-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  max-width: 800px;
  padding: 0.6rem;
  gap: 1rem;
  border-bottom: 1px solid #ccc; /* optional */
}

.personal-project h5 {
  flex: 1;
  font-size: 1.1rem;
  margin: 0;
}

.project-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.project-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.project-caption {
    position:absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    color: black;
    background-color: lightgray;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

#projects-p {
    font-size: 0.9rem;
}

.contact-list{
    padding: 1rem;
    list-style-type: none;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

@media (min-width: 768px) and (max-width: 1024px) {
    p {
        font-size: 1.5rem;
        padding: 0 2rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    h3 {
        font-size: 2rem;
    }

    #personal-image {
        width: 15rem;
        height: 15rem;
    }

    h2 {
        font-size: 3rem;
        margin-bottom: 2rem;
    }

    nav {
        font-size: 2.5rem;
        gap: 3.5rem;
    }

    #projects-p {
        font-size: 1.2rem;
        padding: 0 2rem;
        margin-bottom: 1.5rem;
    }

    #skills ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
        list-style: none;
        padding: 0;
        justify-items: center;
    }

    #skills li {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 100px;
        font-size: 1.2rem;
    }

    .skills-pics {
        height: 3rem;
        width: 3rem;
        object-fit: contain;
    }

    .personal-project {
        max-width: 600px;
        font-size: 1.7rem;
        padding-left: 2rem;
        text-align: left;
    }

    .personal-project h5 {
        font-size: 1.5rem;
    }

    .personal-project a {
        font-size: 1.5rem;
    }

    li {
        font-size: 1.5rem;
    }
}


@media (min-width: 1025px) {
    p {
        font-size: 1.2rem;
        padding: 0 2rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    h3 {
        font-size: 2rem;
    }

    
    #personal-info-wrapper {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        padding: 0 2rem;
        width: 100%;
        height: 100%;
    }

    #personal-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #personal-image {
        width: 20rem;
        height: 20rem;
        border-radius: 8px;
    }

    h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    #about {
        display: flex;
        flex-direction: row;
        justify-content: space-between; /* push h2 left, p right */
        align-items: center;            /* vertically center if taller */
        padding: 0 8rem;
        width: 100%;
        box-sizing: border-box;         /* only on this container */
    }

    #about h2,
    #about p {
        margin: 0;                      /* remove default margins */
        max-width: 45%;                 /* control width so they fit side by side */
        text-align: left;
    }

    #about h2 {
        margin-left: 20%;
    }

    #about p {
        margin-right: 4rem; 
    }

    nav {
        font-size: 2rem;
        gap: 3.5rem;
    }

    #projects-p {
        font-size: 1rem;
        padding: 0 2rem;
        margin-bottom: 1.5rem;
    }

    #skills ul {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 3rem;
        list-style: none;
        padding: 0;
        justify-items: center;
        margin-top: 5rem;
    }

    #skills li {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 100px;
        font-size: 1.2rem;
    }

    .skills-pics {
        height: 3rem;
        width: 3rem;
        object-fit: contain;
    }

    .personal-project {
        width: 100%;
        max-width: 1000px;
        margin: 0 auto;
        font-size: 1.7rem;
        padding: 0 1rem;
        text-align: left;
    }

    .personal-project h5 {
        font-size: 1.3rem;
    }

    .personal-project a {
        font-size: 1.5rem;
    }

    li {
        font-size: 1.2rem;
    }

    #about {
        width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
        text-align: center;
    }

    #about p {
        padding-top: 2rem;
    }

    .personal-project {
        overflow: visible;
    }

    .project-link {
        display: inline-block;
        text-decoration: none;   
        color: inherit; /* inherit color from parent */
    }

    .project-image-wrapper {
        position: relative;
        display: inline-block;
        max-width: 200px;
    }

    .project-image {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 8px;
        transition: transform 0.3s ease;
    }

    .project-image-wrapper:hover .project-image {
        transform: scale(1.5);
        z-index: 10;
        position: relative;
        transition: transform 0.3s ease;
        box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    }

    .project-caption {
        position:absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        font-size: 0.9rem;
        text-align: center;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 20;
    }

    .project-image-wrapper:hover .project-caption {
        opacity: 1;
    }

    .project-link, .project-image-wrapper {
        cursor: pointer;
    }

    .project-link:focus {
        outline: none;
    }

    .contact-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5rem;
        padding: 3rem;
        font-size: 1.6rem;
    }

}