:root{
  --bg: #d8d0e9;
  --surface: #ffffff;
  --ink: #142750;
  --muted: hsl(209, 48%, 38%);
  --line: #d7d7d2;
  --panel: #ecebe7;
  --panel-dark: #d9d7d1;
  --accent: #ff00dd;
  --shadow: 0 18px 50px rgba(0,0,0,0.08);
  --radius: 22px;
  --container: 1180px;
}

*{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

/* hamburger button */
.menu-toggle{
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 60;
}

.menu-toggle span{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2){
  opacity: 0;
}

.menu-toggle.active span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

img{
  max-width: 100%;
  display: block;
}

a{
  color: inherit;
}

.container{
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,245,243,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
}

.logo{
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 1px;
}

.main-nav{
  display: flex;
  gap: 24px;

  a{
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--muted);
    padding: 10px;

    &::after{
      content: "";
      position: absolute;
      left: 0;
      bottom: -4px;
      width: 100%;
      height: 2px;
      background: var(--ink);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s ease;
    }

    &:hover{
      color: var(--ink);
    }

    &:hover::after{
      transform: scaleX(1);
    }

    &.active::after{
      transform: scaleX(1);
    }

    &.resume{
      border: 1px solid var(--ink);
      border-radius: 5px;
      font-weight: 600;
      color: var(--surface);
      background-color: var(--ink);

      &:hover{
        background-color: transparent;
        color: var(--ink);
      }
    }
  }
}


/* project thumbnails */

/* Charm */
.charm-thumb{
  background-image: url("../images/charm/charm-cover.png");
}

/* Bubble */
.bubble-thumb{
  background-image: url("../images/bubble/bubble-cover.png");
}

/* Ascent */
.ascent-thumb{
  background-image: url("../images/ascent/ascent-cover.png");
}

/* IntoTheTank */
.intothetank-thumb{
  background-image: url("../images/intothetank/intothetank-cover.png");
}

/* Nike */
.nike-thumb{
  background-image: url("../images/nike/nike-cover.png");
}

/* Sabi */
.sabi-thumb{
  background-image: url("../images/sabi/sabi-cover.png");
}

/* Spectacles */
.spectacles-thumb{
  background-image: url("../images/spectacles/spectacles-cover.png");
}

/* TheraBot */
.therabot-thumb{
  background-image: url("../images/therabot/therabot-cover.png");
}

/* Parlour */
.parlour-thumb{
  background-image: url("../images/parlour/parlour-cover.png");
}

/* Postcards */
.postcards-thumb{
  background-image: url("../images/postcards/postcards-cover.png");
}


.resume-page{
  padding: 56px 0 90px;
}

.resume-section{
  h1{
    margin: 0 0 12px;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
  }
}

.resume-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resume-copy{
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
}

.resume-download{
  margin-bottom: 28px;
}

.resume-viewer{
  width: min(100%, 900px);
  height: 1100px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;

  iframe{
    width: 100%;
    height: 100%;
    border: none;
  }
}

