* {
  padding: 0;
  border: 0;
  margin: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
html {
  background-color: #121621;
  color: #fff;
}
html,
body {
  width: 100%;
  overflow-x: clip;
}
html {
  scroll-snap-type: none;
}
body {
  background-image: none;
}
section {
  scroll-snap-align: none;
}
html.scroll-snap {
  scroll-snap-type: y mandatory;
}
.scroll-snap section {
  scroll-snap-align: start;
}
h1 {
  font-size: 5em;
  line-height: 1.1em;
  letter-spacing: 3px;
  display: inline-block;
}
h2 {
  font-size: 3.3em;
  margin: 10px 0;
}
h3 {
  font-size: 17px;
  font-weight: bold;
  color: #f49d38;
  margin: 20px 0;
}
h3::before {
  content: "";
  display: inline-block;
  background-image: url(../img/chevron-r.svg);
  background-repeat: no-repeat;
  background-size: contain;
  width: 10px;
  height: 10px;
  margin-right: 10px;
}
p {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.7;
}
.subtitle {
  font-weight: 600;
}
li {
  list-style: none;
  font-size: 15px;
}
a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
a:hover {
  color: #f49d38;
}
p a {
  text-decoration: underline;
}
p a:hover {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #f49d38;
}
img {
  height: auto;
  max-width: 100%;
}
button {
  cursor: pointer;
}
::-moz-selection {
  /* Code for Firefox */
  color: #fff;
  background: #f49d38;
}
::selection {
  color: #fff;
  background: #f49d38;
}

.bkg {
  position: fixed;
  right: 0;
  height: 100vh;
}
.bkg div {
  background-color: #fff;
  height: 100%;
  display: inline-block;
  margin-left: -4px;
}
.bkg div:nth-child(1) {
  width: 190px;
  opacity: 0.02;
}
.bkg div:nth-child(2) {
  width: 120px;
  opacity: 0.06;
}
.bkg div:nth-child(3) {
  width: 40px;
  opacity: 0.1;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
}
header .container {
  background-color: #0c0f16;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */
  border-radius: 10px;
}
header ul {
  display: inline;
}
header ul * {
  font-weight: 600;
  font-size: 12px;
}
header ul li {
  display: inline-block;
  margin-left: 10px;
  cursor: pointer;
}
#mybtn {
  background-color: transparent;
  color: #f49d38;
  cursor: pointer;
}
#mybtn::before {
  content: "";
  display: inline-block;
  background-image: url(../img/chevron-u.svg);
  background-repeat: no-repeat;
  background-size: contain;
  width: 10px;
  height: 8px;
  margin-right: 5px;
}
.email {
  max-height: 0;
  overflow: hidden;
  transition: 0.3s max-height;
  display: block;
}
.email span {
  color: #f49d38;
  margin-left: 5px;
}
header .container:hover .email {
  max-height: 30px;
}

section {
  width: 100%;
  height: 100vh;
  min-height: 400px;
  overflow: hidden;
}
section .container {
  position: relative;
  padding: 0 7%;
  width: 100%;
  max-width: 2100px;
  margin: 0 auto;
  height: auto;
}

#home {
  display: flex;
  align-items: center;
}
#home p {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 18px;
  line-height: 25px;
}
.arrow-wrapper {
  margin-top: 80px;
  position: relative;
}
.arrow-wrapper p {
  margin-left: 40px;
}
.arrow {
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  cursor: pointer;
}

