/* ============================================
   TEIBRITO.COM — RPG Fantasy Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700;900&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-deep: #0d0b14;
  --bg-dark: #151222;
  --bg-card: #1e1a2e;
  --bg-card-alt: #241e38;
  --bg-card-hover: #2c2444;
  --bg-parchment: #d4c5a0;
  --bg-parchment-dark: #b8a882;

  /* Gold palette */
  --gold-darkest: #6b4f0e;
  --gold-dark: #8b6914;
  --gold: #d4a853;
  --gold-light: #f0d78c;
  --gold-lightest: #faecc8;
  --gold-glow: rgba(212, 168, 83, 0.35);

  /* Accent colors */
  --emerald: #3a7d5c;
  --emerald-light: #5aad80;
  --ruby: #a83248;
  --ruby-light: #d44a63;
  --mystic: #7c5cbf;
  --mystic-light: #a88ae6;
  --sapphire: #4a7fbf;
  --sapphire-light: #6fa3e0;
  --amber: #d4943a;

  /* Text */
  --text-light: #e8dcc8;
  --text-body: #c9bda6;
  --text-dim: #9a8e7e;
  --text-dark: #2a2218;
  --text-gold: var(--gold);

  /* Borders & effects */
  --border-ornate: 1px solid rgba(212, 168, 83, 0.25);
  --border-ornate-strong: 2px solid rgba(212, 168, 83, 0.4);
  --shadow-glow: 0 0 20px rgba(212, 168, 83, 0.15);
  --shadow-glow-strong: 0 0 40px rgba(212, 168, 83, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 168, 83, 0.1);

  /* Glassmorphism */
  --glass-bg: rgba(21, 18, 34, 0.75);
  --glass-border: 1px solid rgba(212, 168, 83, 0.15);
  --glass-blur: blur(16px);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Typography */
  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Crimson Text', serif;
  --font-ui: 'Inter', sans-serif;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-smooth: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Z-index */
  --z-particles: 1;
  --z-content: 10;
  --z-navbar: 100;
  --z-modal: 1000;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(124, 92, 191, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 168, 83, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(58, 125, 92, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: rgba(212, 168, 83, 0.3);
  color: var(--text-light);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 0.6rem var(--space-lg);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(212, 168, 83, 0.3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Ficha de personaje — Gremio */
.character-guild {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.5rem 0;
  padding: 0.4rem 0.8rem;
  background: rgba(124, 92, 191, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 92, 191, 0.15);
  width: fit-content;
}

.guild-logo {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--mystic-light);
}

.guild-text {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.guild-label {
  font-size: 0.75rem;
  color: var(--mystic-light);
  text-transform: uppercase;
  margin-right: 0.3rem;
  font-weight: 600;
}

/* Footer logo */
.footer-logo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 83, 0.3);
  margin: 0 auto var(--space-sm) auto;
  display: block;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.footer-logo:hover {
  transform: rotate(10deg) scale(1.1);
  border-color: var(--gold);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.lang-switch-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 1rem;
}

.lang-btn {
  color: var(--text-dim);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
  font-weight: 600;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

.lang-separator {
  color: rgba(212, 168, 83, 0.3);
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--gold);
  padding: 0.5rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(124, 92, 191, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(212, 168, 83, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(58, 125, 92, 0.06) 0%, transparent 40%);
  z-index: 0;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: var(--z-content);
  max-width: 800px;
  padding: 0 var(--space-md);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.5rem 1.5rem;
  border: var(--border-ornate);
  border-radius: 50px;
  margin-bottom: var(--space-lg);
  background: rgba(212, 168, 83, 0.05);
  animation: fadeInDown 1s ease 0.3s both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  text-shadow:
    0 0 40px rgba(212, 168, 83, 0.3),
    0 0 80px rgba(212, 168, 83, 0.1);
  animation: fadeInUp 1s ease 0.5s both;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-body);
  margin-bottom: var(--space-xl);
  min-height: 2em;
  animation: fadeInUp 1s ease 0.7s both;
}

.hero-subtitle .typed-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--gold);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.9s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: var(--z-content);
  animation: fadeInUp 1s ease 1.2s both;
}

