.project-image-figure {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  max-width: 340px;
  width: 100%;
  gap: 0.3rem;
}

.project-image-caption,
.project-image-figure figcaption {
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 0;
  padding: 0;
  width: 100%;
  max-width: 340px;
  align-self: stretch;
}

@media (max-width: 800px) {
  .project-image-figure {
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .project-image-caption {
    font-size: 0.93rem;
  }
}

.project-section-images {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  justify-content: center;
  align-items: flex-end;
}

.project-section-images img, .project-section-images video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: unset;
  object-fit: unset;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: none;
}

.project-section-images video:hover,
.project-section-images video:focus {
  box-shadow: 0 4px 18px 0 rgba(60,60,60,0.10);
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: unset;
  object-fit: unset;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: none;
}

.project-section-images img:hover,
.project-section-images img:focus {
  box-shadow: 0 4px 18px 0 rgba(60,60,60,0.10);
}

@media (max-width: 800px) {
  .project-section-images {
    gap: 0.7rem;
    flex-wrap: wrap;
  }
  .project-section-images img {
    max-width: 100%;
    height: auto;
  }
}
@media (max-width: 600px) {
  .project-section-images {
    flex-direction: column;
    gap: 0.5rem;
  }
  .project-section-images img {
    max-width: 100%;
    height: auto;
  }
}

:root {
  --background: #fafbfc;
  --text: #232323;
  --muted: #6a6a6a;
  --accent: #3a7ca5;
  --card-bg: #fff;
  --card-shadow: 0 2px 12px 0 rgba(60,60,60,0.06);
  --card-shadow-hover: 0 4px 24px 0 rgba(60,60,60,0.10);
  --border-radius: 16px;
  --transition: 0.18s cubic-bezier(.4,0,.2,1);
  --container-width: 720px;
}

html {
  box-sizing: border-box;
  font-size: 18px;
  background: var(--background);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

header, footer {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 2rem 0 1rem 0;
}
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.site-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0 0 1.5rem 0;
  text-align: center;
  width: 100vw;
  display: block;
  left: 50%;
  position: relative;
  transform: translateX(-50%);
}
.site-title #typing-title {
  border-right: 2px solid var(--accent);
  padding-right: 0.2em;
  white-space: nowrap;
  display: inline;
  min-height: 1em;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem 2rem 1rem;
}

footer {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid #ececec;
  margin-top: 2rem;
}

.hero-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--card-bg);
  height: 320px;
  min-height: 320px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 2.5rem;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  outline: none;
  border: none;
  min-height: 260px;
}

.hero-card:focus,
.hero-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px) scale(1.012);
}

.hero-card__image {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  background: #e9ecef;
  display: block;
}

.hero-card__content {
  flex: 1 1 0;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-card__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.7rem 0;
  color: var(--text);
}

.hero-card__desc {
  font-size: 1.08rem;
  margin-bottom: 0.7rem;
  color: var(--text);
}

.hero-card__meta {
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.hero-card.reverse {
  flex-direction: row-reverse;
}

.hero-card__image.reverse {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.hero-card {
  text-decoration: none;
  color: inherit;
}

.hero-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  main, header, footer {
    max-width: 98vw;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .hero-card__content {
    padding: 1.2rem 1rem;
  }
}
@media (max-width: 600px) {
  .hero-card,
  .hero-card.reverse {
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
    height: auto;
  }
  .hero-card__image,
  .hero-card__image.reverse {
    width: 100%;
    height: 200px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    object-fit: cover;
    display: block;
  }
  .hero-card__content {
    padding: 1.1rem 0.8rem 1.5rem 0.8rem;
  }
}

.project-banner {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  background: #e9ecef;
}

.project-section {
  margin-bottom: 2.2rem;
}

.project-section h2 {
  font-size: 1.18rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
  margin-top: 0;
}

.back-link {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
  transition: color var(--transition);
  text-align: center;
}

.back-link:hover,
.back-link:focus {
  color: #17496b;
  text-decoration: underline;
}