#projects {
  position: relative;
}
#projects h2 {
  color: #f49d38;
  margin: 0 0 8px;
}
.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 5rem clamp(10px, 3vw, 20px) 0;
  position: relative;
  z-index: 1;
}
.filter-pill {
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(244, 157, 56, 0.45);
  background: transparent;
  color: #f49d38;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.filter-pill:hover {
  background: rgba(244, 157, 56, 0.12);
}
.filter-pill.active {
  background: #f49d38;
  color: #0d0d0d;
  border-color: #f49d38;
}
.project-grid > .container.is-hidden {
  display: none;
}
.project-grid > .container.is-focused > .project {
  position: relative;
  animation: focus-pulse 2.4s ease-in-out infinite;
}
.card-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 170px;
  padding: 4px;
  background: #0c0f16;
  border: 1px solid rgba(244, 157, 56, 0.4);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  font-family: 'Poppins', sans-serif;
}
.card-context-menu[hidden] {
  display: none;
}
.card-context-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #f49d38;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.card-context-menu__item:hover,
.card-context-menu__item:focus-visible {
  background: rgba(244, 157, 56, 0.14);
  outline: none;
}
@keyframes focus-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1.5px rgba(244, 157, 56, 0.55),
      0 0 18px rgba(244, 157, 56, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 1.5px rgba(244, 157, 56, 1),
      0 0 32px rgba(244, 157, 56, 0.65);
  }
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 0.9rem;
  width: min(2100px, 100%);
  padding: 1.25rem clamp(16px, 3vw, 40px) 2rem;
  max-width: 2100px;
  margin: 0 auto;
  overflow-x: clip;
}
.project-grid > .container {
  padding: 0;
  max-width: none;
  min-width: 0;
}
.project-grid .project {
  height: auto;
  min-height: unset;
  padding: 0.85rem;
  overflow: hidden;
  opacity: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.project-grid h2 {
  font-size: 1.4em;
  margin: 0 0 3px;
}
.project-grid .subtitle {
  font-size: 11px;
  margin: 3px 0;
}
.project-grid p {
  font-size: 13px;
  margin: 5px 0;
  line-height: 1.5;
}
.project-grid li {
  font-size: 13px;
  line-height: 1.5;
}
.project-grid .l-col,
.project-grid .r-col {
  width: 100%;
  display: block;
  margin-left: 0;
}
.project-grid .r-col {
  order: -1;
  margin: 0 0 0.5rem;
  overflow: hidden;
}
.project-grid .preview-extra {
  display: none;
  order: 2;
  margin-top: 0.25rem;
}
.project-grid .preview-extra.is-visible {
  display: block;
}
.project-grid .project-carousel {
  height: 260px;
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
  clip-path: inset(0 round 8px);
}
.project-grid .project-carousel img,
.project-grid .project-carousel video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  border-radius: inherit;
}
.project-grid .project-carousel img.active,
.project-grid .project-carousel video.active {
  display: block;
  border-radius: inherit;
  clip-path: inset(0 round 8px);
}
.project-grid .project-carousel:has(iframe) {
  height: auto;
  overflow: hidden;
}
.project-grid .project-carousel iframe,
.project-grid .project-carousel:not(.project-carousel--slides) video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: inherit;
  clip-path: inset(0 round 8px);
}
@media screen and (max-width: 500px) {
  .project-grid .project-carousel {
    height: clamp(240px, 68vw, 360px);
  }
}
.project-grid .desc-body {
  max-height: 0;
}
.project-grid .desc-body::after {
  display: none;
}
.project-grid .desc-body.expanded {
  max-height: 800px;
}
.project-grid .button {
  display: none;
}
.project-grid .desc-body.expanded ~ .button {
  display: block;
}
.project-grid .preview-extra .project-carousel {
  margin-top: 0;
}
.project-grid h2 {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  font-size: clamp(1em, 2.6vw, 1.4em);
  line-height: 1.15;
}
.project-grid .subtitle {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
.project-grid .button a {
  margin-top: 14px;
}
@media screen and (max-width: 960px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 1rem 3% 1.5rem;
  }
}
@media screen and (max-width: 500px) {
  .project-grid {
    padding: 0.75rem clamp(10px, 3vw, 20px) 1rem;
    gap: 0.65rem;
  }
  .project-grid .project {
    padding: 0.75rem;
  }
  .project-grid h2 {
    font-size: 1.15em;
  }
}
.project-bkg {
  height: 100%;
  position: absolute;
  width: 95%;
  right: 0;
  top: 90px;
  background-color: #000000b8;
  opacity: 1;
  transition: 0.3s opacity;
}
.project-bkg > div {
  position: relative;
  width: 100%;
  height: 100%;
}
.project-bkgimg {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background-image: url("../img/insomnia-1.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  opacity: 0.06;
}
section:has(.project-grid) .project-bkg {
  width: 100%;
  left: 0;
  right: auto;
  top: 0;
}
.project .visible{
  overflow: auto;
}
.project {
  height: 100vh;
  padding: 80px 0;
  overflow: hidden;
}
.l-col {
  width: 55%;
}
.r-col {
  width: 40%;
  margin-left: 4%;
  min-height: 60px;
}
.l-col,
.r-col {
  display: inline-block;
  vertical-align: top;
}
.button {
  width: 100%;
}
.button a {
  color: #fff;
  position: relative;
  padding-left: 15px;
  margin-top: 40px;
  z-index: 1;
  font-size: 15px;
  text-transform: uppercase;
}
.button a::before {
  content: "";
  position: absolute;
  display: inline-block;
  width: 5px;
  height: 45px;
  top: 50%;
  left: 0;
  z-index: -1;
  background-color: #f49d38;
  transform: translate(0, -50%);
  transition: 0.3s width;
}
.button a::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #f49d38;
  margin-left: 15px;
  margin-right: 18px;
  transition: 0.3s background-color;
}
.button a,
.button a:hover {
  background-color: transparent;
  background-image: none;
}
.button a:hover::before {
  width: 100%;
}
.button a:hover::after {
  background-color: #fff;
}
.project-carousel {
  position: relative;
  margin-top: 20px;
  max-height: 440px;
  min-height: 120px;
}

