:root {
  --text-col: 55%;
}

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

html {
  overflow-x: hidden;
}

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

body {
  display: grid;
  grid-template-columns: var(--text-col) 1fr;
}

#header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 15px 0;
}
    
.navbar {
  width: var(--text-col);
  display: flex-start;
  justify-content: center;
  margin-left: 1.5%;
}

.navbar ul {
  list-style: none;
  display: inline-flex;
  gap: 4px;
  border-radius: 15px;
  background-color: white;
  padding: 6px;
  margin: 0;
  margin-left: 10%;
  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;
  margin-right: 5em;
}

.badge-placeholder {
  width: 88px;
  height: 31px;
  border: 1px dashed rgb(185, 185, 185);
  border-radius: 4px;
}

.pagering-footer {
  display: flex;
  justify-content: center;
  padding: 0.5em 0;
  margin-top: auto;
}

.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;
}

.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 rgba(255, 200, 0, 0.32); }
.box-2 { border: 4px solid rgba(185, 233, 255, 0.539); }
.box-3 { border: 4px solid rgba(232, 203, 251, 0.476); }
.box-4 { border: 4px solid rgba(196, 255, 214, 0.598); }
.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/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/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;
}
.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);
  }
}

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

  .btns {
    display: none;
  }

  #header {
    justify-content: center;
    padding: 10px 0;
  }

  .navbar {
    width: auto;
  }

  .navbar ul {
    margin-left: 0;
  }

  p.about {
    max-width: 80%;
    padding-right: 0;
    margin: 0.8em auto 0.4em;
    font-size: 2rem;
  }

  .grid-container {
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    justify-self: unset;
    margin: 30px auto;
    margin-top: 30px;
    max-width: 90vw;
    grid-template-columns: repeat(3, minmax(0, 160px));
    grid-template-rows: repeat(2, minmax(0, 160px));
    grid-template-areas:
      "box-1 box-1 box-2"
      "box-3 box-4 box-2";
    justify-content: center;
  }

  .wip,
  .photos-wip {
    grid-column: unset;
    width: 100%;
    margin-top: 8%;
  }

  .articles {
    width: 90%;
  }

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

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

@media screen and (max-width: 600px) {
  #header {
    padding: 6px 5px;
  }

  .navbar {
    width: 110%;
    max-width: 360px;
  }

  .navbar ul {
    justify-content: center;
    width: 100%;
    padding: 4px;
    gap: 0;
    border-width: 1px;
  }

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

  p.about {
    font-size: 1.5rem;
    max-width: 90%;
    margin: 0.7em auto 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 2rem auto 0;
    padding: 0 16px;
    gap: 16px;
  }

  .box {
    width: 80vw;
    height: 80vw;
    max-width: 300px;
    max-height: 300px;
  }

  .gallery-large img {
    padding: 10px;
  }
}

.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 {
  color: rgb(95, 95, 95);
  padding-top: 0.5em;
  grid-column: 1 / -1;
  text-align: center;
}
.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.3em;
}
.newsletter-title {
  color: rgb(95, 95, 95);
  text-align: center;
  margin-top: 0;
  font-size: 1.1em;
  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: 500px;
  margin: 0em auto 0;
  padding: 1em;
}
.newsletter-form form {
  display: flex;
  flex-direction: column;
  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: 1em;
  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;
}
.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;
}

.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(200, 118, 255); 
  text-decoration-style: dashed;
  color: rgb(95, 95, 95);
}
.photos-link:hover { 
  text-decoration-color: rgb(214, 152, 255); 
  text-decoration-style: solid;
  color: rgb(214, 152, 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;
}