/* ================================================================
   THEME VARIABLES — change these to retheme the entire site
================================================================ */
:root {
  --bg:          #0f1117;
  --surface:     #1a1d27;
  --surface-2:   #22263a;
  --accent:      #6c63ff;
  --accent-2:    #00d4aa;
  --warn:        #f7a841;
  --text:        #e8eaf6;
  --text-muted:  #8b8fa8;
  --border:      #2e3250;
  --font-sans:   'Segoe UI', system-ui, sans-serif;
  --font-mono:   'Cascadia Code', 'Fira Code', monospace;
  --radius:      12px;
  --max-w:       1000px;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Layout ───────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }

/* ── Nav ──────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,17,23,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.nav-logo {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); letter-spacing: -0.5px;
}
.nav-logo .dot { color: var(--accent-2); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav-cta {
  background: var(--accent); color: #fff !important;
  border-radius: 8px; padding: .35rem .9rem !important;
  border-bottom: none !important;
  font-size: .82rem !important;
  transition: opacity .2s, transform .2s !important;
}
.nav-cta:hover { opacity: .85; transform: translateY(-1px); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: none; transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(108,99,255,.55); color: #fff; }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-ghost:hover { background: rgba(108,99,255,.1); }

/* ── Section Headers ──────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--accent-2); letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700; letter-spacing: -0.5px;
}
.section-subtitle { color: var(--text-muted); margin-top: .5rem; font-size: .95rem; }
.section-cta { text-align: center; margin-top: 2.5rem; }
.section-cta a {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent); font-weight: 600; font-size: .9rem;
  border-bottom: 1px solid transparent; transition: border-color .2s, gap .2s;
}
.section-cta a:hover { border-bottom-color: var(--accent); gap: .7rem; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: .25rem .85rem;
  font-size: .78rem; font-family: var(--font-mono); color: var(--text-muted);
}
.badge.accent { border-color: var(--accent); color: var(--accent); }
.badge.green  { border-color: var(--accent-2); color: var(--accent-2); }
.badge.warn   { border-color: var(--warn); color: var(--warn); }

/* ── Page Hero (inner pages) ──────────────────────────────────── */
.page-hero {
  padding: 7rem 0 4rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero-label {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--accent-2); letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: .6rem;
}
.page-hero-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -1px; margin-bottom: .75rem;
}
.page-hero-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ── HOME HERO ────────────────────────────────────────────────── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 62px; position: relative; overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: .82rem;
  color: var(--accent-2); letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: .8rem;
}
.hero-name {
  font-size: clamp(2.6rem, 5.5vw, 4rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -2px; margin-bottom: 1.1rem;
}
.hero-name .hl { color: var(--accent); }
.hero-tagline { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.8rem; max-width: 460px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; }
.avatar-ring { position: relative; width: 270px; height: 270px; }
.avatar-ring::before, .avatar-ring::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid transparent;
}
.avatar-ring::before {
  border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spin 7s linear infinite;
}
.avatar-ring::after {
  border-bottom-color: var(--accent-2); border-left-color: var(--accent-2);
  animation: spin 11s linear infinite reverse; inset: -26px;
}
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface-2); border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 5.5rem; overflow: hidden;
}
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Feature / "What I Build" cards ──────────────────────────── */
#focus { background: var(--surface); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.5rem;
  transition: border-color .2s, transform .2s;
  text-align: center;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-icon { font-size: 2.4rem; margin-bottom: 1rem; }
.feature-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; }
.feature-desc { color: var(--text-muted); font-size: .88rem; line-height: 1.7; }

