:root {
    --font-ratio: 1;
    --intro-heading: calc(3rem * var(--font-ratio));
    --pitch: calc(1.12rem * var(--font-ratio));
    --primary-heading: calc(2rem * var(--font-ratio));
    --pitch-line-height: calc(2.12rem * var(--font-ratio));
    --secondary-heading: calc(1.5rem * var(--font-ratio));
    --tertiary-heading: calc(1.15rem * var(--font-ratio));
    --thumbnail-heading: calc(1.25rem * var(--font-ratio));
    --head-details: calc(1rem * var(--font-ratio));
    --body-text: calc(1rem * var(--font-ratio));
    --skill-head: calc(1.1rem * var(--font-ratio));
    --next-project: calc(1.2rem * var(--font-ratio));
    --footer-text: calc(0.875rem * var(--font-ratio));
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
  height: 100%;       /* full viewport height */
  margin: 0;          /* remove default spacing */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: rgb(250, 250, 246);
    color: #1c234f;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', Times, serif;
}

h1 {
    font-weight: 900;
    font-size: var(--primary-heading);
}

h2 {
    font-size: var(--secondary-heading);
}

h3 {
    font-size: var(--tertiary-heading);
}

.overlay h3 {
    font-size: var(--thumbnail-heading);
}

.project-head h3 {
    font-size: var(--head-details);
}

p {
    margin-bottom: 1rem;
    font-weight: normal;
    font-size: var(--body-text);
}

header {
    position: fixed;
    width: 100%;
    z-index: 999;
}

#logo {
    max-width: 12rem;
}

li {
    list-style: none;
    font-size: var(--body-text);
}

a {
    color: #1c234f;
    text-decoration: none;
}

nav ul li a {
    position: relative;
    text-decoration: none;
    color: #dcaf27;
    padding: 0.5em 0;
  }

nav ul li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 100%;
    height: 2px;
    background-color: #dcaf27;
    transition: transform 0.3s ease;
  }
  
nav ul li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar {
    transition: background-color 0.3s ease;
    background-color: transparent;
    min-height: 5rem;
    width: 100%;
    display: flex;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0 2rem;
    margin: 0 auto;
}

.navbar .scrolled {
    z-index: 0;
}

.navbar.scrolled:not(:hover),
.navbar.transparent:not(:hover) {
  background-color: transparent;
}

.navbar.scrolled:not(:hover) a,
.navbar.transparent:not(:hover) a {
    color: #1c234f;  
}

.navbar:hover,
.navbar.solid {
  background-color: #1c234f;
}

.navbar:hover a,
.navbar.solid a {
  color: #fff;
}

.nav-branding img {
    max-height: 48px;
    width: auto;
}

.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3.75rem;
    top: 5rem;
}

.nav-link {
    transition: 0.7s ease;
}

.nav-link:hover {
    color: #dcaf27;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 1.5625rem;
    height: .1875rem;
    margin: .3125rem auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

main {
    padding-top: 6rem;
    flex: 1;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

.pitch-sentence {
    text-align: center;
    margin: 0 auto;
    padding: 1rem 1rem 2rem 1rem;
}

.pitch-sentence h1 {
    font-size: var(--intro-heading);
    line-height: 4.5rem;
    padding-bottom: 2rem;
}

.pitch-sentence p {
    font-size: var(--pitch);
    font-style: italic;
    max-width: 35rem;
    margin: 0 auto;
    line-height: var(--pitch-line-height);
    border-top: 2px solid #1c234f;
    border-bottom: 2px solid #1c234f;
}

.gallery-wrapper, .home-gallery-wrapper {
    max-width: 75rem;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}  

.gallery-wrapper h1, h2{
    text-align: center;
}

.gallery, .gallery-one, .gallery-three, .home-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
  
.thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}
  
.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}
  
.thumb-front {
    z-index: 3;
    opacity: 1;
}

.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
    z-index: 2;
  }
  
.thumb-hover {
    z-index: 1;
    opacity: 0;
}
  
.thumbnail:hover .thumb-hover {
    opacity: 1;
}
  
.thumbnail:hover .thumb-front {
    opacity: 0;
}
  
.overlay {
    position: absolute;
    bottom: 7%;
    left: 7%;
    z-index: 2;
    color: white;
    opacity: 1;
    pointer-events: none;
}
  
.overlay h3, .overlay p {
    margin: 0;
    padding: 0.2em 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}  

#profile {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#profile img {
    min-height: 17rem;
    width: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

#job-title {
    font-style: italic;
    font-size: var(--next-project);
    padding-bottom: 0.5rem;
}

#skills, .project-head {
    display: grid;
    grid-template-columns: 1fr;  
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
}

#skills {
    max-width: 70rem;
    padding: 1rem;
}

#skills > div {
    text-align: left;
    max-width: 17rem;
    width: 100%;
    padding: .25rem;
    margin: 0 auto;
}

#skills h3 {
    padding-bottom: 0.5rem;
    font-size: var(--skill-head);
}

#skills li {
  list-style: disc;
}

#skills ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.left h2 {
    text-align: left;
}

