@font-face {
  font-family: "Gaybins-font";
  src: url("../fonts/GaybinsFont-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --text-col: 55%;
  --page-gutter: 3rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 112.5%;
  overflow-x: hidden;
  position: relative;
  min-height: 100%;
}

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

body {
  font-family: "Gaybins-font", serif;
  display: grid;
  grid-template-columns: var(--text-col) 1fr;
  padding-bottom: 4.5em;
}

#header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 15px 0;
  gap: 12px
}
    
.navbar {
  width: auto;
  display: flex-start;
  justify-content: center;
  margin-left: var(--page-gutter);
}

.navbar ul {
  list-style: none;
  display: inline-flex;
  gap: 4px;
  border-radius: 15px;
  background-color: white;
  padding: 6px;
  margin: 0;
  margin-left: 0;
  border: 1px solid rgb(219, 217, 217);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar li {
  float: left;
}

.navbar a {
  font-size: 1.4em;
  color: rgb(95, 95, 95);
  text-decoration: none;
  padding: 0 14px;
  display: block;
  text-align: center;
  transition: background-color 0.3s;
  border-radius: 10px;
}

.navbar a:hover,
.navbar a.active {
  background-color: rgb(240, 240, 240);
}

.navbar a.active {
  color: black;
}
.btns {
  display: flex;
  gap: 1em;
  margin-right: 3em;
}
.instagram-link {
  text-decoration-style: solid;
  text-decoration-color: rgb(95, 95, 95);
  color: rgb(95, 95, 95);
  font-size: 1.3em;
}
.github-link {
  text-decoration-style: none;
  text-decoration-color: rgb(95, 95, 95);
  color: rgb(95, 95, 95);
  font-size: 1.3em;
}
.instagram-link:hover {
  text-decoration-style: wavy;
  text-decoration-color: rgb(0, 136, 255);
  color: rgb(95, 95, 95);
}
.github-link:hover {
  text-decoration-style: wavy;
  text-decoration-color: rgb(0, 136, 255);
  color: rgb(95, 95, 95);
}
.badge-placeholder {
  width: 88px;
  height: 31px;
  border: 1px dashed rgb(185, 185, 185);
  border-radius: 4px;
}

.pagering-footer {
  position: absolute;
  bottom: 1.5em;
  left: 0;
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 0.5em 0;
}

.btn,
.btn-active {
  position: relative;
  z-index: 0;
  margin: 3px;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgb(185, 185, 185);
}

.btn {
  background: white;
  color: rgb(95, 95, 95);
}

.btn-active {
  background: white;
  color: black;
}

.btn::before,
.btn-active::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 14px;
  background: transparent;
  transition: background-color 0.3s;
  z-index: -1;
}

.btn:hover::before,
.btn-active::before {
  background: rgb(240, 240, 240);
}

p.about {
  color: rgb(95, 95, 95);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.6;
  margin: 0.8em 0 0 3em;
  padding-right: 1.5em;
  margin-left: var(--page-gutter);
}

.wip {
  color: rgb(95, 95, 95);
  grid-column: 1 / -1;
  font-size: clamp(2rem, 8vw, 5rem);
  line-height: 1.5;
  margin: 10% 10% 0;
  text-align: center;
}

.box-1 { grid-area: box-1; }
.box-2 { grid-area: box-2; }
.box-3 { grid-area: box-3; }
.box-4 { grid-area: box-4; }

.box {
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}
.box-1 { border: 4px solid rgb(255, 243, 198); }
.box-2 { border: 4px solid rgb(220, 244, 255); }
.box-3 { border: 4px solid rgb(252, 228, 236); }
.box-4 { border: 4px solid rgb(232, 255, 239); }
.box-image {
  position: absolute;
  inset: 0;
  transition: background-position 1.1s ease, background-size 1.1s ease;
}
.box-4 .box-image {
  background-image: url(../images/analog/perdican\ remove.png);
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.box-4 .box-label {
  opacity: 0;
}
.box-4:hover .box-image,
.box-4.is-active .box-image {
  background-size: 160%;
  background-position: center -25%;
}
.box-4:hover .box-label,
.box-4.is-active .box-label {
  opacity: 1;
}
.box-3 .box-image {
  background-image: url(../images/analog/picasso-removed.png);
  background-size: 140%;
  background-position: center 40%;
  background-repeat: no-repeat;
}
.box-3:hover .box-image,
.box-3.is-active .box-image {
  background-position: center 20%;
}
.box-3 .box-label {
  opacity: 0;
}
.box-3:hover .box-label,
.box-3.is-active .box-label {
  opacity: 1;
}
.box-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-3em);
  transition: opacity 0.9s ease;
  font-weight: bold;
}

