/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg:        #0a0c10;
  --bg-alt:    #0d1117;
  --bg-card:   #111620;
  --bg-card2:  #161b27;
  --border:    #1e2535;
  --border-hi: #2a3450;
  --text:      #c9d1d9;
  --text-dim:  #6e7c94;
  --accent:    #58a6ff;
  --green:     #3fb950;
  --purple:    #bc8cff;
  --orange:    #ffa657;
  --yellow:    #e3b341;
  --gradient:  linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
  --shadow:    0 4px 32px rgba(0,0,0,.45);
  --radius:    12px;
  --radius-sm: 6px;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

/* ===== BASE OVERRIDES ===== */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }

/* ===== NAVBAR ===== */
.nav {
  background: rgba(10,12,16,.85) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav.scrolled { background: rgba(10,12,16,.97) !important; }

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 600;
  color: var(--text) !important;
  letter-spacing: .02em;
  text-decoration: none;
}

.navbar-nav .nav-link {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim) !important;
  transition: color .2s;
  padding-top: .5rem; padding-bottom: .5rem;
}
.navbar-nav .nav-link:hover { color: var(--text) !important; }

.btn-nav {
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s !important;
}
.btn-nav:hover { background: var(--accent) !important; color: var(--bg) !important; }

/* Bootstrap navbar toggler override */
.nav-toggler {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
  box-shadow: none !important; outline: none !important;
}
.nav-toggler span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg);
  font-weight: 600; font-size: 14px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  text-decoration: none;
}
.btn-primary:hover {
  background: #79b8ff; color: var(--bg);
  box-shadow: 0 0 20px rgba(88,166,255,.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  font-weight: 500; font-size: 14px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-hi);
  transition: border-color .2s, color .2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== UTILITIES ===== */
.accent { color: var(--accent); }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(88,166,255,.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(188,140,255,.05) 0%, transparent 65%);
  pointer-events: none;
}

.hero-tag {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim); margin-bottom: 16px;
  letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.15;
  color: #e6edf3; margin-bottom: 20px;
}
.hero-desc {
  color: var(--text-dim); font-size: 16px;
  max-width: 480px; margin-bottom: 36px; line-height: 1.8;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-mono); font-size: 24px;
  font-weight: 700; color: #e6edf3;
}
.stat-label { font-size: 12px; color: var(--text-dim); }
.stat-div { width: 1px; height: 36px; background: var(--border); }

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  letter-spacing: .1em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrolldown 2s ease-in-out infinite;
}
@keyframes scrolldown { 0%,100%{transform:scaleY(1);opacity:1} 50%{transform:scaleY(.5);opacity:.4} }

/* ===== AVATAR ===== */
.avatar-wrap { position: relative; width: 220px; height: 220px; }
.avatar-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, var(--purple) 120deg, var(--bg-card) 180deg);
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-img {
  position: absolute; inset: 4px;
  border-radius: 50%; overflow: hidden;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
}
.avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  display: none;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 36px;
  font-weight: 700; color: var(--accent);
  width: 100%; height: 100%;
}
.avatar-badge {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 500; color: var(--green);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(.85)} }

