@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-mono-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Gloock';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/gloock-400.woff2') format('woff2');
}

:root {
  --bg: #fdfdfb;
  --text: #111111;
  --grey: #8a8a8a;
  --grey-light: #e5e5e5;
}

* {
  box-sizing: border-box;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(100deg, var(--grey-light) 40%, #f4f4f2 50%, var(--grey-light) 60%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', monospace;
}

h1 {
  font-family: 'Gloock', serif;
  font-size: 72px;
  font-weight: 400;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Nav */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.25rem 2rem 1.5rem;
}

/* Nav text outline: -webkit-text-stroke always centers on the letterform
   (half in, half out), which chokes thin serif strokes. To get an
   outside-only outline, an identical copy of the text is stroked and
   placed directly behind the real (solid-fill) text via ::after - the
   fill covers the inward half of the stroke, leaving only the outward
   half visible. NOTE: the ::after content is hardcoded to match the
   visible text below - if you ever change "Dylan Taylor" or "About",
   update the matching content string here too. */

.nav-name {
  position: relative;
  font-family: 'Gloock', serif;
  font-size: 36px;
}

.nav-name::after {
  content: "Dylan Taylor";
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 0.5px #333;
}

.nav-link {
  position: relative;
  font-family: 'Gloock', serif;
  font-size: 36px;
  color: var(--grey);
}

.nav-link::after {
  content: "About";
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 0.5px #333;
}

.nav-link:hover {
  color: var(--text);
}

/* Hero */

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #000;
}

.hero.skeleton {
  background: linear-gradient(100deg, #111 40%, #262626 50%, #111 60%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.nav-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.nav-hero .nav-name,
.nav-hero .nav-link {
  color: #fff;
}

/* Homepage grid */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding: 2rem 2rem 3rem;
}

.thumb-card {
  display: block;
}

.thumb-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--grey-light);
}

.thumb-frame img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.thumb-frame img.loaded {
  opacity: 1;
}

.thumb-card:hover .thumb-frame img {
  transform: scale(1.03);
}

.thumb-caption {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.1rem 0;
}

.thumb-title {
  color: var(--grey);
  font-size: 0.8rem;
}

.thumb-count {
  color: var(--grey);
  font-size: 0.8rem;
  text-align: right;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem 1.25rem 2rem;
  }

  nav {
    padding: 1.25rem 1.25rem;
  }

  .nav-name,
  .nav-link {
    font-size: 18px;
  }
}

/* Project subpage */

#project-title {
  margin: 1.5rem 2rem 1rem;
}

#project-intro {
  margin: 0 2rem 3rem;
  max-width: 60ch;
  line-height: 1.6;
  color: var(--text);
}

.full-image {
  margin: 0 0 3rem 0;
}

.full-image img {
  width: 100%;
  display: block;
}

.full-image.portrait img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  display: block;
  margin: 0 auto;
}

.full-image figcaption {
  color: var(--grey);
  font-size: 0.8rem;
  text-align: left;
  margin: 0.5rem 2rem 0;
}

.page-footer-links {
  display: flex;
  justify-content: space-between;
  padding: 2rem;
  font-size: 0.85rem;
}

.page-footer-links a:hover {
  color: var(--grey);
}

.not-found {
  padding: 3rem 2rem;
}

@media (max-width: 700px) {
  h1 {
    font-size: 40px;
  }

  #project-title {
    margin: 1.25rem 1.25rem 1rem;
  }

  #project-intro {
    margin: 0 1.25rem 2rem;
  }

  .full-image figcaption {
    margin: 0.5rem 1.25rem 0;
  }

  .page-footer-links {
    padding: 1.5rem 1.25rem;
  }
}

/* About page */

.about-content {
  padding: 1rem 2rem 3rem;
  max-width: 60ch;
}

.about-content p {
  line-height: 1.6;
}
