@import url("https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,100..900;1,100..900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap");
html {
  font-size: 16px;
}

body {
  font-family: "Epilogue", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #222222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-size: 2.3rem;
  font-weight: normal;
  margin: 0;
}

h2 {
  font-size: 2rem;
  font-weight: normal;
  margin: 0;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

h1 em {
  color: #EE5D76;
  font-style: normal;
  font-weight: normal;
}

h2.divider {
  border-top: 1px solid #222222;
  padding-top: 1rem;
  margin: 0;
  text-align: left;
}

h3.title {
  color: #EE5D76;
  font-weight: normal;
}

a {
  color: #222222;
  font-weight: normal;
  text-decoration: none;
}
a:hover {
  color: #EE5D76;
}
a.active {
  font-weight: normal;
  color: #EE5D76;
}

.latest-work {
  margin: 0 auto;
  max-width: 80rem;
}

.two-col-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 80rem;
}

.two-col-hero .hero-text {
  flex: 1 1 55%;
}

.two-col-hero .hero-image {
  flex: 0 0 40%;
}

.two-col-hero .hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

@media (max-width: 800px) {
  .two-col-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .two-col-hero .hero-image {
    width: 100%;
    flex: 0 0 auto;
  }
}
/* Two-column layout: 25% / 75% */
.two-col-25-75 {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 0;
  box-sizing: border-box;
  max-width: 80rem;
  margin: 0 auto;
}

.two-col-25-75 .col-25 {
  flex: 0 0 25%;
  max-width: 25%;
}

.two-col-25-75 .col-75 {
  flex: 1 1 75%;
  max-width: 75%;
}

.two-col-25-75 .col-25,
.two-col-25-75 .col-75 {
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .two-col-25-75 {
    flex-direction: column;
    padding: 1rem;
  }
  .two-col-25-75 .col-25,
  .two-col-25-75 .col-75 {
    max-width: 100%;
    flex: 1 1 100%;
    width: 100%;
  }
}
/* Ensure the rule applies specifically to section elements to avoid being overridden */
section.two-col-25-75 {
  display: flex;
}

/* Project grid: 3 columns, square items with blur-to-sharp background */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.grid-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #ddd;
}

.grid-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg, linear-gradient(90deg, #ccc, #aaa));
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(0.9) contrast(0.9);
  transform: scale(1.05);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.grid-item:hover::before,
.grid-item:focus::before {
  filter: blur(0) saturate(1) contrast(1);
  transform: scale(1);
}

.grid-item__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

@media (max-width: 800px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.hero-image {
  max-width: 100%;
  height: auto;
}

/* Two-by-two image container for concepts & wireframing */
.two-by-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  align-items: start;
}

.two-by-two img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .two-by-two {
    grid-template-columns: 1fr;
  }
}
/* Three-by-three image container */
.three-by-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  align-items: start;
}

.three-by-three img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 800px) {
  .three-by-three {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .three-by-three {
    grid-template-columns: 1fr;
  }
}
/* Image card wrapper so caption remains part of the grid item */
.image-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.image-card .modal-trigger {
  display: block;
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Modal trigger image cropping for preview */
.modal-trigger img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: top;
  display: block;
  cursor: pointer;
  border: 1px solid #222222;
  opacity: 0.7;
}
.modal-trigger img:hover {
  opacity: 1;
}

/* Video player styles */
.video-player {
  margin-top: 0;
  max-width: 100%;
}

.video-player video {
  width: 100%;
  height: auto;
  display: block;
  background: #F4F1ED;
}

.video-caption {
  margin-top: 0.5rem;
  color: #222222;
  font-size: 0.85rem;
  font-style: italic;
}

/* Modal / lightbox styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #F4F1ED;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-width: min(1280px, 90vw);
  max-height: 90vh;
  box-sizing: border-box;
}

.modal-box img {
  /* account for modal padding so image fits within the box */
  max-width: calc(min(1280px, 90vw) - 2rem);
  max-height: calc(90vh - 4rem);
  width: auto;
  display: block;
  border-radius: 6px;
}

.modal-caption {
  margin-top: 0.75rem;
  color: #222222;
  font-size: 0.95rem;
  line-height: 1.4;
}

.modal-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  background: #222;
  color: #fff;
  border: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prev/Next navigation buttons inside modal */
.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.modal-prev {
  left: 1rem;
}

.modal-next {
  right: 1rem;
}

.modal-prev:disabled,
.modal-next:disabled {
  opacity: 0.45;
  cursor: default;
}

div.divider {
  border-top: 1px solid #222222;
  padding-top: 1rem;
  margin: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resume-block {
  margin: 2rem 0;
}
.resume-block:last-child {
  margin-bottom: 0;
}

.resume-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem 0;
}
.resume-list li {
  margin-bottom: 0.5rem;
}
.resume-list li:last-child {
  margin-bottom: 0;
}

.portfolio-nav {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}
.portfolio-nav li {
  margin-bottom: 0.5rem;
}
.portfolio-nav li:last-child {
  margin-bottom: 0;
}

.main-button {
  color: #F4F1ED;
  background-color: #EE5D76;
  font-size: 1.25rem;
  border: 1px solid #EE5D76;
  font-family: "Epilogue", "Helvetica Neue", Arial, sans-serif;
  font-weight: normal;
  padding: 1rem 1.75rem;
  border-radius: 2rem;
  cursor: pointer;
  text-decoration: none;
}
.main-button:hover {
  border: 1px solid #EE5D76;
  background-color: #F4F1ED;
  color: #EE5D76;
}

/* Preview image hover effect */
a:has(img.preview) {
  position: relative;
  display: block;
  overflow: visible;
}

a:has(img.preview)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

a:has(img.preview)::after {
  content: attr(data-title);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: normal;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

a:has(img.preview):hover::before,
a:has(img.preview):hover::after {
  opacity: 1;
}

img.preview {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  border: 1px solid #222222;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #F4F1ED;
  color: #222222;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 2rem auto;
  max-width: 80rem;
  position: relative;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
}

/* Hamburger menu button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #222222;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav ul li a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  font-size: 1.167rem;
}
nav ul li a:hover {
  color: #EE5D76;
}

@media (max-width: 600px) {
  .hamburger {
    display: flex;
  }
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #F4F1ED;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  nav.active {
    max-height: 300px;
  }
  nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 1rem 0;
  }
  nav ul li {
    width: 100%;
    text-align: left;
  }
  nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    width: 100%;
  }
}
footer {
  background: #F4F1ED;
  color: #222222;
  padding: 0;
  margin: 3rem auto 0 auto;
  text-align: left;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  max-width: 80rem;
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Base site rules */
body {
  background: #F4F1ED;
  margin: 2rem;
}
