/* Minimal shared styles for the homepage and photography page. */
:root {
  --bg: #141414;
  --text: #e8e6e3;
  --muted: #9a9894;
  --line: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Spectral', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  text-transform: lowercase;
}

a { color: inherit; }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* header */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 40px;
}

.name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  text-decoration: none;
}

.name::before {
  content: '';
  width: 22px;
  height: 22px;
  background: url(mark.svg) center / contain no-repeat;
}

.top nav {
  display: flex;
  gap: 48px;
  padding: 0 40px 18px;
  border-bottom: 1px solid var(--line);
  transform: translateY(9px);
}

.top nav a {
  text-decoration: none;
}

.top nav a[aria-current] { color: var(--text); }
.top nav a:not([aria-current]) { color: var(--muted); }
.top nav a:hover { color: var(--text); }

.socials {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}

.socials a { color: var(--muted); display: flex; }
.socials a:hover { color: var(--text); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* body copy */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

main p { margin: 0 0 22px; }

main a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}

main a:hover { color: var(--text); border-color: var(--muted); }

ul { margin: 0 0 22px; padding-left: 24px; }
li { margin-bottom: 6px; }
li::marker { color: var(--muted); }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
}

/* robot viewer */
.robot {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 8px 0 30px;
}

.robot canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  filter: grayscale(1) contrast(1.05);
  touch-action: pan-y;
}

.robot canvas:active { cursor: grabbing; }

.robot figcaption,
.robot .status {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  pointer-events: none;
}

.robot figcaption { bottom: -6px; }
.robot .status { top: 50%; transition: opacity .4s; }

/* photography */
.photos {
  max-width: 1100px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.photos button {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/* columns are built by the page script, filling whichever is shortest */
.photos .col { flex: 1; min-width: 0; }

.photos img {
  display: block;
  width: 100%;
  height: auto;
  opacity: .9;
  transition: opacity .2s;
}

.photos button:hover img { opacity: 1; }

.albums {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 6px;
}

.albums button {
  font: inherit;
  text-transform: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  cursor: pointer;
}

.albums button span { font-size: 14px; opacity: .6; }
.albums button:hover { color: var(--text); }
.albums button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.photos button[hidden] { display: none; }

dialog {
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 14, 14, .96);
  color: var(--text);
}

dialog::backdrop { background: rgba(14, 14, 14, .96); }

dialog figure {
  height: 100%;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: zoom-out;
}

dialog img { max-width: 100%; max-height: calc(100% - 50px); object-fit: contain; }
dialog figcaption { color: var(--muted); font-size: 15px; font-style: italic; }

main.intro { max-width: 1100px; padding-bottom: 12px; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .top { grid-template-columns: 1fr auto; padding: 20px 16px; row-gap: 14px; }
  .top nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; transform: none; gap: 36px; padding-bottom: 12px; }
  main { padding: 24px 16px 60px; }
  .cols { grid-template-columns: 1fr; }
  .photos { padding: 0 16px 60px; gap: 10px; }
  .photos button { margin-bottom: 10px; }
}

/* robot list: each name switches the viewer */
.robots { list-style: none; padding: 0; }
.robots li { margin-bottom: 16px; }
.robots button {
  font: inherit;
  text-transform: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
}
.robots button:hover { color: var(--text); border-color: var(--muted); }
.robots button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }

.copied { color: var(--muted); font-style: italic; font-size: 16px; }
