/* ========================
   Global & Font
======================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

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

:root {
  --bg-primary: #0c0c0e;
  --bg-secondary: #131316;
  --bg-card: rgba(255,255,255,0.03);
  --text-primary: #f0f0f2;
  --text-secondary: #a8a8b8;
  --text-muted: #5a5a72;
  --border-subtle: rgba(255,255,255,0.07);
  --accent: #ff5201;
  --accent-yellow: #daff01;
  --accent-hover: #e6471e;
  --card-radius: 18px;
  --card-padding: 28px;
  --font-display: 'Inter', sans-serif;
  --font-mono: 'Inter', sans-serif;
}

body {
  font-family: var(--font-display);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(255,82,1,0.09), transparent),
    radial-gradient(ellipse 55% 40% at 85% 5%, rgba(255,255,255,0.03), transparent),
    radial-gradient(ellipse 50% 35% at 80% 100%, rgba(218,255,1,0.04), transparent),
    radial-gradient(ellipse 40% 30% at 10% 90%, rgba(255,82,1,0.04), transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: auto, auto, auto, auto, 220px 220px;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  cursor: none;
}

a { text-decoration: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Cursor */
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(255,82,1,0.5); border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 48px; height: 48px; border-color: var(--accent);
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 40px; height: 64px;
  display: flex; align-items: center;
  background: rgba(12,12,14,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  animation: slideDown 0.6s ease both;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.nav-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 16px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; }
.nav-logo-dot { color: var(--accent); }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 12px; font-weight: 500; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
section { padding: 120px 0; }

/* Reveal animations */
.reveal {
  opacity: 0; transform: translateY(30px);
  animation: revealUp 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
.reveal-delay-1 { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.30s; }
.reveal-delay-3 { animation-delay: 0.45s; }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

.fade-in {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Section headings */
.section-tag {
  font-size: 11px; font-weight: 600; color: var(--accent);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 16px; opacity: 0.85;
}
.section-tag.center { text-align: center; }
.section-title {
  font-size: clamp(36px,5vw,58px); font-weight: 900;
  text-align: center; margin-bottom: 16px;
  line-height: 1.1; letter-spacing: -1px;
}
.section-title.text-left { text-align: left; }
.title-outline { -webkit-text-stroke: 1.5px var(--text-primary); color: transparent; }
.section-subtitle {
  font-size: 15px; color: var(--text-muted);
  text-align: center; margin-bottom: 64px;
}

/* Hero */
.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; position: relative;
  padding-top: 64px; overflow: hidden;
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.11) 1px, transparent 1px);
  background-size: 40px 40px; background-position: center;
  mask-image: radial-gradient(ellipse 65% 65% at center, black 30%, transparent 100%);
  pointer-events: none;
}
.hero-content { width: 100%; text-align: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 32px; letter-spacing: 0.5px;
}
.badge-dot {
  width: 7px; height: 7px; background: #22c55e; border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.hero-title {
  font-size: clamp(52px,9vw,110px); font-weight: 900;
  line-height: 1; letter-spacing: -3px; margin-bottom: 28px;
}
.hero-subtitle {
  font-size: 16px; color: var(--text-secondary);
  margin-bottom: 48px; max-width: 500px;
  margin-left: auto; margin-right: auto; line-height: 1.7;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.hero-stats {
  display: inline-flex; align-items: center; gap: 40px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 20px 40px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 24px; font-weight: 900; }
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.stat-div { width: 1px; height: 36px; background: var(--border-subtle); }
.hero-scroll-hint {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); animation: fadeInUp 1s 1s both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 1.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(0.5); opacity: 0.4; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px; padding: 16px 32px;
  font-size: 15px; font-weight: 700; font-family: var(--font-display);
  cursor: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}
.btn-primary:hover {
  background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255,82,1,0.35);
}
.btn-primary svg { transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text-primary);
  border: 1.5px solid rgba(255,255,255,0.15); border-radius: 10px;
  padding: 14px 30px; font-size: 15px; font-weight: 700;
  font-family: var(--font-display); cursor: none;
  transition: border-color 0.25s, color 0.25s, transform 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* About */
.about-section { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-right .about-description { font-size: 16px; color: var(--text-secondary); line-height: 1.85; margin-bottom: 20px; }
.about-tech-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.about-tech-strip span {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid var(--border-subtle); border-radius: 6px;
  color: var(--text-muted); transition: border-color 0.2s, color 0.2s;
}
.about-tech-strip span:hover { border-color: var(--accent); color: var(--accent); }

/* Projects */
.projects-filters { display: flex; justify-content: center; gap: 12px; margin-bottom: 56px; flex-wrap: wrap; }
.filter-btn {
  background: transparent; border: 1px solid var(--border-subtle);
  color: var(--text-muted); padding: 9px 22px; border-radius: 8px;
  cursor: none; font-weight: 700; font-size: 13px; letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: rgba(255,82,1,0.1); color: var(--accent); border-color: var(--accent);
}
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 24px; }

