/* ============================================================
   DESIGN SYSTEM — Ricardo Souza Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:      #080d18;
  --bg-secondary:    #0d1526;
  --bg-tertiary:     #111827;
  --bg-card:         rgba(255, 255, 255, 0.04);
  --bg-card-hover:   rgba(255, 255, 255, 0.08);

  --accent-cyan:     #00d4ff;
  --accent-violet:   #7c3aed;
  --accent-pink:     #ec4899;
  --accent-green:    #10b981;

  --text-primary:    #f1f5f9;
  --text-secondary:  #94a3b8;
  --text-muted:      #475569;
  --text-accent:     #00d4ff;

  --border-subtle:   rgba(255, 255, 255, 0.08);
  --border-accent:   rgba(0, 212, 255, 0.3);

  /* Gradients */
  --grad-hero:       radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,212,255,0.18) 0%, transparent 60%),
                     radial-gradient(ellipse 60% 50% at 80% 60%, rgba(124,58,237,0.15) 0%, transparent 55%),
                     linear-gradient(180deg, #080d18 0%, #0d1526 100%);
  --grad-accent:     linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --grad-card:       linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(124,58,237,0.08) 100%);
  --grad-text:       linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #ec4899 100%);

  /* Glassmorphism */
  --glass-bg:        rgba(13, 21, 38, 0.6);
  --glass-border:    rgba(255, 255, 255, 0.1);
  --glass-blur:      blur(20px);
  --glass-blur-sm:   blur(12px);

  /* Shadows */
  --shadow-glow-cyan:   0 0 40px rgba(0, 212, 255, 0.15);
  --shadow-glow-violet: 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-card:        0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-elevated:    0 20px 60px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-display:    'Outfit', sans-serif;
  --font-body:       'Inter', sans-serif;
  --font-mono:       'JetBrains Mono', monospace;

  /* Spacing */
  --section-py:      clamp(5rem, 10vw, 8rem);
  --container-max:   1200px;
  --container-px:    clamp(1.5rem, 5vw, 2.5rem);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Typography Scale ───────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }

h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.2; }

.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-5xl  { font-size: 3rem; }
.text-6xl  { font-size: 3.75rem; }
.text-7xl  { font-size: 4.5rem; }

.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--accent-cyan); }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* ── Glass Card ─────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-card);
  transform: translateY(-4px);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-base);
  cursor: pointer;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--accent-cyan);
  padding: 0.5rem 0;
  position: relative;
}

.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-cyan);
  transition: width var(--transition-base);
}

.btn-ghost:hover::after { width: 100%; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--accent-violet);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}

/* ── Background Noise Texture ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Grid Lines Background ──────────────────────────────────── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
  pointer-events: none;
}

/* ── Responsive Utilities ───────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-py: clamp(3.5rem, 8vw, 5rem);
  }
}
