/* Romy - single screen, no scroll.
   Everything fits the viewport; the list is what flexes when space is tight. */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg:#07090c;
  --ink:#e8ece9;
  --ink-2:#8d9893;
  --accent:#4ade80;
  --line:rgba(255,255,255,.09);

  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --font:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}

html,body{height:100%}

body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-size:15px;
  line-height:1.55;
  letter-spacing:-.01em;
  -webkit-font-smoothing:antialiased;
  display:grid;
  place-items:center;
  padding:1.5rem;
  height:100dvh;
  overflow:hidden;
}

::selection{background:var(--accent);color:#052e16}
a{color:inherit;text-decoration:none}
ul{list-style:none}

:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}

.skip{
  position:absolute;left:-9999px;
  padding:.5rem .9rem;background:var(--accent);color:#052e16;
  font-size:.8125rem;font-weight:600;border-radius:6px;z-index:10;
}
.skip:focus{left:1.5rem;top:1.5rem}

/* the sheet: one column, centered, never taller than the viewport */

/* Height budget: the sheet must fit between the body's own vertical
   padding, otherwise the document grows a scrollbar by a few pixels. */
.sheet{
  width:min(100%,40rem);
  height:calc(100dvh - 3rem);
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}

/* header */

.head{flex-shrink:0}

.head h1{
  font-size:1.75rem;font-weight:600;letter-spacing:-.03em;line-height:1.1;
}

.role{margin-top:.2rem;color:var(--ink-2);font-size:.875rem}

.links{
  display:flex;flex-wrap:wrap;gap:.4rem 1.25rem;
  margin-top:1rem;
  font-family:var(--mono);font-size:.8125rem;
}
.links a{color:var(--ink-2);transition:color .2s}
.links a:hover{color:var(--accent)}

/* project list: takes the slack, scrolls internally if the viewport is tiny */

.list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--line) transparent;
  border-top:1px solid var(--line);
}

.item{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:baseline;
  gap:.1rem 1rem;
  padding:.5rem .6rem .5rem 0;
  margin-inline:-.6rem;
  border-bottom:1px solid var(--line);
  transition:background .2s,padding-left .2s;
}
.item:last-child{border-bottom:0}
.item:hover{background:rgba(255,255,255,.025);padding-left:.5rem}

.item__name{font-weight:600;font-size:.9rem}
.item:hover .item__name{color:var(--accent)}

.item__lang{
  font-family:var(--mono);font-size:.6875rem;color:var(--ink-2);
  white-space:nowrap;
}

.item__desc{
  grid-column:1/-1;
  font-size:.78125rem;color:var(--ink-2);line-height:1.4;
}

/* footer */

.foot{
  flex-shrink:0;
  display:flex;
  justify-content:space-between;align-items:baseline;gap:1rem;
  padding-top:.75rem;
  border-top:1px solid var(--line);
  font-family:var(--mono);font-size:.6875rem;color:var(--ink-2);
}
.foot__langs{display:flex;flex-wrap:wrap;gap:.1rem .75rem;min-width:0}
.foot__langs span::before{content:"#";color:var(--accent)}
.foot__year{flex-shrink:0}

@media (max-width:520px){
  .item{grid-template-columns:1fr}
  .item__lang{grid-row:1;justify-self:start}
  .item__desc{font-size:.78125rem}
  .sheet{gap:1.25rem}
}

@media (prefers-reduced-motion:reduce){
  *{transition-duration:.01ms!important;animation-duration:.01ms!important}
}