/* ============================================
   Dev Boyd - Modern Glassmorphism Theme
   Black/Glass Color Scheme
   ============================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.1);
  --glass-highlight: rgba(255,255,255,0.15);
  --text-primary: #e8e8ed;
  --text-secondary: #9898a6;
  --text-muted: #5e5e6e;
  --accent: #6c63ff;
  --accent-glow: rgba(108,99,255,0.35);
  --accent-secondary: #00d4aa;
  --accent-warn: #ff6b6b;
  --accent-info: #4ecdc4;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 100%;
  --content-max: 1400px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* Background ambient glow */
body::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0,212,170,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

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

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1rem; color: var(--text-secondary); }

/* ---------- Layout ---------- */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-fluid {
  width: 100%;
  padding: 0 2rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(10,10,15,0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--glass);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: rgba(17,17,24,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.open .nav-dropdown-content { display: block; }
.nav-dropdown-content a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
}
.nav-dropdown-content a:hover { background: var(--bg-card-hover); }

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-content h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 320px;
  border-radius: var(--radius);
  filter: drop-shadow(0 20px 40px rgba(108,99,255,0.3));
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b7dff);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}
.btn-ghost:hover {
  background: var(--glass-highlight);
  color: var(--text-primary);
}

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Glass Cards ---------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-highlight);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  border: 1px solid var(--glass-border);
}

.glass-card h3 {
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.glass-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover { gap: 8px; }

/* ---------- Section ---------- */
.section {
  padding: 5rem 0;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  padding: 4px 12px;
  background: var(--accent-glow);
  border-radius: 50px;
}

/* ---------- Grid Layouts ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ---------- Article Page ---------- */
.article-hero {
  padding: 120px 0 40px;
  border-bottom: 1px solid var(--glass-border);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-meta .tag {
  padding: 4px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-meta .date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.article-content h3 {
  margin: 2rem 0 0.8rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}
.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Code blocks */
pre, .code-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

pre code, .code-block code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-info);
  line-height: 1.8;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(108,99,255,0.15);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-info);
}

pre code {
  background: none;
  padding: 0;
}

/* Callout boxes */
.callout {
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  background: var(--glass);
}

.callout-warning {
  border-color: var(--accent-warn);
  background: rgba(255,107,107,0.08);
}

.callout-info {
  border-color: var(--accent-info);
  background: rgba(78,205,196,0.08);
}

.callout-tip {
  border-color: var(--accent-secondary);
  background: rgba(0,212,170,0.08);
}

.callout-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Steps */
.steps {
  counter-reset: step;
  margin: 2rem 0;
}

.step {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin-bottom: 0.5rem;
}

/* ---------- Sidebar for articles ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-card ul {
  list-style: none;
}

.sidebar-card li {
  margin-bottom: 0.5rem;
}

.sidebar-card a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.sidebar-card a:hover {
  color: var(--text-primary);
  background: var(--glass);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0;
  background: rgba(0,0,0,0.3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-brand p {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--glass-border);
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Contact Form ---------- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.skill-bar {
  margin-bottom: 1.2rem;
}
.skill-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.skill-bar-track {
  height: 6px;
  background: var(--glass);
  border-radius: 50px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 1s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-image { order: -1; }
  .hero-badges { justify-content: center; }
  .btn-group { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-dropdown-content {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    margin-top: 4px;
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 110px 0 50px; }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Animate on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
