@font-face {
  font-family: 'Questrial';
  src: url('/fonts/Questrial-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Instrument';
  src: url('/fonts/Instrument.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Instrument', serif;
  background-color: #f8f7f5;
  color: #1b2833;
}

/* Header */
header {
  padding: 30px 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: 'Questrial', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #1b2833;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  font-family: 'Instrument', serif;
  font-size: 17px;
  color: #1b2833;
  text-decoration: none;
}

nav a:hover {
  color: #ffab6b;
}

/* Main */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 100px;
}

/* Typography */
h1 {
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 30px;
}

h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 20px;
}

p {
  font-size: 17px;
  line-height: 1.7em;
  font-weight: 550;
  margin-bottom: 20px;
}

p a {
  color: #1b2833;
  text-decoration: none;
  border-bottom: 2px solid #0719dd;
}

p a:hover {
  color: #ffab6b;
  border-bottom-color: #ffab6b;
}

p strong {
  font-weight: 600;
}

/* Images */
figure {
  margin: 0;
}

img {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #1b2833;
  margin-top: 10px;
  font-family: 'Questrial';
}

/* Footer */
footer {
  padding: 40px 0;
  font-family: 'Questrial';
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  gap: 30px;
  align-items: center;
}

footer p {
  font-size: 16px;
  margin: 0;
}

footer a {
  font-size: 15px;
  text-decoration: none;
  color: #1b2833;
}

footer a:hover {
  color: #ffab6b;
}

/* Home */
.home {
  display: flex;
  gap: 8%;
  align-items: center;
}

.home-text {
  flex: 4;
}

.home-image {
  flex: 4;
  display: flex;
  justify-content: flex-end;
}

.home-image figure {
  width: 100%;
}

/* About */
.about {
  max-width: 700px;
  margin: 0 auto;
}

.photo-toggle {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 17px;
  color: #0719dd;
  font-family: 'Instrument', serif;
  text-decoration: underline;
  text-decoration-color: #0719dd;
  text-underline-offset: 3px;
}

.photo-toggle:hover {
  color: #ffab6b;
  text-decoration-color: #ffab6b;
}

.photo-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, margin-bottom 0.4s ease;
  margin-bottom: 0;
}

.photo-wrap.open {
  max-height: 700px;
  margin-bottom: 24px;
}

.photo-wrap img {
  max-width: 380px;
}

/* Hello */
.contact {
  max-width: 700px;
  margin: 0 auto;
}

/* Legal */
.legal-page {
  max-width: 700px;
  margin: 0 auto;
}

/* Posts index */
.posts-index {
  max-width: 700px;
}

.posts-year {
  margin-bottom: 40px;
}

.posts-label {
  display: block;
  font-size: 13px;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  margin-bottom: 12px;
}

.posts-month {
  margin-bottom: 20px;
}

.posts-month-label {
  display: block;
  font-size: 13px;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  margin-bottom: 12px;
}

.posts-item {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 8px;
}

.posts-date {
  font-size: 13px;
  font-family: 'Questrial', sans-serif;
  font-weight: bold;
  min-width: 80px;
}

.posts-item a {
  font-size: 17px;
  font-family: 'Instrument', serif;
  color: #1b2833;
  text-decoration: none;
}

.posts-item a:hover {
  color: #ffab6b;
}

/* Individual post */
.post {
  max-width: 700px;
  margin: 0 auto;
}

/* Mobile */
@media (max-width: 900px) {

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
  }

  .menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #1b2833;
    margin: 5px 0;
    transition: 0.3s;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -1px 0 0 -12.5px;
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -1px 0 0 -12.5px;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #f8f7f5;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  nav.active {
    right: 0;
  }

  .header-container,
  main,
  .footer-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}