:root {
  /* Inspired by your palette, but simplified and slightly “TinyThings”-ified */
  --ink: #E7E6F2;
  --muted: rgba(231, 230, 242, 0.75);

  --bg-top: #4A2F78;
  --bg-bottom: #24163E;

  --card: rgba(10, 6, 22, 0.40);
  --card-strong: rgba(10, 6, 22, 0.55);

  --border: rgba(245, 192, 66, 0.30);

  --accent: #F5C042;          /* yellow */
  --accent-ink: #4D1ED8;      /* purple text on yellow */
  --shadow: rgba(0, 0, 0, 0.55);

  --radius: 18px;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Georgia", serif;
}

html {
  height: 100%;
  background: var(--bg-top);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;

  background: radial-gradient(circle at 18% 10%, rgba(245, 192, 66, 0.10), transparent 45%),
              radial-gradient(circle at 78% 70%, rgba(90, 30, 255, 0.18), transparent 55%),
              linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

.wrap {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

/* Links (fun but controlled) */
a {
  /* default link radius (override per component when needed) */
  --link-radius: 10px;

  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
  border-bottom: 3px solid rgba(245, 192, 66, 0.65);

  /* give the hover background room + rounding */
  padding: 0 6px;
  display: inline-block;
  border-radius: var(--link-radius);

  position: relative;
  top: 0;
  transition: top 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-color: transparent;

  /* uses the same radius as whatever set --link-radius */
  border-radius: var(--link-radius);

  top: -2px;
  box-shadow: 3px 3px 0 rgba(90, 30, 240, 0.95);
}

/* Header */
.site-header {
  padding: 26px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  padding: 6px 8px;
  border-radius: 12px;
}

.brand:hover {
  top: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(245, 192, 66, 0.16);
  border: 1px solid rgba(245, 192, 66, 0.35);
  color: var(--accent);
  font-weight: 900;
}

.brand-name {
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.nav a {
  --link-radius: 10px;
  border-bottom: none;
  color: var(--ink);
  opacity: 0.85;
  margin-left: 14px;
  padding: 6px 8px;
  border-radius: 10px;
}

/* Make header nav readable on hover (same text colour feel as "Top") */
.nav a:hover {
  opacity: 1;
  top: -2px;
  box-shadow: 4px 4px 0 rgba(60, 9, 108, 0.85);

  /* override global link hover colours for readability */
  background: rgba(245, 192, 66, 0.18);
  color: var(--ink);
  border-bottom-color: transparent;
}

/* Hero */
.hero {
  margin-top: 10px;
  margin-bottom: 32px;
  padding: 18px;
  border-radius: calc(var(--radius) + 8px);
  background: rgba(10, 6, 22, 0.25);
  border: 1px solid rgba(245, 192, 66, 0.22);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(6px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 26px;
  align-items: start;
}

.portrait-wrap {
  display: flex;
  justify-content: center;
}

.portrait {
  width: 170px;
  height: 170px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 8px 8px 0 rgba(90, 30, 240, 0.95);
  background: rgba(255,255,255,0.08);
}

.hero-copy h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 8px 0 12px;
}

.hero-copy p {
  margin: 10px 0;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-copy strong {
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tiny-line {
  margin-top: 14px;
  color: rgba(231, 230, 242, 0.70);
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 192, 66, 0.18);
  border: 1px solid rgba(245, 192, 66, 0.35);
  color: var(--accent);
}

/* Sections */
.section {
  margin: 34px 0 46px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.subtle {
  margin: 0 0 18px;
  color: rgba(231, 230, 242, 0.75);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  background: var(--card);
  border: 1px solid rgba(245, 192, 66, 0.22);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.card.featured {
  background: var(--card-strong);
  border-color: rgba(245, 192, 66, 0.35);
}

.card-top {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 192, 66, 0.16);
  border: 1px solid rgba(245, 192, 66, 0.30);
  color: var(--accent);
}

.pill.ghost {
  background: rgba(231, 230, 242, 0.10);
  border-color: rgba(231, 230, 242, 0.16);
  color: rgba(231, 230, 242, 0.78);
}

.card-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.card-title a {
  --link-radius: 0px;
  border-bottom: none;
  padding: 0;
}

.card-title a:hover {
  background: transparent;
  box-shadow: none;
  top: 0;
  color: var(--accent);
}

.card-desc {
  margin: 0 0 14px;
  color: rgba(231, 230, 242, 0.78);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  /* Make button links use button rounding, not generic link rounding */
  --link-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border-radius: 12px;
  border: 1px solid rgba(245, 192, 66, 0.28);

  padding: 10px 12px;
  font-weight: 800;
  border-bottom: none;

  background: rgba(231, 230, 242, 0.10);
  color: var(--ink);

  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Ensure buttons never become hard-edge from any inherited/competing rule */
.btn:hover {
  transform: translateY(-2px);
  top: 0; /* prevent link hover lift */

  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);

  /* Default hover look (overridden by .primary / .secondary below) */
  background: rgba(245, 192, 66, 0.18);
  color: var(--ink);
  border-bottom-color: transparent;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(245, 192, 66, 0.75);
}

.btn.primary:hover {
  background: rgba(245, 192, 66, 0.92);
  color: var(--accent-ink);
}

/* Make secondary buttons (Browse the things / My personal site / Info for schools)
   hover like the primary highlighted button: yellow bg + purple text */
.btn.secondary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(245, 192, 66, 0.75);
}

.btn.small {
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 0.95rem;
  --link-radius: 11px;
}

.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(231, 230, 242, 0.08);
  border-color: rgba(231, 230, 242, 0.18);
  box-shadow: none;
}

/* Link cards */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.link-card {
  --link-radius: var(--radius);
  display: block;
  border-bottom: none;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  background: rgba(231, 230, 242, 0.08);
  border: 1px solid rgba(245, 192, 66, 0.18);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}

.link-card:hover {
  top: -2px;
  background: rgba(245, 192, 66, 0.14);
  box-shadow: 10px 10px 0 rgba(90, 30, 240, 0.95);

  /* keep text readable on this hover (don’t inherit purple-on-yellow behaviour) */
  color: var(--ink);
}

.link-title {
  display: block;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 4px;
}

.link-desc {
  display: block;
  color: rgba(231, 230, 242, 0.75);
  font-weight: 650;
}

.fineprint {
  margin-top: 14px;
  color: rgba(231, 230, 242, 0.70);
}

/* Footer */
.site-footer {
  margin-top: 50px;
  padding: 26px 0 36px;
  border-top: 1px solid rgba(245, 192, 66, 0.12);
  color: rgba(231, 230, 242, 0.70);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.dot {
  opacity: 0.6;
}

.footer-right a {
  border-bottom: none;
  opacity: 0.85;
  color: var(--ink);
}

/* Keep "Top" readable on hover (and match header hover text colour intent) */
.footer-right a:hover {
  opacity: 1;
  top: 0;
  box-shadow: none;

  background: rgba(245, 192, 66, 0.18);
  color: var(--ink);
  border-bottom-color: transparent;
}

/* Responsive */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav a {
    margin-left: 0;
    margin-right: 10px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .portrait {
    width: 150px;
    height: 150px;
  }
}