/* ── CTA Banner ───────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, rgba(108,99,255,.15), rgba(0,212,170,.08));
  border: 1px solid rgba(108,99,255,.3);
  border-radius: calc(var(--radius) * 1.5);
  padding: 3.5rem 2rem; text-align: center; margin: 0 auto;
  max-width: 640px;
}
.cta-banner h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; margin-bottom: .6rem; }
.cta-banner p { color: var(--text-muted); margin-bottom: 1.8rem; }

/* ── Stat Cards ───────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 3rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--accent); font-family: var(--font-mono); }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* ── About Bio ────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 3.5rem; align-items: start;
}
.about-avatar {
  position: sticky; top: 90px;
}
.about-avatar-img {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%; border: 3px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; overflow: hidden; margin-bottom: 1.2rem;
}
.about-avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.about-social { display: flex; flex-direction: column; gap: .6rem; }
.social-link {
  display: flex; align-items: center; gap: .7rem;
  color: var(--text-muted); font-size: .85rem;
  padding: .45rem .7rem; border-radius: 8px;
  border: 1px solid var(--border);
  transition: all .2s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); background: rgba(108,99,255,.06); }
.about-bio p { color: var(--text-muted); margin-bottom: 1.1rem; line-height: 1.85; }
.about-bio p:last-child { margin-bottom: 0; }
.about-bio strong { color: var(--text); }

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 2.2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.65rem; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(108,99,255,.25);
}
.timeline-year {
  font-family: var(--font-mono); font-size: .75rem;
  color: var(--accent-2); margin-bottom: .2rem;
}
.timeline-event { font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.timeline-desc { color: var(--text-muted); font-size: .85rem; }

/* ── Skills Grid ──────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.skill-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  transition: border-color .2s, transform .2s;
}
.skill-group:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-group-title {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; margin-bottom: .9rem; font-size: .92rem;
}
.skill-icon { font-size: 1.25rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-tag {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: .2rem .6rem;
  font-size: .76rem; font-family: var(--font-mono); color: var(--text-muted);
  transition: all .15s;
}
.skill-tag:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ── Project Cards ────────────────────────────────────────────── */
.projects-filter {
  display: flex; justify-content: center; gap: .5rem;
  flex-wrap: wrap; margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .38rem 1.05rem; border-radius: 999px;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: .8rem; cursor: pointer;
  transition: all .2s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(108,99,255,.08);
}
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 1.4rem; }
.project-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.project-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.project-card[hidden] { display: none; }
.project-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: .8rem;
}
.project-icon { font-size: 1.7rem; }
.project-type {
  font-size: .7rem; font-family: var(--font-mono);
  padding: .18rem .55rem; border-radius: 999px; border: 1px solid;
}
.project-type.game   { color: var(--warn);    border-color: var(--warn); }
.project-type.app    { color: var(--accent);   border-color: var(--accent); }
.project-type.oss    { color: var(--accent-2); border-color: var(--accent-2); }
.project-name { font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; }
.project-desc { color: var(--text-muted); font-size: .87rem; flex: 1; line-height: 1.65; margin-bottom: .9rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: .38rem; margin-bottom: 1rem; }
.project-tag {
  font-size: .7rem; font-family: var(--font-mono);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: .14rem .48rem; color: var(--text-muted);
}
.project-links { display: flex; gap: .9rem; margin-top: auto; }
.project-link {
  font-size: .82rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .3rem; transition: color .15s;
}
.project-link:hover { color: var(--accent-2); }

/* ── OSS Cards ────────────────────────────────────────────────── */
.oss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.oss-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  transition: border-color .2s, transform .2s;
}
.oss-card:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.oss-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.oss-repo { font-weight: 700; font-size: .95rem; }
.oss-org { color: var(--text-muted); font-size: .78rem; font-family: var(--font-mono); }
.oss-desc { color: var(--text-muted); font-size: .85rem; line-height: 1.65; margin-bottom: .9rem; }
.oss-meta { display: flex; gap: 1.1rem; }
.oss-stat { font-size: .77rem; color: var(--text-muted); display: flex; align-items: center; gap: .3rem; }
.oss-section-title {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 1.3rem;
  display: flex; align-items: center; gap: .5rem;
}

/* ── Contact Form ─────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.contact-methods { display: flex; flex-direction: column; gap: .9rem; }
.contact-method {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  transition: border-color .2s, transform .2s;
}
.contact-method:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-method-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-method-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .15rem; }
.contact-method-value { font-weight: 600; font-size: .92rem; color: var(--text); }
.contact-method-value a { color: var(--text); }
.contact-method-value a:hover { color: var(--accent); }
.contact-avail {
  background: rgba(0,212,170,.08); border: 1px solid rgba(0,212,170,.3);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.contact-avail-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent-2);
  margin-right: .5rem; animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,170,.4); }
  50% { box-shadow: 0 0 0 5px rgba(0,212,170,0); }
}
.contact-avail-text { color: var(--accent-2); font-size: .85rem; font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .7rem .9rem;
  color: var(--text); font-family: var(--font-sans); font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none; resize: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.form-group textarea { min-height: 130px; }
.form-note { font-size: .78rem; color: var(--text-muted); margin-top: .5rem; }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-family: var(--font-mono); font-weight: 700; font-size: .95rem; color: var(--accent); }
.footer-logo .dot { color: var(--accent-2); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: .82rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: .8rem; color: var(--text-muted); }
.footer-copy span { color: var(--accent); }

/* ── Scroll Reveal ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .hero-grid, .about-grid, .contact-layout { grid-template-columns: 1fr; }
  .hero-visual, .hero-visual { display: none; }
  .about-avatar { position: static; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
