/* ═══════════════════════════════════════════════════════════════
   MAIN STYLES — begowalibeg.me
   Dark portfolio theme with accent glow
   ═══════════════════════════════════════════════════════════════ */

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

/* ── CSS Custom Properties ────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-primary:       #0b0e17;
  --bg-secondary:     #111631;
  --bg-tertiary:      #1a1f3d;

  /* Text */
  --text-primary:     #e4e6f0;
  --text-secondary:   #8b8fa3;

  /* Accent */
  --accent:           #6c63ff;
  --accent-hover:     #5a52d5;
  --accent-glow:      rgba(108, 99, 255, 0.3);
  --accent-glow-strong: rgba(108, 99, 255, 0.5);

  /* Borders */
  --border:           #1e2340;

  /* Status */
  --success:          #4ade80;
  --danger:           #f87171;
  --warning:          #fbbf24;

  /* Typography */
  --font-heading:     'Poppins', 'Inter', sans-serif;
  --font-body:        'Inter', sans-serif;
  --font-mono:        'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding:  100px 0;
  --container-width:  1100px;
  --nav-height:       70px;

  /* Transitions */
  --transition:       0.3s ease;
  --transition-slow:  0.5s ease;
}

/* ── 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);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

a:hover {
  color: var(--accent-hover);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

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

/* ── Section Base ─────────────────────────────────────────────── */
.section {
  padding: var(--section-padding);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 50px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 20px;
  max-width: 300px;
}

.section-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  transition: var(--transition);
  white-space: nowrap;
}

.section-link:hover {
  color: var(--accent-hover);
  transform: translateX(3px);
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(11, 14, 23, 0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  transition: var(--transition);
}

.nav-logo:hover img {
  border-color: var(--accent-hover);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transition: right 0.4s ease;
  border-left: 1px solid var(--border);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  opacity: 1;
}

/* ── Hero Section ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Hero Visual — Right Side */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeScaleIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

.hero-image-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 3px solid var(--accent);
}

.hero-image-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed var(--accent);
  opacity: 0.4;
  animation: spinSlow 20s linear infinite;
}

.hero-image-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
  animation: pulseGlow 3s ease-in-out infinite;
}

.hero-floating-badges {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hero-badge {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  animation: floatBadge 4s ease-in-out infinite;
}

.badge-top {
  top: 10px;
  right: -10px;
}

.badge-bottom {
  bottom: 20px;
  left: -20px;
  animation-delay: 2s;
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

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

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.4s;
}

.hero-tagline {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 25px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.8s;
}

.hero-cta {
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 1s;
}

/* Animated background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: floatBg 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
  animation: floatBg 10s ease-in-out infinite reverse;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── About Section ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* About Terminal Widget */
.about-terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

.terminal-body {
  padding: 20px;
  line-height: 1.9;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.terminal-prompt {
  color: #28c840;
  font-weight: 700;
}

.terminal-cmd {
  color: var(--text-primary);
}

.terminal-output {
  padding-left: 4px;
  margin-bottom: 10px;
}

.terminal-brace {
  color: var(--text-secondary);
}

.terminal-field {
  padding-left: 20px;
}

.terminal-key {
  color: #79c0ff;
}

.terminal-string {
  color: #a5d6ff;
}

.terminal-cursor {
  color: var(--accent);
  animation: termBlink 1s step-end infinite;
}

@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Tech Stack Tags */
.tech-stack {
  margin-top: 40px;
}

.tech-group {
  margin-bottom: 20px;
}

.tech-group-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 14px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: var(--transition);
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Language Tags */
.lang-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lang-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: var(--transition);
}

.lang-tag:hover {
  border-color: var(--accent);
}

.lang-name {
  color: var(--text-secondary);
}

.lang-level {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.lang-level.native { background: rgba(40, 200, 64, 0.15); color: #28c840; }
.lang-level.c1     { background: rgba(108, 99, 255, 0.15); color: var(--accent); }
.lang-level.b1     { background: rgba(79, 192, 255, 0.15); color: #4fc0ff; }
.lang-level.a2     { background: rgba(254, 188, 46, 0.15); color: #febc2e; }
.lang-level.n5     { background: rgba(255, 95, 87, 0.15); color: #ff5f57; }

/* ── Contact Section ──────────────────────────────────────────── */
.contact {
  text-align: center;
  padding: 120px 0;
}

.contact-overline {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 15px;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.contact-text {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-socials a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.footer-text span {
  display: block;
  margin-top: 5px;
}

/* ── Scroll Animations ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Page Header (for sub-pages) ──────────────────────────────── */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-secondary);
  margin-top: 10px;
}

/* ── Skeleton Loading ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-card {
  height: 280px;
  border-radius: 10px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 10px;
  width: 80%;
}

.skeleton-text.short {
  width: 50%;
}

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

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
}

.pagination button {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 8px 16px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Blog Post Page ───────────────────────────────────────────── */
.blog-post-header {
  padding: 140px 0 40px;
  text-align: center;
}

.blog-post-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 15px;
}

.blog-post-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-post-cover {
  max-width: 800px;
  margin: 0 auto 40px;
  border-radius: 10px;
  overflow: hidden;
}

.blog-post-cover img {
  width: 100%;
}

.blog-post-content {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.blog-post-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

.blog-post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.blog-post-images img {
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
}

.blog-post-images img:hover {
  transform: scale(1.02);
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 40px;
  transition: var(--transition);
}

.blog-post-back:hover {
  transform: translateX(-5px);
}

/* ── Not Found State ──────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 200px 0;
}

.not-found h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* ── Utility Classes ──────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.mb-0 { margin-bottom: 0; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
