@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/IBMPlexMono-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/IBMPlexMono-Italic.woff2') format('woff2');
}

body {
  font-family: 'IBM Plex Mono', monospace;
  margin: 2em auto;
  max-width: 600px;
  padding: 0 1em;
  background: #f7f7f2;
  color: #222725;
}

a {
  color: white;
  background-color: #899878;
  text-decoration: none;
  border-radius: 5px;
  padding: 0.25em 0.5em;
  outline: 0 solid #899878;
  transition: outline-width 0.05s;
}

a:hover {
  outline-width: 2px;
}

nav a {
  margin-right: 0.5em;
}

p a {
  padding: 0.05em 0.3em;
}

/* intro */
.intro {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
  margin: 1.5em 0;
}

.intro p {
  margin: 0;
}

.portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 1.5em;
  color: #666;
  font-size: 0.85em;
  margin: 0 0 1em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0 0 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #ddd;
}

.links a {
  padding: 0.25em 0.5em;
}

/* projects */
.projects {
  list-style: none;
  padding: 0;
}

.projects li {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  margin-bottom: 1.8em;
  padding: 0.75em;
  margin-left: -0.75em;
  margin-right: -0.75em;
  border-radius: 6px;
  transition: background 0.15s;
}

.projects li:hover {
  background: #eeeee8;
}

.projects .info {
  flex: 1;
}

.projects h3 {
  margin: 0 0 0.25em;
}

.projects p {
  margin: 0 0 0.5em;
}

.projects img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.projects img.contain {
  object-fit: contain;
}

/* photography */
.grid {
  columns: 2;
  column-gap: 0.75em;
  margin-top: 1em;
}

.grid img {
  width: 100%;
  display: block;
  margin-bottom: 0.75em;
}

/* project pages */
ul {
  padding-left: 1.2em;
}

li {
  margin-bottom: 0.4em;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #e0e0da;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  margin: 1.5em 0;
  font-size: 0.85em;
}

pre {
  background: #e8e8e2;
  padding: 0.75em 1em;
  overflow-x: auto;
  border-radius: 4px;
}

code {
  font-size: 0.95em;
}

/* press / news */
.press-item {
  margin-bottom: 1em;
}

.press-item a {
  background: none;
  color: #899878;
  padding: 0;
  border-radius: 0;
}

.press-item a:hover {
  outline-width: 0;
  text-decoration: underline;
}

.press-meta {
  display: block;
  font-size: 0.8em;
  color: #777;
  margin-top: 0.15em;
}

.press-meta a.backup {
  color: #999;
  font-size: 0.9em;
}

/* resume */
.resume {
  width: 100%;
  height: 80vh;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 1em;
}

/* footer */
footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid #ddd;
  font-size: 0.8em;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* mobile */
@media (max-width: 500px) {
  .header-row {
    flex-direction: column;
  }

  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .portrait {
    width: 100px;
    height: 100px;
  }

  .skills {
    justify-content: center;
  }

  .links {
    justify-content: center;
  }

  .projects li {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .projects img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}