/* ═══════════════════════════════════════════════════════════
   style.css — zurai02.github.io  (enhanced)
   ═══════════════════════════════════════════════════════════ */

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

/* ── Tokens ── */
:root {
  --bg:        #07090e;
  --bg-card:   #0d1219;
  --bg-card2:  #111820;
  --border:    #1a2130;
  --border-hi: #263040;
  --text:      #eaf1fa;
  --muted:     #6e7e94;
  --accent:    #ff6b35;
  --accent-hi: #ff9560;
  --accent2:   #4493f8;
  --luau:      #a78bfa;
  --success:   #3fb950;
  --warn:      #e3b341;
  --radius:    14px;
  --radius-sm: 8px;
  --nav-h:     60px;
  --max-w:     960px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px; line-height: 1.65;
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ SCROLL PROGRESS BAR ════════════════════════════════════ */
#scroll-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--luau));
  transition: width .08s linear;
  box-shadow: 0 0 8px var(--accent);
}

/* ═══ CANVAS + GLOW ══════════════════════════════════════════ */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
#cursor-glow {
  position: fixed; pointer-events: none; z-index: 1;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,.055) 0%, transparent 65%);
  opacity: 0; will-change: transform;
  transition: opacity .4s;
}

/* ═══ PAGE ════════════════════════════════════════════════════ */
.page { position: relative; z-index: 2; padding-top: var(--nav-h); }

/* ═══ NAV ════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
nav.scrolled {
  background: rgba(7,9,14,.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-color: var(--border);
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: .88rem;
  color: var(--accent); text-decoration: none;
  display: flex; align-items: center; letter-spacing: -.01em;
}
.nav-cursor {
  display: inline-block; width: 2px; height: .9em;
  background: var(--accent); margin-left: 2px;
  animation: blink-c 1.1s step-end infinite;
}
@keyframes blink-c { 0%,100%{opacity:1} 50%{opacity:0} }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: .8rem; font-weight: 500;
  transition: color .15s; position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content:''; position:absolute; left:0; bottom:0;
  width:0; height:1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transition: width .22s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── Hamburger ── */
#nav-hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 4px; z-index: 201;
}
#nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s, opacity .25s, background .2s;
}
#nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--accent); }
#nav-hamburger.open span:nth-child(2) { opacity: 0; }
#nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--accent); }

/* ═══ HERO ════════════════════════════════════════════════════ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--max-w); margin: 0 auto;
  padding: 4rem clamp(1.25rem, 5vw, 2rem) 7rem;
  position: relative;
}
.hero-glow {
  position: absolute; top: -10rem; left: -16rem;
  width: 750px; height: 750px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,.055) 0%, transparent 65%);
  pointer-events: none; animation: glow-pulse 6s ease-in-out infinite;
}
.hero-glow2 {
  position: absolute; top: -6rem; right: -12rem;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(68,147,248,.04) 0%, transparent 65%);
  pointer-events: none; animation: glow-pulse 8s ease-in-out infinite reverse;
}
@keyframes glow-pulse {
  0%,100%{opacity:.8;transform:scale(1)}
  50%{opacity:1;transform:scale(1.05)}
}
@keyframes fu {
  from{opacity:0;transform:translateY(22px)}
  to{opacity:1;transform:translateY(0)}
}

.status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .7rem; color: var(--success); font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  background: rgba(63,185,80,.07); border: 1px solid rgba(63,185,80,.17);
  padding: .3rem .85rem; border-radius: 20px; width: fit-content;
  margin-bottom: 1.75rem;
  opacity: 0; animation: fu .5s .05s forwards;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 7px var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.6);opacity:.5} }

.hero-eyebrow {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: .74rem; font-weight: 600; color: var(--muted);
  margin-bottom: 1rem; opacity: 0; animation: fu .5s .15s forwards;
}
.tag-lang {
  background: rgba(167,139,250,.09); border: 1px solid rgba(167,139,250,.22);
  color: var(--luau); padding: .12rem .52rem; border-radius: 5px; font-size: .67rem;
}

.hero h1 {
  font-size: clamp(3.2rem, 8.5vw, 5.8rem);
  font-weight: 900; line-height: 1.02;
  letter-spacing: -.048em; margin-bottom: .35rem;
  opacity: 0; animation: fu .6s .25s forwards;
}
.hero h1 .handle { position: relative; display: inline-block; color: var(--accent); }
.hero h1 .handle::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi), transparent);
  border-radius: 2px;
  animation: ul-in 1.1s cubic-bezier(.22,1,.36,1) .8s both;
}
@keyframes ul-in { from{transform:scaleX(0);transform-origin:left;opacity:0} to{transform:scaleX(1);transform-origin:left;opacity:1} }

.hero-sub {
  font-size: clamp(.92rem, 2vw, 1.08rem); color: var(--muted);
  max-width: 580px; margin: 1.65rem 0 2.5rem; line-height: 1.95; min-height: 4em;
  opacity: 0; animation: fu .6s .35s forwards;
}
.tw-cur {
  display: inline-block; width: 2px; height: .95em;
  background: var(--accent); margin-left: 2px; vertical-align: middle;
  animation: blink-c .85s step-end infinite;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: .7rem;
  opacity: 0; animation: fu .6s .45s forwards;
}
.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: var(--border-hi); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  animation: fu .5s 1.1s both;
}
.scroll-hint .sh-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: sh-drop 2s ease-in-out infinite;
}
@keyframes sh-drop {
  0%  {transform:scaleY(0);transform-origin:top;opacity:1}
  55% {transform:scaleY(1);transform-origin:top}
  100%{transform:scaleY(1);transform-origin:bottom;opacity:0}
}

/* ═══ BUTTONS ════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .42rem;
  padding: .6rem 1.25rem; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  position: relative; overflow: hidden; letter-spacing: .01em;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
}
.btn::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent);
  opacity:0; transition:opacity .18s;
}
.btn:hover::before { opacity:1; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 10px 32px rgba(255,107,53,.5); }
.btn-ghost { background:rgba(255,255,255,.03); color:var(--text); border-color:var(--border-hi); }
.btn-ghost:hover { border-color:var(--muted); transform:translateY(-1px); }
.btn-discord { background:rgba(88,101,242,.1); color:#9baee8; border-color:rgba(88,101,242,.22); }
.btn-discord:hover { background:rgba(88,101,242,.18); color:#c4d0ff; border-color:rgba(88,101,242,.45); transform:translateY(-1px); }
#discord-btn.copied { color:var(--success)!important; border-color:rgba(63,185,80,.4)!important; background:rgba(63,185,80,.09)!important; }

/* ═══ DIVIDER ════════════════════════════════════════════════ */
.divider { max-width:var(--max-w); margin:0 auto; border:none; border-top:1px solid var(--border); }

