:root {
  --ink: #111;
  --muted: #8a8a8a;
  --border: #e4e4e4;
  --bg: #fff;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 100;
}

.nav-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a, .nav-info-btn {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-info-btn:hover {
  opacity: 1;
}

/* Layout */

main {
  padding-top: var(--nav-height);
  min-height: 100vh;
  position: relative;
}

.page-inner {
  padding: 48px 28px 160px;
  max-width: 760px;
}

/* Contact link, bottom-left */

.contact-wrap {
  position: fixed;
  left: 28px;
  bottom: 24px;
  z-index: 90;
}

.contact-link {
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.contact-wrap:hover .contact-link {
  opacity: 1;
  font-weight: 700;
}

.contact-email,
.contact-phone {
  position: absolute;
  white-space: nowrap;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.contact-email {
  left: 0;
  bottom: 100%;
  margin-bottom: 10px;
}

.contact-phone {
  left: 100%;
  bottom: 0;
  margin-left: 14px;
}

.contact-wrap:hover .contact-email,
.contact-wrap:hover .contact-phone {
  opacity: 1;
  pointer-events: auto;
}

main,
.nav,
.floating-photo {
  transition: filter 0.2s ease;
}

body:has(.contact-wrap:hover) main,
body:has(.contact-wrap:hover) .nav,
body:has(.contact-wrap:hover) .floating-photo {
  filter: blur(6px);
}

/* Floating photo, bottom-right */

.floating-photo {
  position: fixed;
  right: 28px;
  bottom: 0;
  width: 150px;
  height: 150px;
  z-index: 90;
  display: block;
  cursor: pointer;
}

.floating-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50% 50% 8% 8%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.15));
  transition: transform 0.2s ease;
  transform-origin: bottom center;
}

.floating-photo:hover img {
  transform: scale(1.08);
}

.photo-hint {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%) rotate(-4deg);
  margin-bottom: 2px;
  font-family: "Caveat", cursive;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, font-size 0.2s ease;
  pointer-events: none;
}

.floating-photo:hover .photo-hint {
  opacity: 1;
  font-size: 28px;
}

/* Written list */

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.entry-link {
  display: block;
  color: inherit;
}

.entry-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.entry-title {
  font-weight: 500;
}

.entry-link:hover .entry-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-meta {
  color: var(--muted);
  font-size: 13px;
}

.entry-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

/* Prose pages (Who I am) */

.prose p {
  margin: 0 0 20px;
  max-width: 560px;
  line-height: 1.7;
}

/* Sets the list apart from the paragraphs above it */
.prose .list-lead {
  margin-top: 44px;
  margin-bottom: 20px;
}

.learning-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.learning-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.7;
}

.learning-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* Parenthetical asides read as secondary to the item itself */
.learning-list .note {
  color: var(--muted);
}

.prose h1 {
  font-size: 20px;
  margin: 0 0 36px;
  font-weight: 600;
}

/* Resume page */

.resume-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.resume-download {
  border: 1px solid var(--ink);
  padding: 8px 16px;
  display: inline-block;
}

.resume-download:hover {
  background: var(--ink);
  color: var(--bg);
}

.resume-embed {
  width: 100%;
  max-width: 700px;
  height: 640px;
  border: 1px solid var(--border);
}

/* Info panel */

.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.info-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(340px, 86vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 200;
  padding: 28px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.info-panel.open {
  transform: translateX(0);
}

.info-panel h2 {
  font-size: 15px;
  margin: 0 0 20px;
}

.info-panel p {
  margin: 0 0 14px;
  color: var(--muted);
}

.info-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav {
    padding: 0 16px;
  }
  .nav-name {
    font-size: 12px;
  }
  .nav-links {
    gap: 14px;
    font-size: 12px;
  }
  .page-inner {
    padding: 36px 18px 160px;
  }
  .floating-photo {
    width: 110px;
    height: 110px;
    right: 18px;
  }
  .contact-wrap {
    left: 18px;
  }
}

@media (max-width: 360px) {
  .nav-links {
    gap: 10px;
    font-size: 11px;
  }
}