.desctext div{
  width: 100%;
  display: none;
}
.project-carousel img,
.project-carousel video {
  width: 100%;
  display: none;
}
.hero-view .project {
  opacity: 1;
}
.carousel-arrows {
  position: absolute;
  top: 10px;
  right: 10px;
}

.project-carousel img.active,
.project-carousel video.active {
  display: block;
}

/* Multi-image project carousels (#projects): fade + slide transition */
#projects .project-carousel.project-carousel--slides > img,
#projects .project-carousel.project-carousel--slides > video,
#projects .project-carousel.project-carousel--slides .project-carousel-viewport > img,
#projects .project-carousel.project-carousel--slides .project-carousel-viewport > video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px);
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.45s;
  pointer-events: none;
  z-index: 0;
}
#projects .project-carousel.project-carousel--slides > img.active,
#projects .project-carousel.project-carousel--slides > video.active,
#projects .project-carousel.project-carousel--slides .project-carousel-viewport > img.active,
#projects .project-carousel.project-carousel--slides .project-carousel-viewport > video.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 1;
}
/* Viewport = image stack only; keeps .desctext below and visible (not covered by absolute imgs) */
#projects .project-carousel.project-carousel--slides .project-carousel-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  width: 100%;
}
#projects > .container .project-carousel.project-carousel--slides:has(.project-carousel-viewport) {
  aspect-ratio: unset;
  max-height: none;
}
#projects > .container .project-carousel.project-carousel--slides:not(:has(.project-carousel-viewport)) {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  width: 100%;
}
.project-grid .project-carousel.project-carousel--slides {
  position: relative;
}
.project-grid .project-carousel.project-carousel--slides > img,
.project-grid .project-carousel.project-carousel--slides > video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px);
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.45s;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}
.project-grid .project-carousel.project-carousel--slides > img.active,
.project-grid .project-carousel.project-carousel--slides > video.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 1;
  clip-path: inset(0 round 8px);
}
#projects .project-carousel.project-carousel--slides .carousel-arrows {
  z-index: 2;
}
#projects .project-carousel .desctext {
  position: relative;
  z-index: 3;
  margin-top: 12px;
}

.desctext div.active {
  display: block;
}
.wrapper {
  position: relative;
  overflow: hidden;
  width:auto;
  height: 200px;
  border: 1px solid black;
}

#slide {
  position: absolute;
  left: -500px;
  opacity: 0;

  -webkit-animation: slide 0.5s forwards;
  -webkit-animation-delay: .0s;
  animation: slide 0.5s forwards;
  animation-delay: 0.0s;
}

@-webkit-keyframes slide {

  0% { opacity: 0.1; }
  70% { opacity: 0.3; }
  80% { opacity: 0.6; }
  90% { opacity: 0.8; }
  100% { left: 0; opacity: 1;}
}

@keyframes slide {
  0% { opacity: 0.1; }
  70% { opacity: 0.3; }
  80% { opacity: 0.6; }
  90% { opacity: 0.8; }
  100% { left: 0; opacity: 1;}
}

.desctitle{
  color: #20a6ff;
}
.project-carousel button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 5px;
  background-color: #ffffffbd;
  box-shadow: 0 0 10px #121621;
}
.project-carousel button:hover {
  color: #f49d38;
}

.desc-body {
  position: relative;
  max-height: 90px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.desc-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, #121621);
  pointer-events: none;
  transition: opacity 0.3s;
}
.desc-body.expanded {
  max-height: 800px;
}
.desc-body.expanded::after {
  opacity: 0;
}
.desc-toggle {
  background: none;
  color: #f49d38;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 0;
  margin-top: 6px;
  margin-bottom: 2px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.desc-toggle:hover {
  color: #fff;
}

#about {
  padding: 60px 0;
}
#about p {
  width: 60%;
}
#about h2 {
  margin: 30px 0;
}

.scrollbar {
  position: fixed;
  left: 20px;
  top: 50%;
  text-align: right;
  transform: translate(0, -50%);
}
.hero-view .scrollbar {
  display: none;
}
.scrollbar .dot {
  width: 15px;
  height: 3px;
  background-color: #fff;
  margin: 30px 0;
  transition: 0.3s width;
}
.scrollbar .dot:hover {
  width: 30px;
}
.scrollbar .dot.active {
  width: 30px;
}
.scrollbar .dot a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-view {
  scroll-behavior: smooth;
}
.hero-view .project-bkg {
  opacity: 0;
}
.hero-view #mybtn {
  display: none;
}

