/* ==========================================================================
   Gplusplus Modern Design System & Portfolio Theme
   Author: Maxer (Gplus.plus)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-base: #07090e;
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.65);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-header: rgba(7, 9, 14, 0.85);

  --accent-cyan: #00f2fe;
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-violet: #d946ef;
  --accent-emerald: #10b981;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.35);
  --border-glow: rgba(0, 242, 254, 0.4);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 35px rgba(0, 242, 254, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(0, 242, 254, 0.08) 0%, transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Background Grid Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

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

/* Typography Helpers */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 40%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono {
  font-family: var(--font-mono);
}

/* Glassmorphism Card Component */
.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-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.85rem 0;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: padding 0.3s ease, background-color 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-logo .code-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--accent-emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* Mobile Drawer Overlay */
.mobile-nav {
  position: fixed;
  top: 61px;
  left: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 999;
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.35s;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

.mobile-nav-links a i {
  color: var(--accent-cyan);
  width: 20px;
}

.mobile-nav-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */
section {
  padding: 6.5rem 0 3.5rem;
  position: relative;
  z-index: 1;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.6;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

.hero-title {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 580px;
  line-height: 1.7;
}

.hero-description strong {
  color: var(--text-main);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.85rem 1.65rem;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #050811;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  color: #fff;
}

/* Quick Metrics / Stats Bar */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Code Mockup Window */
.code-window {
  background: #0d111a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.05);
  overflow: hidden;
  font-family: var(--font-mono);
  width: 100%;
  position: relative;
  transition: border-color 0.3s ease;
}

.code-window:hover {
  border-color: var(--border-hover);
}

.code-header {
  background: #141b27;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.code-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.code-copy-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--border-hover);
  background: rgba(56, 189, 248, 0.1);
}

.code-badge {
  font-size: 0.7rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.code-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.code-body::-webkit-scrollbar {
  height: 6px;
}

.code-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-type { color: #38bdf8; }
.code-func { color: #a855f7; }
.code-string { color: #34d399; }
.code-comment { color: #64748b; font-style: italic; }

/* ==========================================================================
   Skills & Competencies Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.skill-card:hover .skill-icon-box {
  transform: scale(1.08);
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
}

.skill-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.skill-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 1rem;
}

.tag {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.skill-card:hover .tag {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

/* ==========================================================================
   Services & Portal Hub Section
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
  transform: scale(1.08);
}

.service-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.service-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.service-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: auto;
}

.service-action i {
  transition: transform 0.25s ease;
}

.service-card:hover .service-action i {
  transform: translateX(5px);
}

/* ==========================================================================
   Contact & Footer
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2.5rem;
  background: rgba(5, 7, 12, 0.96);
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand-col {
  max-width: 480px;
}

.footer-brand-col p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.15rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

/* Tablets & Small Laptops (< 992px) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

/* Small Tablets & Large Phones (< 768px) */
@media (max-width: 768px) {
  section {
    padding: 5rem 0 2.5rem;
  }

  .hero-section {
    padding-top: 5.5rem;
    padding-bottom: 2.5rem;
    min-height: auto;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
  }

  .stat-item {
    align-items: center;
  }

  .code-body {
    font-size: 0.8rem;
    padding: 1rem;
  }

  .skills-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* Mobile Small Devices (< 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .nav-status {
    display: none;
  }

  .skill-card,
  .service-card {
    padding: 1.5rem;
  }
}