/* ═══ SECTIONS ═══════════════════════════════════════════════ */
section { max-width:var(--max-w); margin:0 auto; padding:5rem clamp(1.25rem,5vw,2rem); }

.reveal { opacity:0; transform:translateY(20px); transition:opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }
.rd1{transition-delay:.06s} .rd2{transition-delay:.12s} .rd3{transition-delay:.18s} .rd4{transition-delay:.24s}

.section-label {
  font-family:'JetBrains Mono',monospace;
  font-size:.65rem; font-weight:700;
  letter-spacing:.18em; text-transform:uppercase;
  color:var(--accent); margin-bottom:.85rem;
  display:flex; align-items:center; gap:.6rem;
}
.section-label::after { content:''; flex:1; height:1px; max-width:100px; background:linear-gradient(90deg,var(--border-hi),transparent); }

.section-title { font-size:clamp(1.6rem,3.5vw,2.2rem); font-weight:800; letter-spacing:-.03em; margin-bottom:.5rem; line-height:1.15; }
.section-sub { color:var(--muted); font-size:.88rem; max-width:520px; margin-bottom:2.25rem; line-height:1.9; }

/* ═══ SKILL CARDS ════════════════════════════════════════════ */
.skill-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:1rem; }
.skill-card {
  background: rgba(13,18,25,.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius); padding: 1.65rem 1.8rem;
  position: relative; overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: 0 4px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
  transform-style: preserve-3d;
}
.skill-card::before {
  content:''; position:absolute; top:0; left:-100%; width:100%; height:1px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  transition:left .5s;
}
.skill-card::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 50% 0%, rgba(255,107,53,.05) 0%, transparent 60%);
  opacity:0; transition:opacity .3s;
}
.skill-card:hover {
  border-color:rgba(255,107,53,.35);
  box-shadow:0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,107,53,.1), inset 0 1px 0 rgba(255,255,255,.12);
}
.skill-card:hover::before { left:100%; }
.skill-card:hover::after  { opacity:1; }

.skill-num { font-family:'JetBrains Mono',monospace; font-size:.6rem; color:var(--accent); opacity:.5; margin-bottom:.65rem; display:block; letter-spacing:.1em; }
.skill-card h3 { font-size:.95rem; font-weight:700; margin-bottom:.45rem; letter-spacing:-.01em; }
.skill-card p  { font-size:.83rem; color:var(--muted); line-height:1.75; }
.skill-icon {
  width:22px; height:22px; color:var(--accent);
  margin-bottom:.8rem; display:block; opacity:.85;
  transition:opacity .2s, transform .22s, color .2s;
}
.skill-card:hover .skill-icon { opacity:1; transform:scale(1.15) rotate(-5deg); color:var(--accent-hi); }

