@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");
@import url("themes/terminal.css?v=20260719b");
@import url("themes/minimal.css");
@import url("themes/two-column.css");
@import url("themes/bold-header.css");
@import url("themes/timeline.css");
@import url("themes/lcars.css");

:root {
  --bg: #e8e8e8;
  --panel: #fefefe;
  --text: #000000;
  --dim: #111111;
  --accent: #000000;
  --line: #000000;
  --link: #000000;
  --link-hover: #000000;
  --font-main: "Courier Prime", "Courier New", monospace;
  --font-size-main: 15px;
  --line-height-main: 1.7;
  --panel-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  --panel-radius: 0;
  --grain-opacity: 0;
  --page-max-width: 112ch;
  --page-padding: 3em 5em;
  --section-gap: 2em;
  --h2-size: 15px;
  --h2-transform: uppercase;
  --h2-letter: 0;
  --h2-weight: 700;
  --h2-margin: 2em 0 1em;
  --lcars-menu-icon-filter: brightness(0) saturate(100%);
}

body[data-theme="terminal"],
body[data-theme="lcars"] {
  --lcars-menu-icon-filter: brightness(0) saturate(100%) invert(94%);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: var(--font-size-main);
  line-height: var(--line-height-main);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  opacity: var(--grain-opacity);
}

.theme-dock {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: 132px;
  height: 86px;
}

.theme-hotspot {
  position: absolute;
  inset: 0;
}

.theme-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--line) 18%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--panel) 48%, transparent);
  color: color-mix(in srgb, var(--text) 55%, transparent);
  opacity: 0.2;
  font-size: 14px;
  box-shadow: none;
}

.full-toggle {
  position: fixed;
  top: 10px;
  right: 50px;
  z-index: 41;
  height: 32px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 35%, transparent);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color: color-mix(in srgb, var(--text) 80%, transparent);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.full-toggle:hover,
.full-toggle:focus-visible,
.full-toggle.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--line) 55%, transparent);
  outline: none;
}

.theme-flyout {
  position: absolute;
  top: 46px;
  right: 10px;
  min-width: 210px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 35%, transparent);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.theme-dock:focus-within .theme-flyout,
.theme-dock.touch-menu-open .theme-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

body[data-theme="lcars"] .theme-dock.lcars-menu-open .theme-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.theme-dock:focus-within .theme-icon {
  opacity: 1;
  color: var(--text);
}

.theme-dock.touch-menu-open .theme-icon {
  opacity: 1;
  color: var(--text);
}

body[data-theme="lcars"] .theme-dock.lcars-menu-open .theme-icon {
  opacity: 1;
  color: var(--text);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms ease, background 150ms ease;
}

.theme-option-icon {
  font-size: 18px;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.theme-option-icon-svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
}

.theme-option[data-theme-option="lcars"] .theme-option-icon-svg {
  filter: var(--lcars-menu-icon-filter);
}

.theme-option:hover,
.theme-option:focus-visible {
  background: color-mix(in srgb, var(--line) 16%, transparent);
  transform: translateX(3px);
  outline: none;
}

.theme-option.active {
  background: transparent;
  font-weight: 400;
}

.theme-label-wrap {
  display: none;
}

.theme-label {
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 0.2rem 0.48rem;
}

.manpage {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-padding);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.man-head,
.man-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--text);
  font-size: var(--h2-size);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.man-head span:nth-child(2),
.man-foot span:nth-child(2) {
  text-align: center;
}

.man-head span:last-child,
.man-foot span:last-child {
  text-align: right;
}

.man-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1em;
  margin-bottom: 2em;
}

.man-foot {
  border-top: 1px solid var(--line);
  padding-top: 1em;
  margin-top: 2em;
}

section {
  margin: 0 0 var(--section-gap);
}

h2 {
  margin: var(--h2-margin);
  color: var(--accent);
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  letter-spacing: var(--h2-letter);
  text-transform: var(--h2-transform);
}

p {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

#nameLine {
  margin-left: 7ch;
}

#synopsisLine {
  margin: 1em 0 1em 7ch;
  font-weight: 700;
}

#descriptionLine,
#languagesLine,
#interestsLine {
  margin: 0 0 1em 7ch;
}

.info-row {
  margin: 0 0 0.5em 7ch;
}

.info-row .label {
  color: var(--text);
  font-weight: 700;
  display: inline-block;
  width: 12ch;
}

.skills-grid {
  margin-left: 7ch;
}

.skills-list {
  margin: 0 0 0 7ch;
}

.skill-item {
  margin-bottom: 0.8em;
}

.skill-item dt {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-bottom: 0.2em;
}

.skill-item dd {
  margin-left: 7ch;
  margin-bottom: 0;
}

.skill-row {
  margin-bottom: 0.8em;
}

.skill-name {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.2em;
}

.skill-row span:last-child {
  display: block;
  margin-left: 7ch;
}

.job,
.project,
.edu {
  margin-bottom: 2em;
}

.item-head {
  display: block;
}

.item-title {
  font-weight: 700;
  margin: 0 0 0 7ch;
}

.item-company {
  display: none;
}

.item-dates {
  color: var(--dim);
  margin: 0 0 0.5em 14ch;
  font-style: italic;
}

.item-summary {
  margin: 0.5em 0 0.5em 14ch;
}

ul {
  margin: 0 0 0 14ch;
  padding-left: 3ch;
  list-style: none;
}

li {
  margin: 0.3em 0;
  position: relative;
}

li::before {
  content: "·";
  position: absolute;
  left: -2ch;
  font-weight: 700;
}

.fade-in {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1400px) {
  body[data-theme="man"] .manpage {
    font-size: 16px;
    max-width: 108ch;
    padding: 3.5em 6em;
  }

  .man-head,
  .man-foot,
  h2 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .manpage {
    max-width: calc(100vw - 0.8rem);
    padding: 1.35em 1.2em;
    font-size: 13px;
  }

  .man-head,
  .man-foot {
    font-size: 12px;
    grid-template-columns: 1fr;
    gap: 0.2em;
  }

  .man-head span:nth-child(2),
  .man-head span:last-child,
  .man-foot span:nth-child(2),
  .man-foot span:last-child {
    text-align: left;
  }

  #nameLine,
  #synopsisLine,
  #descriptionLine,
  #languagesLine,
  #interestsLine,
  .info-row,
  .skills-grid,
  .skills-list,
  .item-title {
    margin-left: 0;
  }

  .item-dates,
  .item-summary,
  ul,
  .skill-row span:last-child,
  .skill-item dd {
    margin-left: 0;
  }

  ul {
    padding-left: 1.2rem;
  }

  li::before {
    content: "";
  }

  .theme-label-wrap {
    display: none;
  }

  .theme-flyout {
    right: 8px;
    top: 44px;
  }

  .full-toggle {
    right: 46px;
    height: 30px;
    font-size: 10px;
    padding: 0 8px;
  }
}

@media (hover: hover) {
  .theme-dock:hover .theme-flyout,
  .theme-flyout:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .theme-dock:hover .theme-icon {
    opacity: 1;
    color: var(--text);
  }
}

@media (hover: none) {
  .theme-flyout {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
  }
}

@media print {
  .manpage {
    box-shadow: none;
  }

  .theme-dock,
  .theme-label-wrap {
    display: none;
  }
}
