:root {
    font-size: 16px;
    --margin: 5rem;
    --gutter: clamp(0.5rem, 3vw, 3rem);
    --menu-gap: clamp(2rem, 6vw, 6.5rem);
    --theme-gap: clamp(2rem, 7vw, 7.5rem);
    --column-width: calc((100% - 2 * var(--margin) - 7 * var(--gutter)) / 8);
    --col-gap: var(--gutter);
    --side-margin: clamp(1rem, 5vw, 5rem);
    --site-max-width: 151.2rem;
    --bg-light: #F5F5F5;
    --bg-light-2: #E4E4E4;
    --text-light: #000000;
    --bg-dark: #101010;
    --bg-dark-2: #101010;
    --text-dark: #F3F3F3;
    --card-bg-light: #EFEFEF;
    --card-bg-dark: #090909;
    --card-stroke-light: #CDCDCD;
    --card-stroke-dark: #212121;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;    
}

html, body {
    color: var(--text-light);
    background-color: var(--bg-light);
    width: 100%;
    height: 100%;
}

/*@media (prefers-color-scheme: dark) {
    html, body {
        color: var(--text-dark);
        background-color: var(--bg-dark);
    }
}*/

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.5s ease;
}

#Layer_2 {
    width: 5rem;
    height: 5rem;
}

.cls-1 {
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLogo 4s ease forwards;
    fill: none;
    stroke: var(--text-light);
}

@media (prefers-color-scheme: light) {
    #loader {
        background-color: var(--bg-light);
    }

    .cls-1 {
        stroke: var(--text-dark);
    }
}

@keyframes drawLogo {
    to {
        stroke-dashoffset: 0;
    }
}

/*@media (prefers-color-scheme: dark) {
    html, body {
        color: var(--text-dark);
        background-color: var(--bg-dark);
    }
}*/

main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;  
    overflow: scroll;
}

main > section:not(.projects-scroll-wrapper) {
    max-width: 1600px;
    margin: 0 auto;
    padding-inline: 1.5rem;
  }


  

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-100%);
    opacity: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-inline: var(--side-margin);
    min-height: clamp(5rem, 6vh, 8rem);
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(2rem);
    border-bottom: 1px solid var(--card-stroke-light);
}

/*@media (prefers-color-scheme: dark) {
    .navbar {
        border-bottom: none;
    }
}*/



.navbar.visible {
    transform: translateY(0);
    opacity: 1;
}

.logo img {
    width: 2rem;
    height: auto;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: clamp(4rem, 8vw, 8rem);
}

.menu {
    display: flex;
    flex-direction: row;
    gap: var(--menu-gap);
}

.menu li {
    list-style-type: none;
}
.menu a {
    text-decoration: none;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, border 0.2s ease;
}

.menu a:hover {
    background-color: var(--bg-light-2);
}

.menu a.active {
    border: 1px solid var(--text-light);
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(2rem);
}

.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
  }

.close-menu {
    visibility: hidden;
    position: fixed;
    bottom: 8rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.25rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid black;
    background: none;
    border-radius: 999px;
    color: black;
    cursor: pointer;
    z-index: 1002;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.theme-toggle img {
    width: 1.75rem;
    height: 1.75rem;
}

/*@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(20, 20, 20, 0.7);
        border-bottom: 1px solid var(--card-stroke-dark);
    }
    

    .menu a {
        color: var(--text-dark);
    }

    .menu a.active {
        border: 1px solid var(--text-dark);
        background: rgba(20, 20, 20, 0.70);    
    }
    .menu a:hover {
        background-color: var(--bg-dark-2);
    }

    
}*/

@media (max-width: 600px) {
    .navbar {
      transform: translateY(0) !important;
      opacity: 1 !important;
    }
    .hamburger {
        display: block;
        position: fixed;
        top: 1.5rem;
        height: 2rem;
        right: 1.5rem;
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
      }

    .menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        right: 1.5rem;
        background: rgba(255, 255, 255, 1);
        backdrop-filter: blur(1rem);
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        z-index: 999;
        font-size: 1.5rem;
    }

    .menu.open {
        display: flex;
    }

    .nav-items {
        position: static;
    }

    .logo {
        position: fixed;
        top: 1.5rem;
        left: 1.5rem;
        z-index: 1000;
    }

    .theme-toggle {
        display: none;
    }

    .close-menu {
        visibility: visible;
        position: absolute;
        bottom: 8rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5rem;
        padding: 0.5rem 1.5rem;
        border: 1px solid var(--text-light);
        background: none;
        border-radius: 999px;
        color: var(--text-light);
        cursor: pointer;
        z-index: 1002;
      }
  }

  /*@media (max-width: 600px) and (prefers-color-scheme: dark) {
    .menu {
        background-color: var(--bg-dark);
    }

    .close-menu {
        color: var(--text-dark);
        border: 1px solid var(--text-dark);
    }
  }*/
  

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.float-icon {
    position: absolute;
    width: clamp(18rem, 35vw, 20rem);
    height: auto;
    animation: wobble 6s ease-in-out infinite;
    transition: transform 0.2s ease-out;
    pointer-events: none;
    user-select: none;
}