.stat-row { display:flex; gap:2.5rem; flex-wrap:wrap; margin-top:2.5rem; padding-top:2rem; border-top:1px solid var(--border); }
.stat { display:flex; flex-direction:column; gap:.2rem; }
.stat-val { font-family:'JetBrains Mono',monospace; font-size:2.2rem; font-weight:700; color:var(--accent); line-height:1; }
.stat-lbl { font-size:.7rem; color:var(--muted); letter-spacing:.05em; }

/* ═══ BADGES ═════════════════════════════════════════════════ */
.stack-row { display:flex; flex-wrap:wrap; gap:.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding:.33rem .85rem; border-radius:20px;
  font-size:.75rem; font-weight:600; border:1px solid;
  font-family:'JetBrains Mono',monospace;
  transition:transform .14s, box-shadow .14s, border-color .18s;
  cursor:default; letter-spacing:.01em;
}
.badge:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.5); }
.badge-icon { width:12px; height:12px; flex-shrink:0; }
.b-luau  { background:rgba(167,139,250,.07); border-color:rgba(167,139,250,.2);  color:var(--luau); }
.b-rblx  { background:rgba(255,107,53,.07);  border-color:rgba(255,107,53,.2);   color:var(--accent-hi); }
.b-blue  { background:rgba(68,147,248,.07);  border-color:rgba(68,147,248,.2);   color:var(--accent2); }
.b-green { background:rgba(63,185,80,.07);   border-color:rgba(63,185,80,.2);    color:var(--success); }
.b-luau:hover  { border-color:rgba(167,139,250,.5); box-shadow:0 4px 16px rgba(167,139,250,.15); }
.b-rblx:hover  { border-color:rgba(255,107,53,.5);  box-shadow:0 4px 16px rgba(255,107,53,.15); }
.b-blue:hover  { border-color:rgba(68,147,248,.5);  box-shadow:0 4px 16px rgba(68,147,248,.15); }
.b-green:hover { border-color:rgba(63,185,80,.5);   box-shadow:0 4px 16px rgba(63,185,80,.15); }

/* ═══ VERIFY BLOCK ═══════════════════════════════════════════ */
.verify-block {
  background:rgba(68,147,248,.05); backdrop-filter:blur(16px) saturate(150%);
  border:1px solid rgba(68,147,248,.16); border-left:3px solid var(--accent2);
  border-radius:var(--radius); padding:1.1rem 1.5rem; margin-top:2rem;
  box-shadow:0 4px 20px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04);
}
.verify-block p { font-size:.83rem; color:var(--muted); line-height:1.8; }
.verify-block strong { color:var(--text); font-weight:600; }
.mono { font-family:'JetBrains Mono',monospace; font-size:.79rem; color:var(--accent2); }

/* ═══ LINK CARDS ═════════════════════════════════════════════ */
.link-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:.8rem; }
.link-card {
  display:flex; flex-direction:column; gap:.1rem;
  padding:1.15rem 1.35rem;
  background:rgba(13,18,25,.6);
  backdrop-filter:blur(20px) saturate(170%);
  -webkit-backdrop-filter:blur(20px) saturate(170%);
  border:1px solid rgba(255,255,255,.07); border-radius:var(--radius);
  text-decoration:none; cursor:pointer;
  transition:border-color .2s, transform .2s, box-shadow .2s;
  position:relative; overflow:hidden;
  box-shadow:0 2px 18px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
}
.link-card::before {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(255,107,53,.06),transparent);
  opacity:0; transition:opacity .22s;
}
.link-card::after {
  content:'↗'; position:absolute; top:.9rem; right:1rem;
  font-size:.7rem; color:var(--accent); opacity:0;
  transition:opacity .18s, transform .18s; transform:translate(-4px,4px);
}
.link-card:hover { border-color:rgba(255,107,53,.3); transform:translateY(-3px); box-shadow:0 18px 44px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1); }
.link-card:hover::before { opacity:1; }
.link-card:hover::after  { opacity:1; transform:translate(0,0); }
.link-name  { font-size:.875rem; font-weight:600; color:var(--text); }
.link-label { font-size:.69rem;  color:var(--muted); }
.link-icon  { width:18px; height:18px; color:var(--muted); margin-bottom:.45rem; display:block; transition:color .18s, transform .2s; }
.link-card:hover .link-icon { color:var(--accent); transform:scale(1.15) rotate(-5deg); }