.scroll-indicator span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-deep);
  border: 1px solid var(--gold);
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.btn-primary:hover {
  color: var(--bg-deep);
  box-shadow: 0 6px 25px rgba(212, 168, 83, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: var(--border-ornate-strong);
}

.btn-secondary:hover {
  background: rgba(212, 168, 83, 0.1);
  color: var(--gold-light);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-play {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  color: #fff;
  border: 1px solid var(--emerald-light);
  box-shadow: 0 4px 15px rgba(58, 125, 92, 0.3);
}

.btn-play:hover {
  color: #fff;
  box-shadow: 0 6px 25px rgba(58, 125, 92, 0.5);
  transform: translateY(-2px);
}

/* ============================================
   SECTION HEADERS & DIVIDERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-shadow: 0 0 30px rgba(212, 168, 83, 0.2);
  margin-top: var(--space-sm);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-top: var(--space-xs);
  font-style: italic;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.divider-diamond {
  color: var(--gold);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Ornate corner decoration mixin (applied to cards) */
.ornate-frame {
  position: relative;
  border: var(--border-ornate);
}

.ornate-frame::before,
.ornate-frame::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.ornate-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.ornate-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.ornate-frame:hover::before,
.ornate-frame:hover::after {
  opacity: 1;
}

/* Inner corners (requires a child element or extra pseudo approach) */
.ornate-corners-inner::before,
.ornate-corners-inner::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.ornate-corners-inner::before {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.ornate-corners-inner::after {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

/* ============================================
   ABOUT — Character Card
   ============================================ */
.about {
  position: relative;
}

.character-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  align-items: start;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 0 auto;
}

.character-portrait {
  width: 220px;
  height: 220px;
  background: var(--bg-card-alt);
  border: var(--border-ornate-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-portrait .portrait-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--bg-card-alt), var(--bg-dark));
}

.character-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.character-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.character-class {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--mystic-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.character-level {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  width: fit-content;
}

.character-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), transparent);
  margin: var(--space-xs) 0;
  opacity: 0.4;
}

.character-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.char-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
}

.char-stat-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 36px;
  font-weight: 600;
}

.char-stat-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.char-stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  width: 0;
}

.char-stat-fill.stat-str { background: linear-gradient(90deg, var(--ruby), var(--ruby-light)); }
.char-stat-fill.stat-dex { background: linear-gradient(90deg, var(--emerald), var(--emerald-light)); }
.char-stat-fill.stat-int { background: linear-gradient(90deg, var(--sapphire), var(--sapphire-light)); }
.char-stat-fill.stat-wis { background: linear-gradient(90deg, var(--mystic), var(--mystic-light)); }
.char-stat-fill.stat-cha { background: linear-gradient(90deg, var(--amber), var(--gold-light)); }
.char-stat-fill.stat-cre { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }

.character-bio {
  color: var(--text-body);
  line-height: 1.8;
  margin-top: var(--space-xs);
}

/* ============================================
   PROJECTS — Quest Board
   ============================================ */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all var(--transition-base);
}

.filter-btn:hover {
  color: var(--gold-light);
  border-color: rgba(212, 168, 83, 0.3);
  background: rgba(212, 168, 83, 0.05);
}

.filter-btn.active {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-color: var(--gold);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  background: var(--bg-card);
  border: var(--border-ornate);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(212, 168, 83, 0.4);
}