.ui-design {top: 25%; left: 30%; animation-delay: 0s; scale: 1.2;}
.print {top: 45%; left: 7%; animation-delay: 0s;}
.model {top: 63%; left: 30%; animation-delay: 0s; rotate: -60deg; scale: 1.1;}
.product-vis {top: 5%; left: 5%; animation-delay: 0s; rotate: -10deg;}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
  }

@keyframes wobble {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(2px, -3px) rotate(1deg); }
    50%  { transform: translate(-2px, 2px) rotate(-1deg); }
    75%  { transform: translate(1px, -2px) rotate(0.5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
  }

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-left: auto;
    margin-right: clamp(1rem, 20vw, 12.5rem);
}

.hero h1 {
    font-weight: 400;
    font-size: clamp(1.5rem, 5vw, 2.25rem);
}

@media (max-width: 600px) {
    .hero-content {
        margin: 0;
        padding-inline: 1.5rem;
        gap: 2rem;
    }

    .floating-icons {
        visibility: hidden;
    }
}

@media (min-width: 601px) and (max-width: 1200px) {

    .hero-content {
        margin-right: clamp(1.5rem, 10vw, 12.5rem);
    }

    .print {top: 45%; left: 1%; animation-delay: 0s;}
    .product-vis {top: 60%; left: 25%; animation-delay: 0s;}

}


#about {
    min-height: 75vh;
    height: auto;
    position: relative;
    display: flex;
    align-items: center;
}

.about-content {
    display: flex;
    align-items: first baseline;
    gap: 14rem;
}
.about-content  {
    max-width: 60ch;
    font-size: 1.5rem;
    margin-inline-start: clamp(2rem, 15vw, 16rem);
}

.about-content p {
    line-height: 2rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.skills-list h3 {
    font-weight: 200;
    font-size: 1rem;
    text-transform: uppercase;
}
.skills {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.skills li {
    font-size: 1.5rem;
}

@media (max-width: 600px) {

    #about {
        padding-block: 2rem;
    }

    .about-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 3.5rem;
        margin-inline-start: 0;
    }

    .about-content p {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    #about {
        padding-inline: 1.5rem;
    }

    .skills li {
        font-size: 1.25rem;
    }

    .skills-list h3 {
        font-size: 1rem;
    }
}

@media (min-width: 601px) and (max-width: 1200px) {

    #about {
        justify-content: center;
        padding: 1.5rem;
    }

    .about-content {
        margin-inline: 0;
        justify-content: center;
        align-items: center;
    }
}

/* Projectss */


.projects-scroll-wrapper {
    height: 175%;
    position: relative;
    background-color: var(--bg-light-2);
}


.projects-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.projects-slider {
    display: flex;
    gap: clamp(1rem, 4vw, 3.5rem);
    padding-left: 25vw;
    transform: translateX(0);
    transition: transform 0.1s ease;
    will-change: transform;
}

