:root {
    --bg: #ffffff;
    --text: #111;
    --muted: #777;
  }

@font-face {
  font-family: Redaction-Regular;
  src: url(./assets/Redaction-Regular.otf);
}

@font-face {
  font-family: Redaction-Bold;
  src: url(./assets/Redaction-Bold.otf);
}

@font-face {
  font-family: Redaction50-Regular;
  src: url(./assets/Redaction50-Regular.otf);
}

@font-face {
  font-family: Redaction50-Bold;
  src: url(./assets/Redaction50-Bold.otf);
}

@font-face {
  font-family: LeagueMono-Regular;
  src: url(./assets/LeagueMono-Regular.otf);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
}

header {
  position: sticky;
  top: 0;
  width: 100%;
  background: white;
  border-bottom: 0.05rem solid #e5e5e5;
  z-index: 1000;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  
}

.name {
  font-family: 'Redaction50-Bold';
  font-size: 1.5rem;
  letter-spacing: 0.06rem;
  text-decoration: none;
  color: inherit;
}

.contact {
  font-family: 'LeagueMono-Regular';
  font-size: 12px;
  letter-spacing: 0.5px;
}

.contact a {
  color: var(--text);
  text-decoration: none;
  margin-left: 12px;
}

.contact a:hover {
  text-decoration: underline;
}


.projects {
  width: 80rem;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  font-family: 'Redaction50-Bold';
}

.project {
  position: relative;
  display: flex;
  width: 80rem;
  height: 7rem;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.project:nth-child(odd) {
  background-color: #f0f0f0;
}

.project-name {
  width: 33.333%;
  font-size: 2.5rem;
  letter-spacing: 0.06rem;
  padding-left: 20px;
}

.project-type {
  width: 66.666%;
  font-family: 'Redaction-Regular';
  font-size: 1.5rem;
}

.preview-img {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  height: 15rem;
  width: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border: solid #111 1px;
  z-index: 1;
}

.project:hover {
  background: #111;
  color: #fff;
  cursor: pointer;
}

.project:hover .preview-img {
  opacity: 1;
}

  .img-wrapper {
    position: relative;
    max-width: 380px;
    max-height: 380px;
  }

  .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.65;
    transition: opacity 0.35s ease, transform 0.35s ease;
    display: block;
  }

  .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 1px;
    background: rgba(0,0,0,0);
    transition: background 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    text-align: center;
    padding: 10px;
  }

  .img-wrapper:hover img {
    opacity: 1;
    transform: scale(1.01);
  }

  .img-wrapper:hover .overlay {
    opacity: 1;
    background: rgba(0,0,0,0.25);
  }

  @media (max-width: 900px) {
    .projects {
      grid-template-columns: 1fr;
      column-gap: 0;
    }

    .projects::before {
      display: none;
    }

    .project.left,
    .project.right {
      grid-column: 1;
      justify-content: flex-start;
    }

    .img-wrapper {
      max-width: 100%;
    }
  }