/* ==========================================================================
   Abu Mercy - Portfolio Design System & Base Styles
   Theme: Obsidian Dark / Cyber Teal & Electric Cyan Accents / Minimalist Dev
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Premium Obsidian & Developer Cyan */
  --bg-primary: #080b11;
  --bg-secondary: #0e131f;
  --bg-tertiary: #141b2d;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-glass: rgba(14, 19, 31, 0.75);
  
  /* Accents */
  --accent-cyan: #00f2fe;
  --accent-teal: #4facfe;
  --accent-blue: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-emerald: #10b981;
  --accent-amber: #fbbf24;
  
  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-purple: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(0, 242, 254, 0.15) 0%, rgba(8, 11, 17, 0) 70%);
  --gradient-card-border: linear-gradient(135deg, rgba(0, 242, 254, 0.3) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(129, 140, 248, 0.2) 100%);
  
  /* Text Colors */
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-accent: #38bdf8;
  
  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(0, 242, 254, 0.3);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.2);
  --shadow-glow-hover: 0 0 35px rgba(0, 242, 254, 0.4);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Layout & Transitions */
  --max-width: 1200px;
  --header-height: 76px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --touch-target-min: 44px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  color-scheme: dark;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Background Atmosphere Grids & Glows */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(129, 140, 248, 0.04) 0%, transparent 45%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Typography Defaults with Fluid Scaling */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  word-break: break-word;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

code, pre, .mono {
  font-family: var(--font-mono);
  word-break: break-word;
}

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 0;
  position: relative;
  width: 100%;
  overflow-x: clip;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

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

.section-tag::before {
  content: '>';
  color: var(--accent-blue);
}

.section-title {
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.section-desc {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.6;
}

/* Glassmorphism Surface Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  white-space: nowrap;
  min-height: var(--touch-target-min);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #050811;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 242, 254, 0.1);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-icon {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Animations & Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Global Media Queries */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  .section {
    padding: 4.5rem 0;
  }
  .section-header {
    margin-bottom: 2.5rem;
  }
  .container {
    padding: 0 1.25rem;
  }
  p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 64px;
  }
  .section {
    padding: 3.5rem 0;
  }
  .container {
    padding: 0 1rem;
  }
  .section-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
  }
}
