@font-face {
  font-family: "Clash Grotesk";
  src: url("../assets/fonts/ClashGrotesk/ClashGrotesk-Variable.ttf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Aktura";
  src: url("../assets/fonts/homepageFonts/Aktura-Regular.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Chillax";
  src: url("../assets/fonts/homepageFonts/Chillax-Variable.ttf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Nippo";
  src: url("../assets/fonts/homepageFonts/Nippo-Regular.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../assets/fonts/homepageFonts/CabinetGrotesk-Variable.ttf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Array";
  src: url("../assets/fonts/homepageFonts/Array-Regular.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "PubliFluorChrystelise";
  src: url("../assets/fonts/homepageFonts/PubliFluorChrystelise.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Polsku";
  src: url("../assets/fonts/homepageFonts/Polsku.ttf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Sans Guilt Wafer";
  src: url("../assets/fonts/homepageFonts/SansGuiltWafer.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Terminal Grotesque";
  src: url("../assets/fonts/homepageFonts/terminal-grotesque_open.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Bocalupo";
  src: url("../assets/fonts/homepageFonts/Bocalupo-Regular.otf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Young Serif";
  src: url("../assets/fonts/homepageFonts/YoungSerif-Regular.ttf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "jgs Font";
  src: url("../assets/fonts/homepageFonts/jgs_Font.ttf");
  font-weight: normal;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/homepageFonts/Poppins-VariableFont_wght.ttf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Basteleur";
  src: url("../assets/fonts/homepageFonts/Basteleur-Bold.ttf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

@font-face {
  font-family: "Sage Grotesk";
  src: url("../assets/fonts/homepageFonts/Sage-Grotesk.otf");
  font-weight: 100 900;
  font-display: block;
  font-style: normal;
}

:root {
  --text-color: #000000;
  --bg-color: #F5F5F5;
}

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

body {
  font-family: "Clash Grotesk", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  overflow: auto;
}

a {
  color: #ff6f00;
}

a:visited {
  color: #b85c00;
}

.spacer {
  margin-top: 2rem;
}

.side-nav {
  flex: 1;
  font-family: "Clash Grotesk", sans-serif;
  left: 1rem;

  height: auto;
  transition: all 0.3s ease;
}

/* .side-nav.sticky {
    flex: 1;
    top: 2rem;
    transform: none;
} */

.sticky {
  position: -webkit-sticky;
  /* for Safari */
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.side-nav ul {
  list-style: none;

  text-orientation: mixed;
}

.side-nav li {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 2rem 0;
}

.side-nav a {
  text-decoration: none;
  font-family: "Clash Grotesk", sans-serif;
  color: var(--text-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.side-nav a:hover {
  font-size: 2rem;
  color: #ff6f00;
  transition: all 0.3s ease;
}

.side-nav .active {
  color: #d5b1e3;
}

main {
  flex: 6;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.title {
  padding: none;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: normal;
  margin-bottom: 4rem;
  text-align: center;
  /* Removed transition for instant font changes */
  min-height: 1.2em;
  width: 100%;
  max-width: 800px;
  position: absolute;
  top: 50vh;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.title:hover {
  cursor: default;
}

.intro {
  margin-top: 90%;
  max-width: 600px;
  margin-left: 6vw;
  margin-right: auto;
  line-height: 1.6;
}

.bio {
  max-width: 600px;
  margin-left: 6vw;
  margin-right: auto;
  line-height: 1.6;
}

.profile-image {
  margin: 4rem 0;
  width: 60vw;
  margin-left: 6vw;
}

.profile-image img {
  width: 100%;
  height: auto;
  object-fit: cover;

  box-shadow: inset 10px 10px black;
  -webkit-box-shadow: inset 10px 10px black;
  -moz-box-shadow: inset 10px 10px black;
}

.boulder-co {
  align-self: flex-start;
  flex: 1;
  padding-top: 40vh;
  font-family: "Clash Grotesk", sans-serif;
  font-size: 1.5rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: all 0.3s ease;
  color: black;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

footer {
  font-family: "Clash Grotesk", sans-serif;
  padding-top: 15rem;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.font-credits {
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  text-align: center;
  color: #666666;
  z-index: 100;
  pointer-events: none;
}

/* Add styles for sub-pages */
.page-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 2rem;
  text-align: center;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.project-card {
  background: var(--bg-color);
  border: 1px solid var(--text-color);
  padding: 1rem;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resume-section {
  max-width: 600px;
  margin: 4rem auto;
  text-align: center;
}

#resume-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #e0e0e0;
  color: var(--text-color);
  text-decoration: none;
  font-family: "Clash Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#resume-button:hover {
  background-color: #ff6f00;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }

  main {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1rem;
    margin-top: 36px; /* Space for nav + font credits */
    padding-top: 0;
  }

  body {
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
    width: auto;
  }

  .title {
    top: 50vh;
    font-size: clamp(2.5rem, 7vw, 6rem);
    height: 20vh;
    /* Fixed height container */
    line-height: 1.2;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    /* Allow wrapping if needed */
    text-align: center;
    margin-top: 264px;
    margin-bottom: 132px;
    /* Space for the font credits */
  }

  .intro {
    margin-top: 80vh;
    margin-top: 2rem;
    /* No more percentage-based margin */
    padding-top: 0;
    position: relative;
    z-index: 1;
  }

  .profile-image img {
    width: 85vw;
  }

  .side-nav {
    top: 2.5rem; /* Give space for font-credits */
    height: auto;
    padding: 0;
    position: fixed;
    width: auto;
    z-index: 1500; /* Lower than font-credits */
    left: 0.5rem;
  }

  .side-nav ul {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 2rem 0;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .side-nav li {
    margin: 0;
    padding: 1rem 0;
  }

  .boulder-co {
    display: none;
  }

  footer {
    position: static;
    padding-top: 5rem;
    margin-top: 4rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    bottom:auto;
  }

  .font-credits {
    position: fixed; /* Change from sticky to fixed */
    top: 0;
    background: var(--bg-color);
    padding: 0.5rem 0.25rem;
    margin-bottom: 0; /* Remove margin */
    z-index: 2000; /* Higher than side-nav */
    width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .project-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .resume-section {
    position: relative;
    z-index: 10;
  }

  #resume-button {
    position: relative;
    z-index: 11;
    min-height: 48px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.title-container {
    position: fixed;
    right: 0;
    top: 0;
    width: 70.71%;
    z-index: 1;
    pointer-events: none;
  }
  
  .title-svg {
    width: 100%;
    position: absolute;
  }
  
  .title-svg text {
    font-family: "Clash Grotesk", sans-serif;
    font-size: 4rem;
    fill: var(--text-color);
}

.title-svg path {
    stroke: transparent;
}

@media (max-width: 768px) {
    .title-svg text {
        font-size: 36pt;
    }
}

/* Projects Gallery Styles */
.projects-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20vw;
}

.projects-gallery {
    width: 70.71%;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.gallery-row {
    display: flex;
    width: 100%;
}

.gallery-row.full-width {
    width: 100%;
}

.gallery-row.two-columns {
    display: flex;
    gap: 44px;
}

.gallery-row.multi-image {
    display: flex;
    gap: 44px;
    width: 100%;
}

.gallery-row.multi-image .gallery-item {
    flex: 1;
}

.gallery-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.gallery-item {
    width: 100%;
    overflow: hidden;
    border-radius: 0px;
    transition: transform 0.3s ease;
    /* Reliable taps on mobile and touch devices */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* When gallery-item is a link (index.html) */
a.gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0px;
}

.project-info {
    font-family: "Clash Grotesk", sans-serif;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.project-title {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.project-description {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .projects-gallery {
        width: 90%;
        
    }
    
    .gallery-row.two-columns {
        flex-direction: column;
    }

    .gallery-row.multi-image {
        flex-direction: column;
    }

    .title-svg text {
        font-size: 96px;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }
}

/* Bouncing Arrow Styles */
.bouncing-arrow {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bouncing-arrow img {
    width: 30px;
    height: 30px;
    display: block;
}

@media (max-width: 768px) {
    .bouncing-arrow {
        bottom: 1rem;
    }
    
    .bouncing-arrow img {
        width: 30px;
        height: 30px;
    }
}

  .web-screenshot-container {
    height: 500px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: block;
  }

  #web-screenshot {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