/* ═══ TERMINAL ════════════════════════════════════════════════ */
.tw-wrap { max-width:var(--max-w); margin:0 auto; padding:4.5rem clamp(1.25rem,5vw,2rem) 6rem; }
.tw-terminal {
  background:rgba(5,8,12,.85);
  backdrop-filter:blur(28px) saturate(200%);
  -webkit-backdrop-filter:blur(28px) saturate(200%);
  border:1px solid rgba(255,255,255,.08); border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 36px 90px rgba(0,0,0,.75), 0 0 0 1px rgba(255,107,53,.05), inset 0 1px 0 rgba(255,255,255,.07);
}
.tw-bar {
  display:flex; align-items:center; gap:.45rem;
  padding:.65rem 1rem; background:rgba(8,11,16,.92);
  border-bottom:1px solid var(--border);
}
.tw-dot { width:11px; height:11px; border-radius:50%; }
.tw-bar-title { font-family:'JetBrains Mono',monospace; font-size:.67rem; color:var(--muted); margin-left:.4rem; letter-spacing:.05em; }
.tw-body { padding:1.25rem 1.5rem 1.75rem; min-height:220px; overflow:hidden; }
.tw-line {
  display:flex; align-items:flex-start; gap:.65rem;
  font-family:'JetBrains Mono',monospace; font-size:.79rem;
  line-height:1.8; margin-bottom:.2rem;
  animation:tw-line-in .22s ease both;
}
@keyframes tw-line-in { from{opacity:0;transform:translateX(-6px)} to{opacity:1;transform:translateX(0)} }
.tw-prompt   { color:var(--accent); user-select:none; flex-shrink:0; }
.tw-code     { white-space:pre-wrap; word-break:break-all; flex:1; }
.tw-code.dim { color:var(--muted); }
.tw-active .tw-code { color:var(--text); }
.tw-block-cur { display:inline-block; width:8px; height:1em; background:var(--accent); vertical-align:middle; margin-left:2px; animation:blink-c 1s step-end infinite; }

/* syntax */
.kw{color:#ff7b72} .fn{color:#d2a8ff} .str{color:#a5d6ff} .num{color:#79c0ff} .cm{color:var(--muted);font-style:italic} .op{color:#ffa657}

/* ═══ BACK TO TOP ════════════════════════════════════════════ */
#back-to-top {
  position:fixed; bottom:1.75rem; right:1.75rem; z-index:500;
  width:40px; height:40px; border-radius:50%;
  background:rgba(255,107,53,.12); border:1px solid rgba(255,107,53,.25);
  color:var(--accent); font-size:1rem; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  opacity:0; transform:translateY(10px); pointer-events:none;
  transition:opacity .25s, transform .25s, background .18s, box-shadow .18s;
}
#back-to-top.show { opacity:1; transform:translateY(0); pointer-events:all; }
#back-to-top:hover { background:rgba(255,107,53,.22); box-shadow:0 0 20px rgba(255,107,53,.3); }

/* ═══ FOOTER ══════════════════════════════════════════════════ */
footer { text-align:center; padding:3rem 1rem; color:var(--muted); font-size:.72rem; border-top:1px solid var(--border); letter-spacing:.025em; }
footer a { color:var(--accent); text-decoration:none; transition:color .15s; }
footer a:hover { color:var(--accent-hi); }

/* ═══ TOAST ══════════════════════════════════════════════════ */
#copy-toast {
  position:fixed; bottom:1.6rem; left:50%;
  transform:translateX(-50%) translateY(14px);
  background:rgba(12,18,26,.97); color:var(--success);
  border:1px solid rgba(63,185,80,.25);
  padding:.5rem 1.15rem; border-radius:8px;
  font-size:.79rem; font-weight:600;
  font-family:'JetBrains Mono',monospace;
  white-space:nowrap; opacity:0; pointer-events:none;
  transition:opacity .22s, transform .22s; z-index:999;
  backdrop-filter:blur(16px); box-shadow:0 10px 30px rgba(0,0,0,.55);
}
#copy-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ═══ RESPONSIVE ═════════════════════════════════════════════ */
@media (max-width:640px) {
  #nav-hamburger { display:flex; }
  .nav-links {
    display:none; position:fixed; top:var(--nav-h); left:0; right:0;
    flex-direction:column; gap:0;
    background:rgba(7,9,14,.98); backdrop-filter:blur(24px);
    border-bottom:1px solid var(--border);
    padding:.75rem 0; z-index:199;
  }
  .nav-links.mobile-open { display:flex; }
  .nav-links li a { display:block; padding:.75rem 2rem; font-size:.9rem; }
  #cursor-glow { display:none; }
  .skill-grid { grid-template-columns:1fr; }
  .hero h1 { letter-spacing:-.035em; }
  #back-to-top { bottom:1rem; right:1rem; }
}

@media (prefers-reduced-motion:reduce) {
  .reveal { opacity:1; transform:none; transition:none; }
  .hero h1 .handle::after { animation:none; opacity:1; transform:scaleX(1); }
  .status-dot, .scroll-hint .sh-line, .nav-cursor,
  .tw-line, .tw-block-cur, .hero-glow, .hero-glow2 { animation:none; }
}