.hero{
  min-height: calc(100vh - 79px);
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.hero-inner{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero-text h1,
.bio-copy h1{
  margin: 0 0 14px;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.subtitle{
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero-copy{
  max-width: 560px;
  font-size: 1.05rem;
  margin: 0 0 30px;
}

.hero-actions{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--ink);
  font-weight: 600;

  &.primary{
    background: var(--ink);
    color: white;
  }

  &.secondary{
    background: transparent;
    color: var(--ink);
  }
}

.hero-collage{
  position: relative;
  min-height: 540px;
}

.polaroid{
  position: absolute;
  width: 180px;
  height: 230px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #dedcd7, #cac8c1);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid-a{
  left: 4%;
  top: 20%;
  background-image: url("../images/portrait-transparent.png");
  background-size: cover;
  background-position: center;
  transform: rotate(-9deg);

  &:hover{
    transform: translateY(-50px) rotate(-9deg);
  }
}

.polaroid-b{
  right: 4%;
  top: 7%;
  background-image: url("../images/self-portrait2.png");
  background-size: cover;
  background-position: center;
  transform: rotate(10deg);

  &:hover{
    transform: translateY(-50px) rotate(10deg);
  }
}

.name-card{
  position: absolute;
  left: 30%;
  top: 18%;
  width: 360px;
  padding: 26px 28px 34px;
  background: var(--surface);
  border: 4px solid var(--ink);
  transform: rotate(7deg);
  box-shadow: var(--shadow);

  h2{
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    line-height: 0.94;
    font-size: 3.4rem;
  }
}

.card-hello{
  display: block;
  text-align: right;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}

.card-sub{
  display: block;
  text-align: right;
  font-size: 0.68rem;
  margin-bottom: 12px;
}

.card-tag{
  position: absolute;
  left: 42px;
  bottom: -24px;
  background: white;
  border: 3px solid #66635e;
  padding: 8px 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.projects-preview{
  padding: 100px 0;
}

.section-heading{
  margin-bottom: 28px;

  h2{
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1;
  }
}

.form-header h2,
.contact-inner h2,
.skills-panel h2{
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}

.project-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);

  h3{
    margin: 0 0 8px;
    font-size: 1.3rem;
  }

  p{
    margin: 0 0 14px;
    color: var(--muted);
  }

  a{
    text-decoration: none;
    font-weight: 700;
  }
}

.project-thumb{
  height: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  background-color: var(--panel-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-thumb::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.35), rgba(0,0,0,0.04));
  pointer-events: none;
}

.project-thumb::after{
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(0,0,0,0.24);
  border-radius: 12px;
  pointer-events: none;
}

.thumb-1,
.thumb-2,
.thumb-3,
.thumb-4,
.thumb-5,
.thumb-6{
  position: relative;

  &::after{
    content: "";
    position: absolute;
    inset: 22px;
    border: 2px solid rgba(0,0,0,0.24);
    border-radius: 12px;
  }
}

.contact-banner{
  padding: 90px 0;
  border-top: 1px solid var(--line);
  background: #ebe9f0;
}

.contact-inner{
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.contact-links{
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.site-footer{
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.page-main{
  min-height: calc(100vh - 140px);
}

.page-hero.compact{
  padding: 44px 0 10px;
}

.bio-top{
  min-height: 250px;
  display: flex;
  align-items: center;
}

.photo-row{
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 28px;
  align-items: center;
}

.photo-card{
  width: 220px;
  height: 270px;
  background: linear-gradient(180deg, #d8d6d1, #bdb9b2);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);

  &.center{
    width: 260px;
    height: 320px;
  }

  &.card-1{
    background-image: url("../images/photo3.png");
    background-size: cover;
    background-position: center;
  }
  &.card-2{
    background-image: url("../images/photo1.png");
    background-size: cover;
    background-position: center;
  }
  &.card-3{
    background-image: url("../images/photo2.png");
    background-size: cover;
    background-position: center;
  }
}

.tilt-left{
  transform: rotate(-8deg);
}

.tilt-right{
  transform: rotate(10deg);
}

.bio-content{
  padding: 40px 0 72px;
}

.bio-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.bio-copy,
.skills-panel,
.contact-form{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bio-copy{
  padding: 34px;
  font-size: 1.05rem;
}

.skills-panel{
  padding: 30px;
}

.skills-list{
  padding-left: 20px;
  margin: 18px 0 0;

  li{
    margin-bottom: 12px;
  }
}

.contact-form-section{
  padding: 0 0 90px;
}

.form-header{
  margin-bottom: 18px;
}

.contact-form{
  padding: 28px;
}

.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

label{
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;

  &.full{
    margin-bottom: 18px;
  }
}

input,
textarea{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  background: #fafaf8;
}

textarea{
  min-height: 180px;
  resize: vertical;
}

.form-actions{
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-status{
  margin: 0;
  font-weight: 600;

  &.success{
    color: #1f6b3b;
  }

  &.error{
    color: #a22b2b;
  }
}

.hp-field{
  position: absolute;
  left: -9999px;
}

.scroll-indicator{
  position: absolute;
  bottom: 20px;
  left: 50%;
  top: 90%;
  transform: translateX(-50%);
  font-size: 2rem;
  opacity: 0.7;
  animation: bounce 1.5s infinite;
  transition: opacity 0.4s ease;
  pointer-events: none;

  &.hidden{
    opacity: 0;
  }
}

@keyframes bounce{
  0%, 100%{
    transform: translate(-50%, 0);
  }
  50%{
    transform: translate(-50%, 12px);
  }
}

.projects-page-hero{
  padding: 70px 0 24px;

  h1{
    margin: 0 0 14px;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
  }
}

.projects-page-copy{
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.projects-archive-section{
  padding: 20px 0 90px;
}

.tag-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.tag-filter{
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);

  &.active,
  &:hover{
    background: var(--ink);
    color: white;
    border-color: var(--ink);
  }
}

.archive-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.archive-card{
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  &:hover{
    transform: translateY(-6px);
  }
}

.archive-thumb{
  height: 240px;
  border-bottom: 1px solid var(--line);
  background-color: var(--panel-dark);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  &::before{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.65), rgba(0,0,0,0.04));
    pointer-events: none;
  }

  &::after{
    content: "";
    position: absolute;
    inset: 22px;
    border: 2px solid rgba(0,0,0,0.24);
    border-radius: 12px;
    pointer-events: none;
  }
}

.archive-content{
  padding: 22px;

  h2{
    margin: 0 0 10px;
    font-size: 1.7rem;
    line-height: 1.05;
  }

  p{
    color: var(--muted);
  }

  a{
    text-decoration: none;
    font-weight: 700;
  }
}

.card-tags{
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.empty-state{
  margin-top: 18px;
  color: var(--muted);
  font-weight: 600;
}

.gallery-section{
  padding: 20px 0 90px;
}

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gallery-card{
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: left;
  cursor: pointer;
}

.gallery-thumb{
  min-height: 240px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,0.65), rgba(0,0,0,0.04)), var(--panel-dark);
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-weight: 600;
}

.gallery-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(20,39,80,0.72);
  display: grid;
  place-items: center;
  padding: 28px;
  z-index: 200;
}

.gallery-lightbox[hidden]{
  display: none !important;
}

.gallery-lightbox-inner{
  width: min(1100px, 100%);
  max-height: min(88vh, 900px);
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  overflow: hidden;
  position: relative;
}

.gallery-lightbox-image-wrap{
  background: #f3f1fb;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.gallery-lightbox-image{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-lightbox-copy{
  padding: 34px;
}

.gallery-close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-open{
  overflow: hidden;
}

@media (max-width: 1050px){
  .hero-inner,
  .bio-grid{
    grid-template-columns: 1fr;
  }

  .project-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-links{
    text-align: left;
  }

  .polaroid-a{
    left: 20%;
    top: 24%;

    &:hover{
      transform: translateY(-100px) translateX(-20px) rotate(-20deg);
    }
  }

  .polaroid-b{
    right: 25%;
    top: 15%;

    &:hover{
      transform: translateY(-60px) rotate(10deg);
    }
  }

  .name-card{
    left: 30%;
    top: 28%;
    transform: translateX(-50%) rotate(7deg);
  }

  .scroll-indicator{
    top: 500px;
  }
}

@media (max-width: 900px){
  .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-lightbox-inner{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px){
  .resume-page{
    padding: 40px 0 70px;
  }

  .resume-viewer{
    height: 75vh;
  }

  .menu-toggle{
    display: flex;
  }

  .main-nav{
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 14px;
    width: min(260px, calc(100vw - 28px));
    background: rgba(245,245,243,0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 14px;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }

  .main-nav.open{
    display: flex;
  }

  .main-nav a{
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .main-nav a.resume{
    text-align: center;
  }

  .hero{
    min-height: auto;
    padding: 42px 0 56px;
  }

  .hero-collage{
    position: relative;
    min-height: 600px;
  }

  .name-card{
    width: 290px;
    top: 36%;
    left: 25%;
  }

  .project-grid,
  .form-row,
  .archive-grid,
  .gallery-grid{
    grid-template-columns: 1fr;
  }

  .photo-row{
    gap: 12px;
  }

  .photo-card{
    width: 28%;
    min-width: 92px;
    height: 180px;
  }

  .container{
    width: min(var(--container), calc(100% - 28px));
  }

  .site-header{
    padding: 14px;
    position: sticky;
  }

  .polaroid-a{
    left: 12%;
    top: 80%;
  }

  .polaroid-b{
    right: 12%;
    top: -6%;
  }
}

@media (max-width: 400px){
  .hero-text h1,
  .bio-copy h1{
    font-size: clamp(2.2rem, 8vw, 3.4rem);
  }

  .name-card{
    width: 240px;
    top: 40%;
    left: 20%;

    h2{
      font-size: 1.8rem;
    }
  }
}