/* ============================================================
   Cameo Construct — Korbin Sadlowski
   A galaxy, but man-made. Deep void, engineered structure,
   the nine-marked amulet ring. Monochrome starlight.
   Display: Cormorant Garamond · Body: system sans · Data: JetBrains Mono
   ============================================================ */

:root {
  color-scheme: dark;

  --void:    #080706;
  --void-2:  #0f0c0a;
  --panel:   rgba(224, 210, 196, 0.035);
  --panel-2: rgba(224, 210, 196, 0.07);
  --star:    #f2efe9;
  --muted:   #969db2;
  --faint:   #596074;
  --line:    rgba(198, 190, 180, 0.12);
  --line-2:  rgba(210, 190, 170, 0.24);
  --glow:    #e0924e;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1060px;
  --gutter: clamp(20px, 5vw, 46px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--void);
  color: var(--star);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint forge-light and ash haze, heavily desaturated */
  background-image:
    radial-gradient(58% 44% at 82% 92%, rgba(224, 146, 78, 0.11), transparent 60%),
    radial-gradient(55% 50% at 10% 8%, rgba(150, 140, 132, 0.07), transparent 62%),
    radial-gradient(45% 40% at 50% 55%, rgba(120, 96, 74, 0.05), transparent 72%);
  background-attachment: fixed;
}

/* starfield canvas sits behind everything */
#stars {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* engineered frame — the "man-made" structure over the void */
.frame {
  position: fixed; inset: 16px; z-index: 1;
  pointer-events: none;
  border: 1px solid var(--line);
}
.frame::before, .frame::after {
  content: ""; position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--line-2);
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
@media (max-width: 640px) { .frame { display: none; } }

.page { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.rule { height: 1px; background: var(--line); border: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--glow);
}

/* =====================  HEADER  ===================== */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--void) 70%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; height: 66px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600; font-size: 1.5rem; letter-spacing: 0.01em;
  color: var(--star);
}
.wordmark .amp { color: var(--glow); font-style: italic; }
.site-nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.site-nav a {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--glow); }

/* =====================  HERO  ===================== */
.hero { padding: clamp(44px, 7vw, 78px) 0 clamp(28px, 5vw, 52px); position: relative; }
.hero .wrap { position: relative; }

/* the nine-marked amulet ring */
.amulet {
  position: absolute; top: -8px; right: 0;
  width: clamp(120px, 20vw, 190px); height: clamp(120px, 20vw, 190px);
  opacity: 0.5;
  animation: spin 90s linear infinite;
}
.amulet circle, .amulet line { stroke: var(--glow); fill: none; }
@media (max-width: 760px) { .amulet { opacity: 0.28; top: -40px; right: -20px; } }

.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.hero .eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--glow); opacity: 0.6;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400; font-size: clamp(2.5rem, 6.5vw, 4.6rem);
  line-height: 1.05; letter-spacing: 0;
  text-wrap: balance; max-width: 16ch;
  color: var(--star);
}
.hero h1 em {
  font-style: italic; font-weight: 500; color: var(--glow);
  text-shadow: 0 0 34px rgba(188, 200, 236, 0.35);
}
.hero .lede {
  margin-top: 30px; max-width: 52ch;
  font-size: clamp(1.06rem, 2vw, 1.26rem); color: var(--muted); line-height: 1.62;
}

/* =====================  SECTION HEADS  ===================== */
.section { padding: clamp(48px, 8vw, 92px) 0; }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  margin-bottom: 36px;
}
.sec-head h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 2rem; letter-spacing: 0.005em; color: var(--star);
}
.sec-head .meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* =====================  PROJECT CARDS  ===================== */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px;
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}
.card::after {
  /* a faint starlight sheen that ignites on hover */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, rgba(224,146,78,0.08), transparent 55%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--panel-2);
}
.card:hover::after { opacity: 1; }
.card .kicker {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--glow); margin-bottom: 16px;
}
.card h3 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.9rem; line-height: 1.08; letter-spacing: 0.005em; margin-bottom: 10px;
  color: var(--star);
}
.card p { color: var(--muted); font-size: 0.97rem; line-height: 1.58; flex: 1; position: relative; }
.card .go {
  margin-top: 24px; align-self: flex-start; position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--glow);
}
.card .go .arw { transition: transform 0.2s ease; }
.card:hover .go .arw { transform: translateX(4px); }
.card.soon { background: transparent; border-style: dashed; }
.card.soon .kicker { color: var(--faint); }
.card.soon h3 { color: var(--muted); }

/* =====================  PROJECT LIST (lines across)  ===================== */
.proj-list { border-top: 1px solid var(--line-2); }
.proj {
  display: block; color: inherit;
  padding: 26px 4px; border-bottom: 1px solid var(--line);
  transition: padding 0.2s ease, background 0.2s ease;
}
.proj:hover { padding-left: 14px; padding-right: 14px; background: var(--panel); }
.proj.soon { pointer-events: none; }
.proj-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.proj-name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; color: var(--star);
  transition: color 0.2s ease;
}
.proj:not(.soon):hover .proj-name { color: var(--glow); }
.proj.soon .proj-name { color: var(--muted); }
.proj-stars {
  font-family: var(--mono); font-size: 0.8rem; color: var(--glow);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  opacity: 0; transition: opacity 0.3s ease;
}
.proj-stars.show { opacity: 1; }
.proj-stars svg { width: 13px; height: 13px; fill: currentColor; }
.proj-about { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.55; max-width: 62ch; }

