html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: 100px;
  margin-right: 100px;
  background: #f3f3f3;
}

html,
body {
  height: 100%;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}


@media (max-width: 600px) {
  body {
    margin-left: 30px;
    margin-right: 30px;
  }
}

.title {
  color: #A74d4a;
  font-family: 'Instrument Serif', serif;
  letter-spacing: -.03em;
  font-size: clamp(50px, 12vw, 110px);
  font-weight: 400;
  margin-bottom: 40px;
  line-height: 1;
}

img {
  pointer-events: none;
  -webkit-touch-callout: none;
  /* Disables long-press menu on iOS */
}

/* Footer styles -- START */
.site-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 20px 0 40px 0;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

.site-footer.fade-in.visible {
  opacity: 0.8 !important;
  transform: translateY(0);
}

/* Footer styles -- END */

/* CLEAN fade-in system */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

a:link {
  color: #333;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: #333;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #333;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: #333;
  background-color: transparent;
  text-decoration: underline;
}


/* Header styles -- START */
.site-header {
  position: sticky;
  top: 0;
  background: #f3f3f3;
  padding: 16px 24px;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 50px;
}

.logo a {
  text-decoration: none;
  color: #A74d4a;
  font-family: 'Instrument Serif';
  letter-spacing: -.03em;
  font-size: x-large;
}

.nav {
  align-items: center;
  margin-left: auto;
  margin-right: 10px;
}

.nav a {
  margin: 10px;
  text-decoration: none;
  color: #A74d4a;
  font-family: 'Cousine', monospace;
  padding: 0 1px;
  font-size: 14.9632px
}

.nav a:hover {
  opacity: 0.6;
}

.socials a {
  margin-left: -10px;
  text-decoration: none;
  color: #A74d4a;
  font-family: 'Instrument Serif Regular';
}

.hidden {
  display: none;
}

.fa {
  padding: 1px;
  width: 30px;
  text-align: center;
  text-decoration: none;
  margin: 5px 2px;
  color: #A74d4a;
}

.fa:hover {
  opacity: 0.7;
}

/* hide burger by default */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  width: 25px;
  height: 2px;
  background: #A74d4a;
  display: block;
}


.burger span {
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background: #efefef;
  display: flex;
  flex-direction: column;
  padding: 80px 30px;
  gap: 20px;
  transition: right 0.3s ease;
  z-index: 1050;
  border: none;
}


.mobile-nav.active {
  right: 0;
}

.mobile-nav a {
  font-size: 18px;
  text-decoration: none;
  color: #A74d4a;
}


.no-scroll {
  overflow: hidden;
}

@media (max-width: 600px) {
  .burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    z-index: 1100;
  }

  .burger span {
    width: 25px;
    height: 2px;
    background: #A74d4a;
    transition: 0.3s;
  }

  .nav {
    display: none;
    flex-direction: column;
    padding-left: 0px;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
  }

  .nav.active {
    display: flex;
  }

  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f3f3f3;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    transition: opacity 1.5s ease-in-out 0.5s;
    z-index: 1050;
    padding-left: 0px;
    padding-top: 0px;
  }

  .mobile-nav a:hover {
    opacity: 0.6;
  }


  .mobile-nav.active {
    transform: translateY(0);
  }

  .mobile-nav a {
    font-size: 22px;
    text-decoration: none;
    color: #A74d4a;
  }

  .menu-content {
    background: #f3f3f3;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .site-header {
    padding: 0px 24px;
  }

}

/* Header styles -- END */

/* About page style -- START */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 0 auto;
  padding: 40px;
  max-width: 1200px;
}

.column {
  flex: 1;
}

.about-images-grid-container {
  display: grid;
  gap: 30px;
  max-width: 900px;
  margin-top: 40px;
  grid-auto-rows: 80px;
  grid-template-columns: repeat(8, 1fr);
}

.about-images-grid-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* layout control */
.about-images-grid-container img:nth-child(1) {
  transform: translate(12px, -20px);
  grid-column: span 4;
  grid-row: span 4;
}

.about-images-grid-container img:nth-child(2) {
  transform: translate(0px, 4px);
  grid-column: span 4;
  grid-row: span 2;
}

.about-images-grid-container img:nth-child(3) {
  transform: translate(110px, -70px);
  grid-column: span 7;
  grid-row: span 3;
}