/* ===== CODE CARD ===== */
.code-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  width: 300px; max-width: 100%; box-shadow: var(--shadow);
}
.code-card-bar {
  background: var(--bg-card2); padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.dot-r,.dot-y,.dot-g { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }
.code-card-title { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-left: 4px; }
.code-snippet { padding: 16px; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; overflow: auto; margin: 0; }
.code-snippet code { display: block; }
.c-purple { color: #ff7b72; }
.c-green  { color: #7ee787; }
.c-white  { color: #c9d1d9; }
.c-blue   { color: #79c0ff; }
.c-orange { color: var(--orange); }
.c-yellow { color: var(--yellow); }

/* ===== SECTIONS ===== */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }

.section-tag {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; color: #e6edf3; margin-bottom: 14px;
}
.section-sub { color: var(--text-dim); font-size: 16px; max-width: 520px; }

/* ===== STACK CARDS ===== */
.stack-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.stack-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient); opacity: 0; transition: opacity .25s;
}
.stack-card:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: var(--shadow); }
.stack-card:hover::before { opacity: 1; }

.stack-card--wide { flex-direction: row; }

.stack-icon {
  width: 44px; height: 44px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stack-icon svg { width: 22px; height: 22px; color: var(--accent); }
.stack-info h3 { font-size: 16px; font-weight: 600; color: #e6edf3; margin-bottom: 6px; }
.stack-info p  { font-size: 13px; color: var(--text-dim); line-height: 1.65; margin: 0; }

.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stack-tags span {
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(88,166,255,.1); color: var(--accent);
  border: 1px solid rgba(88,166,255,.2);
  border-radius: 4px; padding: 2px 8px;
}

.stack-level { display: flex; flex-direction: column; gap: 4px; min-width: 100px; }
.stack-level span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-align: right; }
.level-bar {
  height: 4px; background: var(--border);
  border-radius: 2px; position: relative; overflow: hidden;
}
.level-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--gradient);
  width: var(--pct);
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s;
}
.service-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.service-num {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); opacity: .6; margin-bottom: 14px; font-weight: 600;
}
.service-card h3 { font-size: 17px; font-weight: 600; color: #e6edf3; margin-bottom: 10px; }
.service-card p  { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin: 0; }

/* ===== REFERENCE CARDS ===== */
.ref-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s;
  position: relative;
}
.ref-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.ref-quote {
  font-family: var(--font-mono); font-size: 48px;
  line-height: 1; color: var(--accent); opacity: .25;
  position: absolute; top: 16px; right: 20px;
}
.ref-text { font-size: 14px; color: var(--text); line-height: 1.8; flex: 1; margin: 0; }
.ref-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 700; color: var(--bg); flex-shrink: 0;
}
.ref-author strong { display: block; font-size: 14px; color: #e6edf3; }
.ref-author span   { font-size: 12px; color: var(--text-dim); }
.ref-stars { font-size: 14px; color: var(--yellow); letter-spacing: 2px; }
.ref-card--cta {
  background: linear-gradient(135deg, rgba(88,166,255,.07), rgba(188,140,255,.07));
  border-color: rgba(88,166,255,.2);
}
.ref-card--cta p { font-size: 16px; font-weight: 500; color: #e6edf3; margin: 0; }
.ref-quote-icon svg { width: 40px; height: 40px; color: var(--accent); opacity: .6; }

/* ===== CONTACT ===== */
/* Override Bootstrap form controls for dark theme */
.form-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 6px;
}
.form-control {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-family: var(--font-sans); font-size: 14px;
}
.form-control::placeholder { color: var(--text-dim) !important; opacity: 1; }
.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(88,166,255,.12) !important;
}

.contact-info {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.contact-info h3 {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px;
}
.avail-row { font-size: 14px; color: var(--green); font-weight: 500; }
.dot--green  { width: 8px; height: 8px; background: var(--green);  border-radius: 50%; flex-shrink: 0; }
.dot--yellow { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; flex-shrink: 0; }
.avail-note { font-size: 12px; color: var(--text-dim); margin-top: 6px; margin-bottom: 0; }
.ref-url { font-size: 13px; color: var(--accent); text-decoration: none; }
.ref-url:hover { text-decoration: underline; }

.contact-list li {
  font-size: 13px; color: var(--text-dim);
  padding-left: 14px; position: relative; margin-bottom: 8px;
}
.contact-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 11px; }

.contact-social a {
  font-size: 13px; color: var(--text-dim);
  transition: color .2s; text-decoration: none;
}
.contact-social a:hover { color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-copy { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
.back-top {
  width: 36px; height: 36px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim); transition: color .2s, border-color .2s;
  text-decoration: none;
}
.back-top:hover { color: var(--accent); border-color: var(--accent); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 991px) {
  /* Bootstrap handles navbar collapse; tighten mobile menu styling */
  #navMenu {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 8px 0;
  }
  .navbar-nav .nav-link { padding: 10px 20px; }
  .hero-text { text-align: center; }
  .hero-desc { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .scroll-hint { display: none; }
}

@media (max-width: 575px) {
  .section { padding: 72px 0; }
  .hero { padding: 100px 0 72px; }
  .code-card { width: 100%; }
}