.project-card.hidden {
  display: none;
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-image .project-tag {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-tag.tag-game { color: var(--emerald-light); border-color: rgba(90, 173, 128, 0.3); }
.project-tag.tag-art { color: var(--mystic-light); border-color: rgba(168, 138, 230, 0.3); }
.project-tag.tag-design { color: var(--sapphire-light); border-color: rgba(111, 163, 224, 0.3); }

.project-body {
  padding: var(--space-md);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.project-links {
  display: flex;
  gap: var(--space-sm);
}

.project-link {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition-fast);
}

.project-link:hover {
  color: var(--gold-light);
}

/* Image placeholder (CSS-generated) */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}

.img-placeholder.placeholder-game {
  background: linear-gradient(135deg, #1a2a1a, #0d1f15);
}
.img-placeholder.placeholder-art {
  background: linear-gradient(135deg, #1f1a2a, #150d1f);
}
.img-placeholder.placeholder-design {
  background: linear-gradient(135deg, #1a1f2a, #0d151f);
}

/* ============================================
   GAMES — Arcade
   ============================================ */
.games-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.game-embed-card {
  background: var(--bg-card);
  border: var(--border-ornate);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  width: 568px;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.game-embed-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(58, 125, 92, 0.5);
}

.game-embed-card iframe {
  border-radius: var(--radius-md);
  max-width: 100%;
}

.game-card {
  background: var(--bg-card);
  border: var(--border-ornate);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(58, 125, 92, 0.5);
}

.game-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.game-card:hover .game-image img {
  transform: scale(1.05);
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 20, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.game-card:hover .game-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(58, 125, 92, 0.5);
  transform: scale(0.8);
  transition: transform var(--transition-base);
}

.game-card:hover .play-icon {
  transform: scale(1);
}

.play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.game-body {
  padding: var(--space-md);
}

.game-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}

.game-genre {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--emerald-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.game-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Game Modal --- */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(13, 11, 20, 0.95);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.game-modal.active {
  opacity: 1;
  visibility: visible;
}

.game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  border-bottom: var(--border-ornate);
  background: var(--bg-dark);
}

.game-modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.game-modal-close {
  font-size: 1.5rem;
  color: var(--text-dim);
  padding: 0.5rem;
  transition: color var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.game-modal-close:hover {
  color: var(--ruby-light);
}

.game-modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}

.game-modal-body iframe {
  width: 100%;
  max-width: 960px;
  height: 80vh;
  border: var(--border-ornate-strong);
  border-radius: var(--radius-md);
  background: #000;
}

/* ============================================
   SKILLS — RPG Stats
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.skill-category {
  background: var(--bg-card);
  border: var(--border-ornate);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}

.skill-category:hover {
  border-color: rgba(212, 168, 83, 0.4);
  box-shadow: var(--shadow-card-hover);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.skill-category-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.2);
}

.skill-category-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
}

.skill-level {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.skill-bar {
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.skill-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold-light);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--gold-glow);
}

.skill-fill.fill-emerald {
  background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
}
.skill-fill.fill-emerald::after { background: var(--emerald-light); box-shadow: 0 0 8px rgba(58, 125, 92, 0.5); }

.skill-fill.fill-mystic {
  background: linear-gradient(90deg, var(--mystic), var(--mystic-light));
}
.skill-fill.fill-mystic::after { background: var(--mystic-light); box-shadow: 0 0 8px rgba(124, 92, 191, 0.5); }

.skill-fill.fill-ruby {
  background: linear-gradient(90deg, var(--ruby), var(--ruby-light));
}
.skill-fill.fill-ruby::after { background: var(--ruby-light); box-shadow: 0 0 8px rgba(168, 50, 72, 0.5); }

/* ============================================
   CONTACT — Scroll / Parchment
   ============================================ */
.contact-wrapper {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-xl);
}

.contact-scroll {
  background: var(--bg-card);
  border: var(--border-ornate-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  position: relative;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  background: var(--bg-dark);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-ornate);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: all var(--transition-base);
}

.social-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(212, 168, 83, 0.1);
  margin-top: var(--space-lg);
}

.footer p {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 83, 0.2); }
  50% { box-shadow: 0 0 40px rgba(212, 168, 83, 0.4); }
}

/* Scroll reveal animation classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    transition: right var(--transition-base);
    border-left: var(--border-ornate);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-navbar) + 1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: block;
    z-index: calc(var(--z-navbar) + 2);
  }

  .character-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-lg);
  }

  .character-portrait {
    width: 160px;
    height: 200px;
    margin: 0 auto;
  }

  .character-stats {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .games-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

/* Mobile small */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-scroll {
    padding: var(--space-md);
  }

  .section-header h2 {
    font-size: 1.5rem;
  }
}

/* Desktop large */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 11, 20, 0.7);
  z-index: var(--z-navbar);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}