/* =====================  FOOTER  ===================== */
.site-foot { padding: clamp(44px, 8vw, 80px) 0; }
.site-foot .inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.site-foot .name { font-family: var(--display); font-size: 1.3rem; color: var(--star); }
.site-foot .links { display: flex; gap: 24px; }
.site-foot .links a { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.site-foot .links a:hover { color: var(--glow); }

/* =====================  PROJECT DETAIL  ===================== */
.detail { padding: clamp(52px, 9vw, 104px) 0 clamp(40px, 7vw, 76px); }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 40px; transition: color 0.2s ease;
}
.back:hover { color: var(--glow); }
.detail .eyebrow { display: inline-block; margin-bottom: 18px; }
.detail h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.0; letter-spacing: -0.01em;
  text-wrap: balance; margin-bottom: 22px; color: var(--star);
}
.detail .lede { max-width: 56ch; font-size: 1.2rem; color: var(--muted); }
.actions { margin: 34px 0 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 13px 24px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--star);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { border-color: var(--glow); color: var(--glow); box-shadow: 0 0 24px rgba(224,146,78,0.15); }
.btn.primary { background: var(--glow); border-color: var(--glow); color: #0a0c14; font-weight: 700; }
.btn.primary:hover { background: #cfd8f2; color: #0a0c14; }

.detail .body { margin-top: 54px; max-width: 64ch; }
.detail .body h2 {
  font-family: var(--display); font-weight: 600; font-size: 1.5rem; margin: 40px 0 12px; color: var(--star);
}
.detail .body p { color: var(--muted); margin-bottom: 14px; }
.detail .body ul { list-style: none; display: grid; gap: 10px; margin-top: 4px; }
.detail .body li { position: relative; padding-left: 24px; color: var(--muted); }
.detail .body li::before {
  content: ""; position: absolute; left: 3px; top: 0.6em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px rgba(224,146,78,0.6);
}

/* =====================  MOTION  ===================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: rise 0.75s cubic-bezier(0.2,0.7,0.2,1) forwards; }
.reveal.d1 { animation-delay: 0.06s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.26s; }
.reveal.d4 { animation-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =====================  RESPONSIVE  ===================== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-nav { gap: 15px; }
  .card h3 { font-size: 1.65rem; }
}

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 3px;
}

/* =====================  MEMBER TAG (guns.lol-style profile)  ===================== */
.tag-back {
  position: fixed; top: 80px; left: clamp(16px, 4vw, 40px); z-index: 6;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); transition: color 0.2s ease;
}
.tag-back:hover { color: var(--pf, var(--glow)); }

.tag-wrap { min-height: calc(100vh - 67px); display: grid; place-items: center; padding: 48px 20px; }
.tag-card {
  --pf: var(--glow);
  position: relative; width: min(430px, 100%);
  background: rgba(224, 210, 196, 0.045);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: 44px 34px 30px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 70px -24px var(--pf);
  transition: transform 0.12s ease-out;
  transform-style: preserve-3d;
}
.tag-avatar { position: relative; width: 122px; height: 122px; margin: 0 auto 22px; }
.tag-avatar .pic {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  border: 2px solid var(--pf);
  box-shadow: 0 0 34px -6px var(--pf);
  background: var(--void-2);
  font-family: var(--display); font-size: 2.4rem; color: var(--pf);
}
.tag-avatar .ring { position: absolute; inset: -15px; animation: spin 26s linear infinite; opacity: 0.75; }
.tag-avatar .ring circle, .tag-avatar .ring line { stroke: var(--pf); fill: none; }

.tag-name {
  font-family: var(--display); font-weight: 500; font-size: 2.1rem; line-height: 1.1; color: var(--star);
  text-shadow: 0 0 28px color-mix(in srgb, var(--pf) 42%, transparent);
}
.tag-handle { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); margin-top: 7px; }
.tag-handle b { color: var(--pf); }
.tag-bio { margin-top: 18px; min-height: 1.5em; font-size: 1rem; color: var(--star); }
.tag-bio .cursor { color: var(--pf); font-weight: 700; }

.tag-badges { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.tag-badge {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--pf); background: color-mix(in srgb, var(--pf) 12%, transparent);
}

.tag-socials { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.tag-social {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.tag-social:hover { color: var(--pf); border-color: var(--pf); transform: translateY(-3px); box-shadow: 0 0 20px -4px var(--pf); }
.tag-social svg { width: 19px; height: 19px; fill: currentColor; }

.tag-views {
  margin-top: 26px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--faint); display: inline-flex; align-items: center; gap: 8px;
}
.tag-views svg { width: 13px; height: 13px; fill: currentColor; opacity: 0.7; }
