/* style.css — Paul Carter portfolio / CV hub.
   A modern comparison-matrix layout: projects are rows, stack categories are
   columns, each cell shows a value + a muted "why". Reflows to stacked cards
   on mobile. */

:root {
  --bg:         #0d1117;
  --bg-soft:    #11161f;
  --panel:      #161c27;
  --panel-2:    #1b2330;
  --row-hover:  #1f2937;
  --border:     #28313f;
  --text:       #e9edf5;
  --muted:      #9aa6bd;
  --faint:      #6b7689;
  --accent:     #5cc8ff;
  --accent-2:   #8b7bff;
  --shadow:     0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 123, 255, 0.16), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(92, 200, 255, 0.12), transparent 55%),
    var(--bg);
  line-height: 1.5;
}

/* ===================== HERO ===================== */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1.5rem;
  text-align: center;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.hero h1 {
  margin: 0.6rem auto 0;
  max-width: 24ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #ffffff, #b9c6e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro {
  margin: 1.25rem auto 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.contact {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: #07101b;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(92, 200, 255, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.contact:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(139, 123, 255, 0.35); }

/* ===================== MAIN ===================== */
main {
  max-width: 1240px;   /* a touch wider to give the 7-column table room */
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

/* ----- positioning statement ----- */
.statement {
  text-align: center;
  margin: 1.5rem auto 2.75rem;
  max-width: 760px;
}
.statement > p:first-child {
  margin: 0;
  font-size: clamp(1.3rem, 3.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.statement > p:first-child strong {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.statement-sub {
  margin: 0.9rem auto 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ----- section headings (for tables after the first) ----- */
.section-title {
  margin: 3.25rem 0 0.25rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
}
.section-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* ===================== MATRIX TABLE ===================== */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;        /* keeps rounded corners on the table */
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 0.9rem 1rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.matrix tbody td,
.matrix tbody th {
  padding: 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-weight: 400;
}

.matrix tbody tr:last-child td,
.matrix tbody tr:last-child th { border-bottom: none; }

.matrix tbody tr.project:hover td,
.matrix tbody tr.project:hover th { background: var(--row-hover); }

/* value + why inside each cell */
.val {
  display: block;
  font-weight: 600;
  color: var(--text);
}
.why {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.why code {
  font-size: 0.92em;
  padding: 0.05em 0.35em;
  border-radius: 5px;
  background: var(--panel-2);
  color: #cdd7e8;
}

/* project (row header) cell */
.proj { min-width: 190px; }
.proj-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.proj-sum {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.link.live { color: var(--accent); }
.link.src  { color: var(--accent-2); }
.link:not(.tag):hover { background: var(--panel-2); border-color: currentColor; }

/* non-clickable status tag (e.g. "In development") */
.link.tag {
  color: var(--muted);
  cursor: default;
  border-style: dashed;
}

/* ===================== TILE GRID (main page) ===================== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--panel-2);
}

.tile .proj-name { font-size: 1.08rem; }
.tile-desc {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;                    /* pushes the footer row to the bottom */
}
.tile-foot {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.tile-cta { color: var(--accent); }
.tile:hover .tile-cta { text-decoration: underline; }

/* status chip on a tile (tiles are one big link, so chips aren't links) */
.chip {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chip.live { color: #6ee7a8; border-color: rgba(110, 231, 168, 0.35); }
.chip.dev  { border-style: dashed; }

/* deep-dive tiles: accent-named topic cards */
.tile.topic .proj-name {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== SUB-PAGES ===================== */
.hero.sub { padding-top: 3rem; }

.backlink {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.backlink:hover { color: var(--accent); }

/* live-link button variant that isn't the loud gradient CTA */
.contact.ghost {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}
.contact.ghost:hover { border-color: var(--accent); box-shadow: none; }

/* "how it's built" fact cards on project pages */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.fact {
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.fact h3 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 600;
}

/* key-feature list on project pages */
.features {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.features li {
  padding: 0.9rem 1.1rem 0.9rem 2.4rem;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.features li::before {
  content: "→";
  position: absolute;
  left: 1rem;
  color: var(--accent);
  font-weight: 700;
}

/* uniqueness callout on project pages */
.callout {
  margin-top: 2.25rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--bg-soft);
}
.callout p { margin: 0.35rem 0 0; color: var(--muted); }
.callout .val { font-size: 1.05rem; }

/* screenshot placeholder on project pages */
.shots {
  margin: 1.25rem 0 0;
  padding: 2.75rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--faint);
  text-align: center;
  font-size: 0.95rem;
}

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  color: var(--faint);
  padding: 1.5rem;
  font-size: 0.85rem;
}
footer a { color: var(--muted); }

/* ===================== RESPONSIVE: reflow to stacked cards ===================== */
@media (max-width: 760px) {
  .table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }
  .matrix, .matrix tbody { display: block; width: 100%; }
  .matrix thead { display: none; }            /* column headers move into each cell */

  .matrix tbody tr.project {
    display: block;
    margin-bottom: 1.25rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .matrix tbody th.proj {
    display: block;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border);
  }

  .matrix tbody td {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.75rem;
    align-items: start;
    border-bottom: 1px solid var(--border);
  }
  .matrix tbody tr.project td:last-child { border-bottom: none; }

  /* the column name as a label in front of each value */
  .matrix tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
    padding-top: 0.15rem;
  }
}