#contact-form {
    gap: 2rem;
    max-width: 50rem;
}

#form-gallery {
    gap: 2rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: var(--body-text);
  outline: none;
  background: none;
}

.form-group label {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #888;
  font-size: var(--body-text);
  pointer-events: none;
  transition: 0.2s ease all;
  background: rgb(250, 250, 246);
  padding: 0 4px;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 8px;
  font-size: 1rem;
  color: #1c234f;
}

button {
  padding: 10px 20px;
  border: none;
  background: #1c234f;
  color: white;
  font-size: var(--body-text);
  border-radius: 6px;
  cursor: pointer;
}

.button-left-align {
  width: 10rem;
}

button:hover {
  background: #dcaf27;
}

#form-status:empty {
    display: none;
}

.left-align, .button-left-align {
    text-align: center;
    margin: 0 auto;
}

.project-head {
    text-align: center;
    padding: 2rem 1rem;
}

.project-hero, .project-hero-wide {
    max-width: 80rem;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-hero img, .project-hero-wide img {
  width: 100%;
  object-fit: cover;
}

.project-hero img {
  min-height: 12rem;
}

.text-span {
  max-width: 60em;
  padding-top: 0.5rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.text-span h3 {
    padding-bottom: 1rem;
}

.text-span a, #my-email a {
    color: blue;
}

.text-span a:hover, #my-email a:hover {
    color: #dcaf27;
    text-decoration: underline;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-thumbnail-wrapper {
    overflow: hidden;
}

.project-thumbnail {
  cursor: pointer;
  width: 100%;
  transition: transform 0.3s ease;
  display: block;
}

.project-thumbnail:hover {
    transform: scale(1.05);
}

#bottles {
    max-width: 30rem;
    margin: 0 auto;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.lightbox-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
}

#close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-content:hover #close-btn {
  opacity: 1;
}

.no-scroll {
  overflow: hidden;
}

.next-project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 75rem;
    padding: 2rem 1rem 0 1rem;
}

.next-project h3 {
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: var(--next-project);
}

.next-project a:hover {
    color: #dcaf27;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    color: #1c234f;
    margin-top: 1rem;
    padding: 4rem 0 2rem 0;
    flex-shrink: 0;
    width: 100%;
}

footer p {
    font: var(--footer-text);
}

.socials {
    display: flex;
    gap: 2rem;
    padding-bottom: 1rem;
    font-size: var(--body-text);
}

.socials a:hover {
    color: #dcaf27;
}

#back-to-top {
    display: none;
}

@media screen and (min-width:30em) {

    :root {
        --font-ratio: 1.25
    }

    #logo {
        max-width: 15rem;
    }    

    #skills {
        grid-template-columns: 1fr 1fr;
    }

    .left-align, .button-left-align {
        margin: initial;
    }

    .left-align {
        text-align: left;
    }

}

@media screen and (min-width:48em) {

    :root {
        --font-ratio: 1.33
    }

    #logo {
        max-width: 18rem;
    }    

    .gallery, .home-gallery {
        grid-template-columns: 1fr 1fr;
    }   

    .gallery-three {
        grid-template-columns: 1fr 1fr 1fr;
    } 

    #about-description {
        margin-right: 0.75rem;
    }

    .left {
        order: 0;
    }

    .middle-left {
        order: 1;
    }

    .middle-right {
        order: 2;
    }

    .right {
        order: 4;
    }

    #head-right {
        text-align: right;
    }

    .text-span {
        grid-template-columns: 1fr;
    }

    .vertical-center {
        margin: auto 0;
        padding: 0 3rem;
    }

    #profile img {
        height: 32rem;
        display: block;
    }

    #skills {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    #bottles {
        margin: initial;
        justify-self: end;
    }

    footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 4rem 8rem 2rem 8rem;
    }

    .footer-left {
        order: 1;
    }

    .footer-right {
        order: 2;
    }

    #back-to-top {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 2rem;
        background-color: #1c234f;
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #back-to-top.show {
        opacity: 1;
        pointer-events: auto;
    }

    #back-to-top:focus-visible {
        outline: 2px solid #1c234f;
        outline-offset: 4px;
    }

}

@media screen and (min-width:64em) {

    :root {
        --font-ratio: 1.414
    }

}

@media screen and (min-width:100em) {

    .home-gallery-wrapper {
        max-width: none;
    }

    .home-gallery {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .project-hero, .project-hero-wide {
        max-width: 100rem;
    }

}

@media screen and (max-width:48em) {

    .navbar.scrolled:not(:hover),
    .navbar.transparent:not(:hover) {
        background-color:#1c234f;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        gap: 0;
        flex-direction: column;
        background-color:#1c234f;
        width: 100%;
        text-align: center;
        transition: 0.3s;
    }
    
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(.5rem) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-.5rem) rotate(-45deg);
    }

    .nav-item {
        margin: 5rem 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
}

@media (hover: hover) and (pointer: fine) {
    #back-to-top:hover {
        background-color: #dcaf27;
        transform: translateY(-5px);
    }
}