.project-card {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: clamp(16rem, 30vw, 29.8125rem);  /* scales between ~256px and 477px */
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 0.75rem;
    background-color: var(--card-bg-light);
    border: 1px solid var(--card-stroke-light);
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.project-card.rotate-left:hover {
    transform: rotate(-2deg);
    cursor: pointer;
}

.project-card.rotate-right:hover {
    transform: rotate(2deg);
}

.project-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.3125rem;
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta h3 {
    font-size: 2rem;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-text {
    display: flex;
    justify-content: space-between;
}
.meta span {
    font-size: 1.5rem;
    font-weight: 200;
}

.image-wrapper {
    position: relative;
  }
  
  .tooltip {
    position: absolute;
    transform: translateX(-60%) translateY(-150%);    
    background: rgba(53, 53, 53, 0.13);
    background: color(display-p3 0.209 0.209 0.209 / 0.13);
    border: 1px solid var(--card-stroke-light);
    backdrop-filter: blur(5rem);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 1.25rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
  }
  
  .project-card:hover .tooltip {
    opacity: 1;
    visibility: visible;
  }

/*@media (prefers-color-scheme: dark) {
    .projects-scroll-wrapper {
        background-color: var(--bg-dark-2);
    }
    .project-card{
        color: var(--text-dark);
        background-color: var(--card-bg-dark);
        border: 1px solid var(--card-stroke-dark);
    }
}*/

@media (max-width: 600px) {
    .projects-scroll-wrapper {
      height: auto;
      position: relative;
      padding: 2rem 1rem;
    }
  
    .projects-sticky {
      position: static;
      height: auto;
      overflow: visible;
      display: block;
    }
  
    .projects-slider {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      padding-left: 0;
      transform: none;
    }
  
    .project-card {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
    }
    .tooltip {
        display: none;
    }

    .meta h3 {
        font-size: 1.5rem;
    }

    .meta span {
        font-size: 1.25rem;
    }
  }

  @media (min-width: 601px) and (max-width: 1200px) {
    .tooltip {
        display: none;
    }
  }


#contact {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: clamp(2rem, 5vw, 6rem);
    gap: 21rem;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.links li {
    list-style-type: none;
    font-size: 3rem;
    text-transform: uppercase;
}

.links a {
    position: relative;
    text-decoration: none;
    color: var(--text-light);
}

.links a::after{
    content: '';
    position: absolute;
    height: 2.5px;
    left: 0;
    bottom: 0;
    width: 0;
    background: var(--text-light);
    transition: width 0.25s ease-in-out;
}

.links a:hover:after {
    width: 100%;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinning-anim {
    animation: spin 10s linear infinite;
}

.svg-desktop {
    display: block;
}

.svg-mobile {
    display: none;
}

.svg-desktop-dark {
    display: none;
}

.svg-mobile-dark {
    display: none;
}

.legal-content {
    display: flex;
    font-size: 0.875 rem;
    justify-content: center;
    gap: 10rem;
    padding-bottom: 1rem;
}

@media (max-width:600px) {
    .contact-content {
        flex-direction: column;
        width: 100%;
        gap: 5rem;
        padding-inline: 2.5rem;
    }

    .links {
        gap: 1.5rem;
        align-self: flex-start;
    }
    .links li {
        font-size: 2.25rem;
    }

    .svg-desktop {
        display: none;
    }
    .svg-mobile {
        display: block;
    }

    .legal-content {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.875rem;
        font-weight: 200;
        padding-inline: 1.5rem;

    }

    .legal-content a {
        text-decoration: none;
        color: var(--text-light);
    }
}
/*@media (prefers-color-scheme: dark) {
    .svg-desktop {
        display: none;
    }
    .svg-desktop-dark {
        display: block;
    }

    .links a {
        color: var(--text-dark);
    }

    .links a::after {
        background: var(--text-dark);
    }
}

@media (prefers-color-scheme: dark) and (max-width: 600px) {
    .svg-desktop {
        display: none;
    }
    .svg-mobile-dark {
        display: block;
    }
    .svg-desktop-dark {
        display: none;
    }
    .svg-mobile {
        display: none;
    }
}*/


/*  Project Template */

.project-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 2.5rem;
    padding-inline: 5rem;
    padding-top: 5rem;
}

.header-meta {
    display: flex;
    gap: 3rem;
    align-items: last baseline;
}

.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.type-tags {
    font-size: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    font-size: 1.125rem;
    padding: 0.5rem 1rem;
    border-radius: 30rem;
    background-color: var(--bg-light);
    border: 1px solid var(--card-stroke-light);
}

.project-content h1 {
    font-weight: 400;
    font-size: 3rem;
    text-transform: uppercase;
}

.project-year {
    font-size: 1.5rem;
}

.header-img-container {
    width: 100%;
    height: auto;
}

.header-img-container img {
    width: 100%;
    height: 30rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--card-stroke-light);
}

.project-description-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 50rem;
    align-self: flex-start;
}

