/* ============================================================
   azeembukhari.com — Dark Technical Theme
   Accent: Electric Blue
   ============================================================ */

:root {
  --bg:          #0a0e1a;
  --bg-2:        #0f1420;
  --bg-3:        #131a2a;
  --border:      #1e2740;
  --text:        #e6edf7;
  --text-dim:    #8b98b0;
  --text-faint:  #5a6680;
  --accent:      #00bfff;
  --accent-2:    #1e90ff;
  --accent-glow: rgba(0, 191, 255, 0.35);
  --success:     #00d68f;
  --warn:        #ffb020;
  --danger:      #ff4d6d;
  --radius:      12px;
  --radius-sm:   8px;
  --maxw:        1180px;
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 191, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 191, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

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

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

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 0.5em; }
h3 { font-size: 1.25rem; }

p { color: var(--text-dim); }

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

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { padding: 80px 0; }
section.tight { padding: 48px 0; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

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

.nav-links a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-3);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
}

/* ============ HERO ============ */
.hero {
  padding: 100px 0 80px;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: rgba(0, 191, 255, 0.08);
  border: 1px solid rgba(0, 191, 255, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s infinite;
}

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

.hero h1 {
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 0%, #8b98b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.15rem;
  max-width: 640px;
  margin-bottom: 36px;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #041018;
  box-shadow: 0 0 0 rgba(0, 191, 255, 0);
}
.btn-primary:hover {
  background: #4dd4ff;
  color: #041018;
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 191, 255, 0.06);
}

/* ============ CARDS ============ */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: rgba(0, 191, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.card:hover::before { opacity: 1; }

.card .icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0, 191, 255, 0.1);
  border: 1px solid rgba(0, 191, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 6px;
}

.card h3 { color: var(--text); }
.card p { font-size: 0.94rem; }
.card .card-link {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.card .card-link::after {
  content: ' →';
  transition: margin var(--transition);
  display: inline-block;
}
.card:hover .card-link::after { margin-left: 4px; }

/* ============ SECTION HEADINGS ============ */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 { margin: 0; }
.section-head .section-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ============ ABOUT / PROFILE ============ */
.profile-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
  padding: 60px 0 40px;
}
@media (max-width: 700px) {
  .profile-hero { grid-template-columns: 1fr; text-align: center; }
  .profile-hero .avatar { margin: 0 auto; }
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-3);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 191, 255, 0.15);
}

/* ============ SKILLS / TAGS ============ */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tag.accent {
  color: var(--accent);
  border-color: rgba(0, 191, 255, 0.3);
  background: rgba(0, 191, 255, 0.06);
}

/* ============ TIMELINE ============ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.timeline-item { position: relative; padding-bottom: 36px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.timeline-item h3 { margin-bottom: 4px; }
.timeline-item .meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.timeline-item ul { list-style: none; padding: 0; }
.timeline-item ul li {
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  font-size: 0.94rem;
}
.timeline-item ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============ TOOL FORMS ============ */
.tool-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.tool-panel label {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 6px;
}
.tool-panel input,
.tool-panel textarea,
.tool-panel select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.tool-panel input:focus,
.tool-panel textarea:focus,
.tool-panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.15);
}
.tool-panel textarea { min-height: 140px; resize: vertical; }
.tool-panel .row { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-panel .row > * { flex: 1; min-width: 160px; }

.output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  word-break: break-all;
  min-height: 48px;
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ============ POSTS ============ */
.post-header { padding: 60px 0 20px; }
.post-header .meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.post-body { max-width: 760px; padding-bottom: 80px; }
.post-body h2 { margin-top: 2em; }
.post-body p { margin-bottom: 1em; color: var(--text-dim); }
.post-body code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}
.post-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1.2em;
}
.post-body pre code { background: none; padding: 0; color: var(--text); }

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.accent-text { color: var(--accent); }

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
