*{ box-sizing: border-box; }

html, body { height: 100%; }
body{
  margin: 0;
  background: Canvas;
  color: CanvasText;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Layout container */
.crt{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
  position: relative;
  isolation: isolate;
}

.flicker{
  /* keep the class but don't change colors/contrast */
}

.terminal{
  width: min(980px, 100%);
  border: 1px solid currentColor;
  background: Canvas;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.terminal::before{
  content: none;
}

.topbar{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid currentColor;
}
.brand{
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  white-space: nowrap;
}
.status{
  font-size: 12px;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.status b{
  font-weight: 700;
}

.layout{
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 860px){
  .layout{ grid-template-columns: 1.3fr 0.7fr; }
}

.pane{
  padding: 18px 18px 20px;
  position: relative;
  z-index: 1;
}
.pane + .pane{
  border-top: 1px solid currentColor;
}
@media (min-width: 860px){
  .pane + .pane{
    border-top: 0;
    border-left: 1px solid currentColor;
  }
}

.nav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid currentColor;
  position: relative;
  z-index: 1;
}
.nav a{
  text-decoration: none;
  padding: 2px 6px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a:hover{
  border-color: currentColor;
}
.nav a[aria-current="page"]{
  border-color: currentColor;
}
.nav .spacer{
  flex: 1 1 auto;
}

h1, h2, h3, p { margin: 0 0 12px; }
h1{
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
h2{
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 18px;
}
p, li{
  font-size: 14px;
  line-height: 1.55;
}
.muted{ opacity: 0.75; }
.warn{ font-weight: 700; }

.rule{
  margin: 14px 0 10px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
li a{
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
li a:hover{
  border-bottom-style: solid;
}

/* Projects grid */
.projectsGrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.projectCard{
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 10px;
  overflow: hidden;
  background: Canvas;
}
.projectCard:hover{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.projectPhoto{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: Canvas;
}
.projectText{
  padding: 10px 12px 12px;
  display: grid;
  gap: 2px;
}
.projectTitle{
  font-weight: 650;
  line-height: 1.2;
}
.projectSubtitle{
  font-size: 13px;
  line-height: 1.35;
}

.avatarRow{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.avatar{
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: Canvas;
  object-fit: cover;
}

/* Tighten up spacing under the subtitle line in the header row */
.avatarRow .muted{
  margin: 0;
}

.prompt{
  padding: 12px 14px 14px;
  border-top: 1px solid currentColor;
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.caret{
  width: 10px;
  height: 16px;
  background: currentColor;
  animation: blink 1.05s infinite steps(1, end);
}
@keyframes blink{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: 0; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce){
  .caret{ animation: none; }
}

.icon{
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}
.icon svg{
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