@keyframes slideintro {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes opacity {
  0% {
    opacity: 0;
  }
  70% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#home,
header,
.scrollbar,
#projects,
section .container,
.slideshow-container {
  animation: opacity 1.6s;
}
.bkg div {
  animation: slideintro 0.8s 0.2s;
}
.bkg {
  animation: opacity 0.4s;
}
.project {
  opacity: 0;
  transition: 0.3s opacity;
}
.project.visible {
  opacity: 1;
  overflow: scroll;
}
#projects,
#projects .container {
  height: unset;
  overflow: visible;
}
section:has(.project-grid) {
  overflow: visible;
}
.fixed .project-bkg {
  position: fixed;
}

section.no-hero {
  height: unset;
  padding: 40px 0;
}
.no-hero h1 {
  margin-top: 60px;
}
.slideshow-container {
  width: 95%;
  max-width: 1000px;
  position: relative;
  margin: auto;
  padding-top: 60px;
}
/* Fixed viewport so image aspect ratios do not resize the page between slides */
.slideshow-container.slideshow-stage {
  margin: 60px auto 0;
  padding-top: 0;
  aspect-ratio: 16 / 9;
  max-height: min(78vh, 900px);
  width: 95%;
  max-width: 1000px;
}
.slideshow-container.slideshow-stage.slideshow-stage--spaced {
  margin-top: 100px;
}
.slideshow-container.slideshow-stage .mySlides1,
.slideshow-container.slideshow-stage .mySlides2 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.slideshow-container.slideshow-stage .mySlides1 img,
.slideshow-container.slideshow-stage .mySlides2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.slideshow-container.slideshow-stage .prev,
.slideshow-container.slideshow-stage .next {
  z-index: 3;
}
.slideshow-container.slideshow-stage .numbertext,
.slideshow-container.slideshow-stage .text {
  z-index: 2;
}
/* Slideshow: class-based visibility + motion (replaces display:none for transitions) */
.slideshow-container .mySlides1,
.slideshow-container .mySlides2 {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.45s;
  pointer-events: none;
}
.slideshow-container .mySlides1.slide-active,
.slideshow-container .mySlides2.slide-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}
.slideshow-container .mySlides1:not(.slide-active),
.slideshow-container .mySlides2:not(.slide-active) {
  z-index: 1;
}
.slideshow-container .mySlides1.fade,
.slideshow-container .mySlides2.fade {
  animation: none;
}
.mySlides,
.mySlides1,
.mySlides2 {
  display: none;
}
.fade {
  animation-name: fade;
  animation-duration: 1s;
}
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}
.prev,
.next {
  background-color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: #f09b75;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
video {
  max-width: 100%;
  height: auto;
  padding-top: 0px;
  aspect-ratio: 16 / 9;
  overflow: visible;
}

@media screen and (max-width: 1200px) {
  .scrollbar {
    display: none;
  }
  .project-bkg {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }
  #projects h2 {
    margin-top: 0;
  }
}

@media screen and (max-width: 830px) {
  .project {
    min-height: 400px;
  }
  .l-col,
  .r-col {
    width: 100%;
    margin: 20px 0;
  }
  #about p {
    width: 100%;
  }
}

@media screen and (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 4rem clamp(12px, 4vw, 24px) 1.25rem;
  }
  .hero-view {
    scroll-behavior: unset;
  }
  html.scroll-snap {
    scroll-snap-type: none;
  }
  .scroll-snap section {
    scroll-snap-align: unset;
  }
  h1 {
    font-size: 3em;
  }
  h2 {
    font-size: 2.2em;
  }
  header {
    background-color: #0c0f16;
  }
  .hero-view header {
    background-color: transparent;
  }
  .hero-view .email {
    max-height: 0;
  }
  .email {
    max-height: unset;
    margin-top: 10px;
  }
  .bkg {
    width: 55%;
    overflow: hidden;
    display: flex;
  }
  .bkg div {
    margin-left: 0;
  }
  .bkg div:nth-child(1) {
    width: 60%;
  }
  .bkg div:nth-child(2) {
    width: 30%;
  }
  .bkg div:nth-child(3) {
    width: 10%;
  }
  .project-carousel {
    max-height: 100%;
    overflow: hidden;
  }

  .project,
  #about {
    padding: 95px 0;
  }
}

@media screen and (min-height: 500px) and (max-height: 1500px) {
  .project {
    height: unset;
    min-height: 50vh;
  }
}