/* TABLETS (iPad, small laptops) */
@media (max-width: 1024px) {
  .about-images-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .about-images-grid-container {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  .about-images-grid-container img {
    grid-column: auto !important;
    grid-row: auto !important;
    height: auto;
    transform: none;
  }

  .about-images-grid-container img:nth-child(1) {
    transform: none;
  }

  .about-images-grid-container img:nth-child(2) {
    transform: none;
  }

  .about-images-grid-container img:nth-child(3) {
    transform: none;
  }
}

/* About page style -- END */


/* Atelier page style -- START */
.gallery {
  display: flex;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 80px;
  gap: 16px;
  padding: 40px;
  justify-content: center;
  max-width: 1000px;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 80px 40px;
  margin: 0 auto;
  padding: 100px 0;
}

.item {
  overflow: hidden;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
  flex-basis: 400px;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.item.portrait {
  flex-basis: 420px;
}

.item.landscape {
  flex-basis: 480px;
}

.item.portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.item.landscape img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 1024px) {

  .item.portrait {
    flex-basis: 400px;
  }

  .item.landscape {
    flex-basis: 550px;
    max-width: 600px;
  }
}

.item.landscape img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.item {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.item.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .item.landscape {
    transition-duration: 1.8s;
  }
}


.item.visible {
  opacity: 1;
  transform: translateY(0);
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
  opacity: 0;
}

.item img.loaded {
  opacity: 1;
}

.item:hover img {
  transform: scale(1.05);
}

.span-1x2 {
  grid-column: span 1;
  grid-row: span 2;
}

.span-2x3 {
  grid-column: span 2;
  grid-row: span 3;
}

.span-2x4 {
  grid-column: span 2;
  grid-row: span 4;
}

.span-3x3 {
  grid-column: span 3;
  grid-row: span 3;
}

.span-3x4 {
  grid-column: span 3;
  grid-row: span 4;
}

.span-4x5 {
  grid-column: span 4;
  grid-row: span 5;
}

/* Atelier Page style -- END */


/* Musings Page Style -- START */
/* BLOG GRID */
.blog-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
  flex-grow: 1;
}

/* CARD */
.card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  margin-bottom: 15px;
}

.date {
  font-size: 12px;
  margin-bottom: 10px;
}

.card h2 {
  font-family: 'Instrument Serif', serif;
  font-size: xx-large;
  margin: 20px 0 10px;
  letter-spacing: -.03em;
  font-weight: 400;
}

.excerpt {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.read-more {
  font-size: 13px;
  color: #A74d4a;
  text-decoration: underline;
}

.pagination {
  margin-top: 40px;
  /* Space after the blog posts */
  margin-bottom: 10px;
  /* Small gap before the footer */
  display: flex;
  justify-content: center;
  gap: 20px;
}

.pagination a {
  color: #A74d4a;
  text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .blog-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .card img {
    height: 220px;
  }
}

/* Musings Page Style -- END */

/* Musings Post Page Style -- START */
pre {
  background: #FAFAFA;
  color: #1e1e1e;
  padding: 15px;
  overflow-x: auto;
}

code {
  font-family: monospace;
}

.blog-body {
  line-height: 1.7;
  padding: 40px;
}

.blog-body h1 {
  font-size: xxx-large;
  font-family: 'Instrument Serif', serif;
  margin: 20px 0 10px;
  letter-spacing: -.03em;
  font-weight: 400;
}

.blog-body h2,
.blog-body h3 {
  font-family: 'Cousine', monospace;
  margin: 20px 0 10px;
  letter-spacing: -.03em;
  font-weight: 400;
}

.blog-body p {
  margin-bottom: 16px;
  font-family: 'Cousine', monospace
}

.blog-body li {
  margin-bottom: 10px;
  font-family: 'Cousine', monospace
}

.blog-body pre {
  padding: 16px;
  overflow-x: auto;
  border-left: 2px solid gray;
}

.blog-body code {
  background: #FAFAFA;
  padding: 2px 4px;
}

.blog-body table {
  font-family: 'Cousine', monospace;
}

.blog-body td,
th {
  border: 1px solid #C3C2C2;
  padding: 10px 10px;
}

.blog-body pre,
.blog-body code {
  text-align: left !important;
  white-space: pre !important;
}

.blog-body pre code span:first-child {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.blog-body thead {
  background: #ECECEC;
}

.blog-body thead th {
  font-weight: normal;
}

.blog-body img {
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .blog-body img {
    height: auto;
    width: auto;
    max-height: 600px;
  }
}

/* Musings Post Page Style -- END */