.project-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius); padding: var(--card-padding);
  display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), border-color 0.3s, box-shadow 0.3s;
  animation: cardIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
  overflow: hidden; position: relative;
}
.project-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,82,1,0.04), transparent 60%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
  border-radius: var(--card-radius);
}
.project-card:hover::before { opacity: 1; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.project-card:hover {
  border-color: rgba(255,82,1,0.4); transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,82,1,0.08);
}
.project-content { flex: 1; display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.project-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.3; }
.project-description { font-size: 14px; color: var(--text-secondary); line-height: 1.7; flex: 1; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.project-tag {
  background: rgba(255,82,1,0.08); color: var(--accent);
  padding: 5px 10px; border-radius: 6px; font-size: 11px;
  display: flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,82,1,0.15); white-space: nowrap;
}
.tag-icon { font-size: 12px; }
.project-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-subtle); padding: 11px 20px; border-radius: 10px;
  font-weight: 700; font-size: 13px; cursor: none; text-decoration: none;
  width: 100%; margin-top: auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.project-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ========================
   Game Jams Section
======================== */
.jams-section {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.jams-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
}

.jam-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 26px 36px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s ease;
  position: relative;
}

.jam-row:last-child { border-bottom: none; }

/* Accent left bar */
.jam-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.jam-row:hover { background: rgba(255,82,1,0.03); }
.jam-row:hover::before { opacity: 1; }

.jam-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.jam-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.jam-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.jam-theme {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.jam-theme-quote { color: var(--accent); font-weight: 700; }

.jam-game {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.jam-game-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--border-subtle); flex-shrink: 0;
}

.jam-game-arrow { color: var(--accent); font-style: normal; }

.jam-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.jam-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 14px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.jam-link:hover {
  color: var(--accent);
  border-color: rgba(255,82,1,0.35);
  background: rgba(255,82,1,0.06);
  transform: translateY(-1px);
}

.jam-link-arrow {
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.jam-link:hover .jam-link-arrow {
  opacity: 1;
  transform: translate(2px,-1px);
}

/* Skills */
.skills-grid {
  display: flex; flex-direction: column;
  max-width: 960px; margin: 0 auto;
  border: 1px solid var(--border-subtle); border-radius: 24px; overflow: hidden;
}
.skill-group {
  display: grid; grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}
.skill-group:last-child { border-bottom: none; }
.skill-group:hover { background: rgba(255,255,255,0.015); }
.skill-group-header {
  padding: 28px 32px; border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.skill-group-title { font-size: 14px; font-weight: 800; letter-spacing: 0.5px; }
.skill-group-subtitle { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; }
.skill-chip-wrapper { padding: 20px 28px; display: flex; flex-wrap: wrap; gap: 10px; align-content: center; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  cursor: default; position: relative; overflow: hidden;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.skill-chip::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0; background: var(--accent);
  transition: width 0.3s; border-radius: 0 0 2px 2px;
}
.skill-chip:hover::after { width: 100%; }
.skill-chip:hover { background: rgba(255,82,1,0.06); border-color: rgba(255,82,1,0.2); transform: translateY(-2px); }
.skill-chip-icon { font-size: 15px; line-height: 1; }
.skill-chip-name { font-size: 13px; font-weight: 700; white-space: nowrap; }
.skill-chip-tier { font-size: 10px; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.5px; font-weight: 400; }
.tier-expert   { background: rgba(255,82,1,0.15);  color: var(--accent);        border: 1px solid rgba(255,82,1,0.3); }
.tier-advanced { background: rgba(218,255,1,0.08); color: var(--accent-yellow); border: 1px solid rgba(218,255,1,0.2); }
.tier-intermediate { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.1); }
.tier-basic    { background: transparent; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.06); }

/* Contact */
.social-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.social-link {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 14px;
  padding: 28px 20px; text-align: center; font-weight: 700; font-size: 14px; display: block; letter-spacing: 0.5px;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.social-link:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(255,82,1,0.07); transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(255,82,1,0.15);
}

/* Footer */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-subtle);
  padding: 40px 24px; text-align: center; color: var(--text-muted); font-size: 13px;
}
.footer-dot { color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .section-title.text-left { text-align: center; }
  .section-tag:not(.center) { text-align: center; }
  .skill-group { grid-template-columns: 1fr; }
  .skill-group-header { border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 20px 24px 16px; }
  .skill-chip-wrapper { padding: 16px 24px; }
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .nav { padding: 0 24px; }
  .nav-links { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; padding: 16px 24px; }
  .social-links { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .jam-row { grid-template-columns: 1fr; gap: 12px; padding: 20px 24px; }
  .jam-right { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .hero-title { letter-spacing: -2px; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .social-links { grid-template-columns: 1fr; }
  .skills-grid { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}