a.box,
a.box:visited,
a.box:hover,
a.box:active {
  text-decoration: none;
  color: inherit;
}

.grid-container {
  grid-column: 2;
  grid-row: 2 / 5;
  align-self: start;
  margin: 4em 0em 0 2em;
  display: grid;
  grid-template-columns: repeat(3, 160px);
  grid-template-rows: repeat(2, 160px);
  grid-template-areas:
    "box-1 box-1 box-2"
    "box-3 box-4 box-2";
  gap: 1em;
}

@media screen and (min-width: 1440px) {
  :root { --text-col: 50%; }

  p.about {
    font-size: clamp(2rem, 2.2vw, 2.5rem);
    
  }

  .grid-container {
    grid-template-columns: repeat(3, 210px);
    grid-template-rows: repeat(2, 210px);
  }
}

@media screen and (min-width: 1800px) {
  :root { --text-col: 48%; }

  p.about {
    font-size: clamp(2.2rem, 2.2vw, 2.8rem);
  }

  .grid-container {
    grid-template-columns: repeat(3, 250px);
    grid-template-rows: repeat(2, 250px);
  }
}





.gallery-large {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, 300px);
  justify-content: center;
  gap: 2em;
}
.gallery-large img{
  width: 300px;
  height: auto;
  object-fit: cover;
}
.gallery-long {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, 400px);
  justify-content: center;
  gap: 2em;
}
.gallery-long img{
  width: 400px;
  height: auto;
  object-fit: cover;
}
.gap-photos {
  grid-column: 1 / -1;
  height: 2em;
}
.photo {
  position: relative;
  transition: transform 0.6s ;
}
.photo img {
  border-radius: 10px;
}
/*.photo:hover { 
  transform: rotate(3deg);
}
.photo:nth-of-type(2n):hover {
  transform: rotate(-6deg);
}*/
.photo-title,
.big-project-title {
  color: rgb(95, 95, 95);
  padding-top: 0.5em;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 2.2em;
}
.photo-description {
  color: rgb(95, 95, 95);
  grid-column: 1 / -1;
  text-align: center;
  max-width: 80%;
  margin: 0 auto 2em;
  padding-bottom: 0.8em;
  font-size: 1.6em;
}
.newsletter-title {
  color: rgb(95, 95, 95);
  text-align: center;
  margin-top: 0;
  font-size: 1.5em;
  margin-bottom: 0.8em;
}
.newsletter-description {
  color: rgb(95, 95, 95);
  font-size: 1em;
  margin-bottom: 0.2em
}
.contact-title {
  color: rgb(95, 95, 95);
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 2em;
  margin-bottom: 0;
  font-size: 2em;
}
.contact-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
  margin-top: 2.5em;
  padding: 0 1em;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding: 1.4em 2.2em;
  border-radius: 15px;
  background-color: white;
  text-decoration: none;
  transition: transform 0.6s;
}
.contact-card:hover {
  transform: rotate(3deg) scale(1.05);
}
.contact-card:nth-of-type(2n):hover {
  transform: rotate(-3deg) scale(1.05);
}
.contact-name {
  font-weight: bold;
  font-size: 1.3em;
  color: black;
}
.contact-handle {
  color: rgb(95, 95, 95);
  font-size: 1.05em;
}
.contact-mail { border: 4px solid rgba(255, 200, 0, 0.32); }
.contact-github { border: 4px solid rgba(251, 203, 246, 0.476); }
.contact-slack { border: 4px solid rgba(196, 255, 251, 0.652); }
.newsletter-form {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  text-align: center;
  border-radius: 10px;
  max-width: 600px;
  margin: 0em auto 0;
  padding: 1em;
  margin-top: 8%;
}
.newsletter-form form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.8em;
}
.newsletter-inputs {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8em;
}
.newsletter-form input[type="submit"] {
  font-size: 1em;
  padding: 0.4em 1.3em;
  border-radius: 25px;
  border: 2px solid;
  border-color: rgb(164, 226, 255);
  background-color: rgb(164, 226, 255);
}
.newsletter-form input[type="submit"]:hover {
  background-color: rgb(107, 200, 244);
  border-color: rgb(107, 200, 244);
  transition: background-color 0.3s;
  transition: border-color 0.3s;
}
.newsletter-form input[type="email"] {
  border: 0.5px solid rgb(162, 161, 161);
  border-radius: 5px;
  font-size: 1.2em;
  padding: 0.2em 0.4em;
}
.newsletter-form label {
  font-size: 1em;
}
.article-title {
  text-align: left;
  margin-left: 14%;
  margin-top : 2em;
  font-size: 2em;
  color: rgb(95, 95, 95)
}
.article-wip {
  text-align: left;
  margin-left: 14%;
  margin-top: 1em;
  font-size: 1.35em;
  color: rgb(95, 95, 95)
  
}
.newsletter-grid {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin-left: 13%;
  margin-right: 0;
  margin-top: 2em;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
}
.newsletter1 {
  text-align: left;
  border: 3px solid rgba(255, 0, 230, 0.304);
  border-radius: 15px;
  padding: 0.2em 1.2em 0.2em;
  text-decoration: none;
}
.news1-title {
  font-size: 1.2em;
  font-weight: bold;
  color: black;
  text-align: center;
}
.news1-description {
  color: rgb(59, 59, 59)
}
.newsletter1:hover {
  border: 7px solid rgba(255, 0, 230, 0.304);
}
footer {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1.5em;
  margin-top: 1.5em;
  flex-grow: 0;
  flex-shrink: 0;
}