.description-meta {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.875rem;
    opacity: 0.5;
}

.description {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.description a {
    position: relative;
    color: var(--text-light);
    text-decoration: none;
    font-style: italic;
}

.description a::after{
    content: '';
    position: absolute;
    height: 1.5px;
    left: 0;
    bottom: 0;
    width: 0;
    background: var(--text-light);
    transition: width 0.1s ease-in-out;
}

/*@media (prefers-color-scheme: dark) {
    .description a::after{
        background: var(--text-dark);
    }
}*/

.description a:hover:after {
    width: 100%;
}

.first-image-row {
    width: 100%;
    height: 35rem;
    display: flex;
    gap: 3rem;
    justify-content: space-between;
}

.first-image-row img {
    height: auto;
    width: calc(50% - 1.5rem);
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--card-stroke-light);
}

.second-image-row {
    width: 100%;
    height: 50rem;
}

.second-image-row img {
    width: 100%;
    height: 50rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--card-stroke-light);
}

.third-image-row {
    width: 100%;
    height: 50rem;
}

.third-image-row img {
    width: 100%;
    height: 50rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--card-stroke-light);
}

.fourth-image-row {
    width: 100%;
    height: 35rem;
    display: flex;
    gap: 3rem;
    justify-content: space-between;
    margin-bottom: 10rem;
}

.fourth-image-row img {
    height: auto;
    width: calc(50% - 1.5rem);
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--card-stroke-light);
}

/*@media (prefers-color-scheme: dark) {
    .tag {
        background: var(--bg-dark-2);
        border: 1px solid var(--card-stroke-dark);
        color: var(--text-dark);
    }

    .first-image-row img,
    .second-image-row img,
    .third-image-row img,
    .fourth-image-row img{
        border: 1px solid var(--card-stroke-dark);
    }

    .description a {
        color: var(--text-dark);
    }

    .header-img-container img {
        border: 1px solid var(--card-stroke-dark);
    }
}*/

@media (max-width: 600px) {
    .project-content {
      padding-inline: 1.5rem;
      padding-top: 7rem; /* optional: reduce top padding too */
    }
  
    .project-description-container {
      width: 100%;
      margin-left: 0;
      align-self: stretch;
    }
  
    .header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1.5rem;
    }
  
    .first-image-row,
    .fourth-image-row {
      flex-direction: column;
      gap: 1.5rem;
    }
  
    .first-image-row img,
    .fourth-image-row img {
      width: 100%;
    }

    .first-image-row,
    .second-image-row,
    .third-image-row,
    .fourth-image-row {
        height: auto;
    }

    .first-image-row img,
    .second-image-row img,
    .third-image-row img,
    .fourth-image-row img {
        height: auto;
        width: 100%;
    }

    .description {
        font-size: 1.15rem;
        line-height: 1.75rem;
        text-align: left;
    }
    .description-meta {
        font-size: 1rem;
    }

    .tag {
        font-size: 1rem;
    }

    .project-content h1 {
        font-size: 2.5rem;
    }

    .project-year {
        font-size: 1.25rem;
    }

    
  }
  
  /*Legal*/

  .legal--list {
    padding: 5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;

  }

  .legal--list li {
    list-style: none;
  }

  .legal--list p {
    max-width: 80vw;
  }