/* Arthur Santos — portfolio. Plain CSS, no build step. */

@view-transition { navigation: auto; }

:root {
  --bg: #0b1220;
  --text: #94a3b8;
  --strong: #e2e8f0;
  --muted: #64748b;
  --accent: #7cc4ff;
  --accent-bg: rgb(124 196 255 / .1);
  --card-hover: rgb(148 163 184 / .06);
  --line: rgb(148 163 184 / .15);
  --radius: 8px;
  --gutter: clamp(1.5rem, 5vw, 6rem);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--strong); text-decoration: none; transition: color .15s; }
a:hover, a:focus-visible { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
strong { color: var(--strong); font-weight: 500; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 22px; height: 22px; fill: currentColor; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--bg); padding: .5rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; color: var(--bg); }

/* soft light that follows the pointer (set by site.js); invisible on touch devices */
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px at var(--x, 50%) var(--y, -20%), rgb(29 78 216 / .14), transparent 80%);
}

/* basketball court overlay (assets/js/ball.js): drawn behind the content, never blocks clicks */
.court { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.over-ball, .over-ball * { cursor: grab !important; }
.dragging-ball, .dragging-ball * { cursor: grabbing !important; user-select: none; }
.over-button, .over-button * { cursor: pointer !important; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin-inline: auto;
  padding: 3rem var(--gutter);
}

/* ---------- side column ---------- */
.side h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; color: var(--strong); }
.side h1 a { color: inherit; }
.role { margin: .75rem 0 0; font-size: 1.25rem; font-weight: 500; color: var(--strong); }
.tagline { max-width: 20rem; margin: 1rem 0 0; }

.nav { display: none; }
.nav ul { margin-top: 4rem; }
.nav a {
  display: inline-flex; align-items: center; gap: 1rem; padding: .6rem 0;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.nav a::before {
  content: ""; width: 2rem; height: 1px; background: currentColor; transition: width .2s, background .2s;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--strong); }
.nav a:hover::before, .nav a[aria-current="true"]::before { width: 4rem; }

.social { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.social a { color: var(--text); display: block; }
.social a:hover { color: var(--strong); }
.resume-link { font-size: .85rem; font-weight: 600; }

/* ---------- content ---------- */
.content section { margin-bottom: 6rem; scroll-margin-top: 4rem; }
.content p { margin: 0 0 1rem; }

/* section titles stick on small screens, where there is no side nav */
.sticky-title {
  position: sticky; top: 0; z-index: 2;
  margin: 0 calc(-1 * var(--gutter)) 1rem; padding: 1.25rem var(--gutter);
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--strong);
  background: rgb(11 18 32 / .75); backdrop-filter: blur(8px);
}

.cards { display: grid; gap: 3rem; }

.card { position: relative; display: grid; gap: .5rem; transition: opacity .2s; }
.card h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 500; line-height: 1.35; color: var(--strong); }
.card p { font-size: .9rem; }
.when { margin: .2rem 0 0 !important; font-size: .75rem !important; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.bullets { margin: 0 0 1rem; font-size: .9rem; }
.bullets li { position: relative; padding-left: 1rem; margin-bottom: .35rem; }
.bullets li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  padding: .25rem .75rem; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent); font-size: .75rem; font-weight: 500; line-height: 1.5;
}
.tags-lg li { font-size: .8rem; }

.project img {
  width: 100%; max-width: 220px; aspect-ratio: 4 / 3; object-fit: cover;
  border: 2px solid var(--line); border-radius: 6px; transition: border-color .2s;
}
.project h3 a span { display: inline-block; transition: transform .2s; }
.project:hover h3 a span { transform: translate(2px, -2px); }

.more { margin-top: 3rem; }
.more a { display: inline-flex; gap: .5rem; font-weight: 600; }
.more a span { transition: transform .2s; }
.more a:hover span { transform: translateX(4px); }

.content .langs { margin-top: 1rem; font-size: .85rem; }
.foot { font-size: .8rem; color: var(--muted); max-width: 28rem; padding-bottom: 2rem; }
.foot a { color: var(--text); }

/* ---------- archive page ---------- */
.archive { max-width: 1100px; margin-inline: auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
.back { display: inline-flex; gap: .5rem; font-weight: 600; color: var(--accent); }
.archive h1 { margin: .5rem 0 3rem; font-size: clamp(2.25rem, 5vw, 3rem); color: var(--strong); letter-spacing: -.02em; }
.archive table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.archive th { padding: 0 1rem .75rem 0; font-size: .8rem; font-weight: 600; color: var(--strong); border-bottom: 1px solid var(--line); }
.archive td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.archive td.year { width: 4rem; color: var(--muted); }
.archive td.name { font-weight: 600; color: var(--strong); }
.archive td.name img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); margin: 0 1rem .5rem 0; }
.archive td a { white-space: nowrap; }
.archive td.name small { display: block; font-weight: 400; color: var(--text); margin-top: .25rem; max-width: 32rem; }
.archive .hide-sm { display: none; }
.archive tr { transition: background .15s; }
.archive tbody tr:hover { background: var(--card-hover); }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  .card { grid-template-columns: 8rem 1fr; gap: 1.5rem; }
  .project { grid-template-columns: 9rem 1fr; }
  .project img { margin-top: .25rem; }
  .archive .hide-sm { display: table-cell; }
  .archive td.name img { float: left; }
}

@media (min-width: 1024px) {
  .wrap {
    display: grid; grid-template-columns: 1fr 1.15fr; gap: 4rem;
    padding-block: 0;
  }
  .side {
    position: sticky; top: 0; max-height: 100dvh;
    display: flex; flex-direction: column; justify-content: space-between;
    padding-block: 6rem;
  }
  .nav { display: block; }
  .content { padding-block: 6rem; }
  .sticky-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .content section { margin-bottom: 8rem; }
  .content > section > p { font-size: 1.05rem; }

  /* the whole card is a hover surface; siblings dim so the hovered one stands out */
  .card { padding: 1rem; margin: -1rem; border-radius: var(--radius); }
  .card:hover { background: var(--card-hover); box-shadow: inset 0 1px 0 rgb(148 163 184 / .08); }
  .cards:has(.card:hover) .card:not(:hover) { opacity: .5; }
  .card:hover h3, .card:hover h3 a { color: var(--accent); }
  .project:hover img { border-color: rgb(124 196 255 / .4); }
  /* stretch each card's main link over the whole card */
  .card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