.projects-link { 
  text-decoration-color: rgb(129, 215, 255); 
  text-decoration-style: wavy;
  color: rgb(95, 95, 95);
}
.hc-link { 
  text-decoration-color: rgb(255, 180, 120); 
  text-decoration-style: double;
  color: rgb(95, 95, 95);
}
.photos-link { 
  text-decoration-color: rgb(250, 164, 255); 
  text-decoration-style: dashed;
  color: rgb(95, 95, 95);
}
.photos-link:hover { 
  text-decoration-color: rgb(250, 175, 255); 
  text-decoration-style: solid;
  color: rgb(250, 175, 255); 
}
.hc-link:hover { 
  text-decoration-color: rgb(255, 180, 120); 
  text-decoration-style: solid;
  color: rgb(255, 180, 120); 
}
.projects-link:hover { 
  text-decoration-color: rgb(164, 226, 255); 
  text-decoration-style: solid;
  color: rgb(129, 215, 255); 
}
.blog-page {
  min-height: calc(100vh - 16px);
  grid-template-rows: auto auto 1fr auto;
}

.blue-flower,
.pink-flower,
.yellow-flower,
.multicolor-flower,
.multicolor-flower2,
.blue-flower2,
.pink-flower2,
.yellow-flower2,
.multicolor-flower4,
.multicolor-flower3 {
  position: absolute;
  width: clamp(40px, 9vw, 100px);
  height: auto;
}

.home-page .pink-flower { top: 620px; right: 450px;}
.home-page .blue-flower { top: 30px; right: 200px;}
.home-page .yellow-flower { top: 60px; left: 10px;}
.home-page .multicolor-flower { top: 125px; left: 650px;}
.home-page .multicolor-flower2 { top: 700px; left: 200px;}

.photo-page .yellow-flower {top: 3%;  left: 5%;}
.photo-page .blue-flower {top: 6%;  right: 8%;}
.photo-page .multicolor-flower {top: 18%; left: 40%;}
.photo-page .pink-flower {top: 28%; right: 12%;}
.photo-page .multicolor-flower2 {top: 38%; left: 8%;}
.photo-page .blue-flower2 {top: 48%; right: 30%;}
.photo-page .yellow-flower2 {top: 58%; left: 55%;}
.photo-page .pink-flower2 {top: 70%; left: 15%; }
.photo-page .multicolor-flower3 {top: 80%; right: 6%;}
.photo-page .multicolor-flower4 {top: 90%; left: 35%;}


.projects-page .pink-flower { top: 620px; right: 450px;}
.projects-page .blue-flower { top: 30px; right: 200px;}
.projects-page .yellow-flower { top: 60px; left: 10px;}
.projects-page .multicolor-flower { top: 125px; left: 650px;}
.projects-page .multicolor-flower2 { top: 700px; left: 200px;}



.flower {
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 100;
  will-change: transform;
}

.flower.dragging {
  cursor: grabbing;
  z-index: 1000;
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.projects-viewer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0px;
  margin-top: -2em;
  min-height: 70vh;
  position: relative; 
  z-index: 1;
} 

.project-card {
  margin-top: -40px;
  width: min(900px, 85vw);
  min-height: 450px;
  display: flex;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.431);
  overflow: hidden;
}


.project-card img {
  width: 50%;
  height: auto;
  object-fit: cover;
  background: #f6F6f6;
}

.project-info {
  flex: 1;
  padding: 35px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#project-title {
  margin: 0;
  font-size: 2.2em;
  color: rgb(95, 95, 95);
}

#project-description {
  margin-top: 5%;
  line-height: 1.6;
  color: #444;
  font-size: 1.2em;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

