:root {
  color-scheme: dark;
  --bg: #101415;
  --surface: #161d1e;
  --text: #f2f5f3;
  --muted: #afbdb8;
  --line: #354341;
  --mint: #a3e8c6;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 45% 0%, #1b2727, transparent 65rem), var(--bg);
  color: var(--text);
  font: 1rem/1.6 Geist, system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mint); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.wrap { width: calc(100% - clamp(2rem, 6.3vw, 6rem)); max-width: 1500px; margin-inline: auto; }
.site-header {
  min-height: 76px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.identity { display: flex; align-items: baseline; gap: .8rem; margin-right: auto; }
.identity strong { font-size: clamp(1.2rem, 2.2vw, 1.7rem); letter-spacing: -.045em; }
.identity span { color: var(--mint); font-size: .92rem; font-weight: 600; }
nav { display: flex; flex-wrap: wrap; gap: clamp(.85rem, 3vw, 2.5rem); font-size: .94rem; }
.languages { display: flex; border: 1px solid var(--mint); border-radius: 5px; }
.languages button {
  color: var(--mint);
  background: transparent;
  min-width: 44px;
  padding: .25rem .5rem;
  border: 0;
  font: 500 .85rem/1.65 var(--mono);
}
.languages button[aria-pressed="true"] { background: var(--mint); color: var(--bg); }
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(2.2rem, 5vw, 4.3rem);
  align-items: start;
  border-bottom: 1px solid var(--line);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 4.6vw, 4.6rem); line-height: 1.01; letter-spacing: -.065em; max-width: 17ch; }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.65rem); line-height: 1.12; letter-spacing: -.045em; }
h3 { font-size: clamp(1.12rem, 1.8vw, 1.6rem); line-height: 1.2; letter-spacing: -.035em; }
.job { font: 500 .98rem/1.55 var(--mono); color: var(--mint); }
.summary { margin-top: .8rem; max-width: 61ch; color: var(--muted); }
.platforms { color: var(--text); font: .84rem/1.6 var(--mono); margin-top: 1rem; }
.platforms span { color: var(--mint); }
.profile-details {
  display: grid;
  gap: 1.15rem;
  padding-left: clamp(1.5rem, 3vw, 2.8rem);
  border-left: 1px solid var(--line);
}
.profile-details h2 { font-size: 1.65rem; margin-bottom: .5rem; }
.profile-details ul { list-style: none; padding: 0; margin: .25rem 0 0; color: var(--muted); }
.cv, .contact a { color: var(--mint); text-decoration: underline; text-underline-offset: 4px; }
.cv { display: inline-block; margin-top: 1rem; font: .88rem/1.6 var(--mono); }
.contact a { display: block; width: fit-content; overflow-wrap: anywhere; }
.projects { padding-block: 1.55rem 2.4rem; }
.section-header { margin-bottom: 1.15rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.game-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: .72rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.game-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.zoom-icon {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--mint);
}
.game-preview:hover, .game-preview:hover .zoom-icon { border-color: var(--mint); }
.screenshots {
  width: min(94vw, 1100px);
  max-height: 94dvh;
  padding: clamp(.65rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.screenshots::backdrop { background: #070a0bea; }
body:has(.screenshots[open]) { overflow: hidden; }
.screenshots-header, .screenshots-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.screenshots-header { margin-bottom: .75rem; }
.screenshots-header form { margin-left: auto; }
.screenshots-header h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
.screenshot-control {
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  color: var(--mint);
  font-size: 1.35rem;
}
.screenshot-control:hover { border-color: var(--mint); }
.screenshot-stage {
  display: grid;
  place-items: center;
  position: relative;
  background: #080c0d;
}
#screenshot-full {
  display: block;
  width: 100%;
  height: min(52vw, 64dvh);
  object-fit: contain;
}
.screenshot-stage button { position: absolute; top: 50%; transform: translateY(-50%); }
.screenshot-previous { left: .4rem; }
.screenshot-next { right: .4rem; }
.screenshots-footer { margin-top: .8rem; }
.screenshots-footer[hidden] { display: none; }
.screenshot-thumbnails { display: flex; gap: .4rem; min-width: 0; }
.screenshot-thumbnails button {
  min-width: 0;
  max-width: 6.5rem;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}
.screenshot-thumbnails button[aria-pressed="true"],
.screenshot-thumbnails button:hover { border-color: var(--mint); }
.screenshot-thumbnails img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
#screenshot-position { white-space: nowrap; color: var(--muted); font: .8rem/1.5 var(--mono); }
article p { margin-top: .35rem; color: var(--muted); font-size: .94rem; }
.gallery > li { min-width: 0; }
.gallery article { display: flex; flex-direction: column; height: 100%; }
.game-contributions {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  color: var(--mint);
  font: .78rem/1.5 var(--mono);
}
.game-contributions li { white-space: nowrap; }
.game-contributions li + li { border-left: 1px solid var(--line); padding-left: .5rem; }
.game-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: auto 0 0;
  padding: .75rem 0 0;
  list-style: none;
}
.game-platforms a {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-height: 32px;
  padding: .2rem .38rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font: .72rem/1.3 var(--mono);
}
.game-platforms a:hover, .game-platforms a:focus-visible {
  color: var(--mint);
  border-color: var(--mint);
}
.game-platforms img { display: block; width: 16px; height: 16px; }
.after-hours { border-top: 1px solid var(--line); padding-block: 2.25rem; }
.prototype-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
.prototype-grid figure { margin: 0; min-width: 0; }
.prototype-grid .game-preview { margin-bottom: 0; }
.theses { border-top: 1px solid var(--line); padding-block: 2.25rem 3.75rem; }
.theses-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.1rem; }
.theses-grid article { display: flex; flex-direction: column; }
.theses-grid article p { margin-bottom: .8rem; }
.video-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
}
.video-preview img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: relative;
  padding: .55rem .8rem;
  border: 1px solid var(--mint);
  border-radius: 4px;
  background: var(--bg);
  color: var(--mint);
  font: .85rem/1.5 var(--mono);
}
.video-preview:hover .video-play, .video-preview:focus-visible .video-play { background: var(--mint); color: var(--bg); }
.institution { font-weight: 600; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .site-header { gap: .7rem 1rem; }
  .identity { gap: .16rem; flex-direction: column; }
  nav { order: 1; width: 100%; }
  .overview, .theses-grid { grid-template-columns: 1fr; }
  .profile-details { padding: 1.2rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .prototype-grid { grid-template-columns: 1fr; }
}