#page-link {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgb(95, 95, 95);
  color: rgb(95, 95, 95);
  text-underline-offset: 2px;
}

#page-link:hover {
  text-decoration: underline wavy;
  text-decoration-color: rgb(137, 216, 252);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

#demo-link,
#repo-link {
  display: inline-block;
  text-decoration: none;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 12px;
  color: #222;
  font-weight: bold;
  transition: transform 0.5s ease;
  margin-top: -15%;
}


#demo-link {
  background-color: rgb(255, 249, 194);
}

#repo-link {
  background: rgb(203, 239, 255);
}

#demo-link:hover {
  transform: translateY(-3px);
  background: rgb(245, 239, 186)
}
#repo-link:hover {
  transform: translateY(-3px);
  background: rgb(193, 228, 242)
}


.projects-links {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  width: 65px;
  height: 55px;
  flex-shrink: 0;
  border-radius: 20%;
  border: 5px solid rgb(255, 255, 255);
  background: white;
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  font-size: 3em;
  cursor: pointer;
  transition: transform 0.5s ease, background 0.5s ease;
}

.nav-btn:hover {
  transform: translateY(-5px);
}

.dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: -60px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(193, 193, 193);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dot:hover {
  transform: scale(1.2);
}

.dot.active {
  background: #626262;
}

.scroll {
  grid-column: 1 / -1;
  font-size: 1em;
  text-align: center;
  margin-bottom: 0;
  margin-top: 0;

}

.scroll-btn {
  grid-column: 1 / -1;
  justify-self: center;
  color: #727272;
  width: 45px;
  height: 35px;
  flex-shrink: 0;
  border-radius: 20%;
  border: none;
  background: white;
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  font-size: 2em;
  cursor: pointer;
  transition: transform 0.5s ease, background 0.5s ease;
  margin-bottom: 30px;
  animation: bounce 1.5s ease-in-out infinite;
}

.commit-info {
  color: rgb(95, 95, 95);
  font-size: 1.2em;
  line-height: 1.6;
}

.commit-info a {
  text-decoration: underline wavy;
  color: rgb(0, 0, 0);
}

.commit-info a:hover {
  text-decoration: underline;
  color: #77b3cc
}

.toggle-no-flower {
  display: flex;
  align-items: center;
  align-self: flex-start;
  margin-right: auto;
  margin-top: 5px;
}

.toggle-flower {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.toggle-flower img {
  width: 48px;
  height: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toggle-flower:hover img {

  transform: scale(1.1);
}

body.images-hidden .toggle-flower img {
  opacity: 0.5s;
}

.flower {
  transition: opacity 0.8s ease;
}

body.images-hidden .flower {
  opacity: 0;
  pointer-events: none;
}

#hackatime {
  margin: 0;
  font-size: 1.2em;
  color: #666;
}

#project-grid {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5em;
  width: min(1000px, 90%);
  margin: 2em auto;
}

.small-card {
  display: flex;
  flex-direction: column;
  background: rgb(255, 255, 255);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.431);
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s ease;
}

.small-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  padding: 12px;
  background-color: #f2f2f2;
}

.small-links {
  display: flex;
  flex-wrap: flex;
  gap: 8px;
  margin: auto 0.8em 0.8em;
}

.small-demo,
.small-repo {
  padding: 6px 12px;
  border-radius: 10px;
  color: #222;
  font-weight: bold;
  font-size: 0.85em;
  text-decoration: none;
  transition: transform 0.4s ease;
}

.small-demo { background: rgb(255, 249, 194); }
.small-repo { background: rgb(203, 239, 255); }

.small-demo:hover,
.small-repo:hover {
  transform: translateY(-3px);
}

.small-hackatime {
  margin: 0;
  font-size: 0.9em;
  color: #666;
}

.small-card .small-hackatime { margin: 0 0.8em 0.6em; }

.small-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; }
.small-card h3, .small-card p { margin: 0.6em 0.8em; }



@keyframes bounce {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 6px; }
}


@media screen and (max-width: 1024px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
  }

  .home-page .blue-flower,
  .projects-page .blue-flower { top: 3%; left: auto; right: 8%; }
  .home-page .pink-flower,
  .projects-page .pink-flower { top: 55%; left: auto; right: 12%; }
  .home-page .yellow-flower,
  .projects-page .yellow-flower { top: 8%; left: 4%; right: auto; }
  .home-page .multicolor-flower,
  .projects-page .multicolor-flower { top: 20%; left: 40%; right: auto; }
  .home-page .multicolor-flower2,
  .projects-page .multicolor-flower2 { top: 70%; left: 10%; right: auto; }

  .pagering-footer {
    position: static;
    margin: 1.5em 0 1em;
    order: 10;
  }

  #header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    padding: 12px 10px 8px;
  }

  .navbar {
    width: auto;
    max-width: 100%;
    margin: 0;
  }

  .navbar ul {
    margin: 0;
    justify-content: center;
  }

  .toggle-no-flower {
    margin: 0;
  }

  .btns {
    display: none;
  }

  p.about {
    max-width: 640px;
    margin: 0.8em auto 0;
    padding: 0 20px;
    font-size: 1.5rem;
  }

  .grid-container {
    grid-column: auto;
    grid-row: auto;
    margin: 2em auto 0;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 160px));
    grid-template-rows: repeat(2, minmax(0, 160px));
    justify-content: center;
  }

  .wip,
  .photos-wip {
    margin: 2em 1em 0;
  }

  .box-4 .box-image {
    background-size: 160%;
    background-position: center -25%;
  }

  .box-3 .box-image {
    background-position: center 20%;
  }

  .box-3 .box-label,
  .box-4 .box-label {
    opacity: 1;
  }

  .articles { width: 90%; margin: 0 auto; }

  .article-title,
  .article-wip {
    margin-left: 0;
    text-align: center;
  }

  .newsletter-grid,
  .newsletter-form {
    width: min(90%, 500px);
    margin: 1.5em auto 0;
  }

  .newsletter1,
  .news1-description { text-align: center; }

  .newsletter-form form {
    justify-content: center;
    flex-wrap: wrap;
  }

  .projects-page {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 0 20px;
  }

  .projects-page > * { flex: 0 0 100%; }

  .projects-viewer { display: contents; }

  .projects-page .project-card {
    order: 1;
    flex: 0 0 auto;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 640px;
    min-height: 0;
    margin: 0 auto;
  }

  .projects-page .project-card img {
    width: 100%;
    height: 360px;
  }

  .project-info { padding: 20px; flex: 1; }

  .projects-page .dots {
    order: 2;
    margin: 16px 0 12px;
    flex-wrap: wrap;
  }

  .projects-page .nav-btn {
    order: 3;
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .projects-page .scroll,
  .projects-page .scroll-btn { display: none; }

  .projects-page .nav-btn { margin-bottom: 0; }

  .nav-btn { color: #222; }
  .nav-btn:hover { transform: none; }

  .gallery-large {
    grid-template-columns: repeat(auto-fit, minmax(0, 300px));
    padding: 0 16px;
  }

  .gallery-long {
    grid-template-columns: repeat(auto-fit, minmax(0, 400px));
  }

  .gallery-large img,
  .gallery-long img {
    width: 100%;
  }

  .photo-description { max-width: 90%; font-size: 1.1em; }

  .contact-links { padding: 0 16px; }
}

@media screen and (max-width: 600px) {
  html { font-size: 106%; }

  #header { padding: 8px 8px 4px; }

  .navbar ul {
    padding: 4px;
    gap: 0;
  }

  .navbar a {
    font-size: 0.85rem;
    padding: 4px 8px;
    font-weight: 500;
  }

  .toggle-flower img { width: 36px; }

  p.about {
    font-size: 1.15rem;
    line-height: 1.55;
    padding: 0 16px;
    overflow-wrap: break-word;
  }

  .grid-container {
    width: min(100% - 32px, 340px);
    margin: 1.5em auto 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    grid-template-areas:
      "box-1 box-2"
      "box-3 box-4";
    gap: 12px;
  }

  .box { aspect-ratio: 1; }

  .big-project-title,
  .photo-title { font-size: 1.5em; }

  .projects-page .project-card { min-height: 0; }

  .projects-page .project-card img { height: 320px; }

  .project-info { padding: 16px; gap: 10px; }

  .project-header {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  #project-title { font-size: 1.4em; }

  #project-description {
    margin-top: 0;
    font-size: 0.95em;
    line-height: 1.45;
  }

  #demo-link,
  #repo-link {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.9em;
  }

  .projects-links { margin-top: 4px; }

  .nav-btn {
    width: 50px;
    height: 44px;
    font-size: 2em;
    line-height: 1;
    padding: 0;
  }

  .gallery-large { gap: 1em; padding: 0 12px; }
  .photo-description { font-size: 1em; }

  .contact-card { padding: 1em 1.4em; }
  .newsletter-form input[type="email"] { width: 100%; }

  .flower { width: 48px; }

  .pagering-footer {
    padding: 0.5em 12px;
    flex-wrap: wrap;
    text-align: center;
  }
}
