/* ═══════════════════════════════════════════════════════════════
   mrlipx.is-a.dev — Stylesheet
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Custom scrollbar ── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #252d3d; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #364054; }
* { scrollbar-width: thin; scrollbar-color: #252d3d transparent; }

/* ── Tokens ── */
:root {
  --bg:       #07090f;
  --surface:  #0f1420;
  --surface2: #141928;
  --border:   #1c2232;
  --border2:  #252d3d;
  --accent:   #5b8dee;
  --accent2:  #a78bfa;
  --green:    #34d399;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --sub:      #94a3b8;
  --r:        14px;
  --r-sm:     9px;
  --nav-h:    56px;

  /* Skeleton shimmer colours */
  --skel-base: #141928;
  --skel-shine: #1c2636;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─────────────────────────────────────────────── Background */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(91,141,238,.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,141,238,.038) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, black 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, black 30%, transparent 100%);
}

.bg-glow { position: absolute; border-radius: 50%; pointer-events: none; }

.bg-glow-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(91,141,238,.10) 0%, transparent 70%);
  top: -250px; left: -150px;
}
.bg-glow-2 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(167,139,250,.08) 0%, transparent 70%);
  bottom: -150px; right: -100px;
}
.bg-glow-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(52,211,153,.05) 0%, transparent 70%);
  top: 40%; left: 60%;
}

/* ─────────────────────────────────────────────── Skeleton loader */

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

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--skel-base)  25%,
    var(--skel-shine) 50%,
    var(--skel-base)  75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

.skeleton-inline {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--skel-base)  25%,
    var(--skel-shine) 50%,
    var(--skel-base)  75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
  color: transparent !important;
  min-width: 28px;
  vertical-align: middle;
}

/* ─────────────────────────────────────────────── Nav */

#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(7,9,15,.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}

#nav.scrolled { box-shadow: 0 2px 32px rgba(0,0,0,.55); }

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
  opacity: .8;
  transition: opacity .2s;
}
.nav-brand-bracket { color: var(--accent); opacity: .65; }
.nav-brand:hover   { opacity: 1; }

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link i     { font-size: .88rem; line-height: 1; }
.nav-link:hover { color: var(--text); background: var(--surface2); }

/* ─────────────────────────────────────────────── Page */

.page {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 64px) 28px 100px;
}

/* ─────────────────────────────────────────────── Hero */

.hero {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 80px;
  animation: fadeUp .5s ease both;
}

.avatar-wrap {
  flex-shrink: 0;
  position: relative;
  width: 96px;
  height: 96px;
}

.avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, rgba(91,141,238,.7), rgba(167,139,250,.6), rgba(52,211,153,.45)) border-box;
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  position: relative;
  z-index: 1;
  width: 96px; height: 96px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  z-index: 2;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 8px rgba(52,211,153,.5);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(52,211,153,.5); }
  50%       { box-shadow: 0 0 16px rgba(52,211,153,.8); }
}

.hero-body { flex: 1; min-width: 0; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: var(--accent);
  margin-bottom: 12px;
  min-height: 1.4em;
}
.hero-eyebrow i { font-size: .82rem; line-height: 1; flex-shrink: 0; }

.cursor-blink {
  animation: blink .9s step-end infinite;
  font-weight: 400;
  opacity: .7;
}
@keyframes blink { 0%,100% { opacity: .7; } 50% { opacity: 0; } }

.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #e2e8f0 40%, rgba(91,141,238,.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-bio {
  font-size: .95rem;
  color: var(--sub);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.hero-bio strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* ─────────────────────────────────────────────── Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  font-family: inherit;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
.btn i { font-size: 1rem; line-height: 1; }

.btn-icon {
  width: 16px; height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85;
  pointer-events: none;
  -webkit-user-drag: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(91,141,238,.3);
}
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(91,141,238,.45); }
.btn-primary:active { transform: translateY(0);    box-shadow: 0 4px 12px rgba(91,141,238,.25); }

.btn-ghost {
  background: var(--surface);
  color: var(--sub);
  border: 1px solid var(--border2);
}
.btn-ghost:hover  { background: var(--surface2); color: var(--text); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }

/* ─────────────────────────────────────────────── Stats */

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.stat        { display: flex; flex-direction: column; gap: 3px; }
.stat-value  {
  font-family: 'JetBrains Mono', monospace;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  min-width: 24px;
}
.stat-label  { font-size: .68rem; color: var(--muted); line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.stat-divider { width: 1px; height: 28px; background: var(--border2); flex-shrink: 0; }

/* ─────────────────────────────────────────────── Section */

.section         { margin-bottom: 64px; }
.section.is-hidden  { opacity: 0; transform: translateY(18px); }
.section.animate-in { animation: fadeUp .5s ease both; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─────────────────────────────────────────────── Featured card */

.featured-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .2s, box-shadow .25s;
}

.featured-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(91,141,238,.05) 0%, rgba(167,139,250,.04) 100%);
  pointer-events: none;
}
.featured-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,141,238,.55), transparent);
}
.featured-card:hover {
  border-color: rgba(91,141,238,.45);
  transform: translateY(-3px);
  box-shadow: 0 20px 56px rgba(91,141,238,.10);
}

.featured-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(91,141,238,.06), transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.featured-card:hover .featured-shine { opacity: 1; }

.featured-icon-wrap {
  width: 68px; height: 68px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 14px;
}
.featured-icon-wrap img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.featured-meta { flex: 1; min-width: 0; }
.featured-top  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.featured-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.03em; }

.featured-desc {
  font-size: .875rem;
  color: var(--sub);
  line-height: 1.7;
  margin-bottom: 16px;
}
.featured-desc strong { color: var(--text); font-weight: 600; }

.featured-footer  { display: flex; align-items: center; gap: 6px; }
.featured-visit   { font-size: .78rem; color: var(--accent); font-weight: 500; }
.featured-arrow   { color: var(--accent); font-size: .9rem; transition: transform .2s; line-height: 1; }
.featured-card:hover .featured-arrow { transform: translateX(4px); }

/* ─────────────────────────────────────────────── Tags */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-blue   { background: rgba(91,141,238,.12);  color: var(--accent);  border: 1px solid rgba(91,141,238,.22); }
.tag-purple { background: rgba(167,139,250,.12); color: var(--accent2); border: 1px solid rgba(167,139,250,.22); }
.tag-green  { background: rgba(52,211,153,.12);  color: var(--green);   border: 1px solid rgba(52,211,153,.22); }

/* ─────────────────────────────────────────────── Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  transition: border-color .2s;
}
.skill-group:hover { border-color: var(--border2); }

.skill-group-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  font-size: .78rem;
  color: var(--sub);
  font-weight: 500;
  transition: border-color .2s, color .2s;
}
.skill-tag:hover { border-color: rgba(91,141,238,.3); color: var(--text); }
.skill-tag i { font-size: .9rem; line-height: 1; }

/* ─────────────────────────────────────────────── Repo grid */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.repo-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, transform .15s, background .2s, box-shadow .2s;
  /* Ensure inline skeleton blocks don't stretch */
  overflow: hidden;
}
.repo-card:not(.repo-skeleton):hover {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* Skeleton state — no hover transform */
.repo-skeleton { cursor: default; pointer-events: none; gap: 10px; }

.repo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.repo-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(91,141,238,.08);
  border: 1px solid rgba(91,141,238,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 8px;
}
.repo-icon-wrap img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.repo-icon-gh { background: rgba(255,255,255,.04); border-color: var(--border2); }
.repo-icon-gh i { color: var(--sub); font-size: 1.2rem; line-height: 1; }

.repo-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.repo-card:hover .repo-ext { background: rgba(91,141,238,.08); border-color: rgba(91,141,238,.25); }
.repo-ext i { color: var(--muted); font-size: .78rem; line-height: 1; }
.repo-card:hover .repo-ext i { color: var(--accent); }

.repo-name { font-size: .9rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.repo-desc { font-size: .78rem; color: var(--muted); line-height: 1.55; flex: 1; }

.repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.repo-lang, .repo-stars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--muted);
}
.repo-stars i { font-size: .72rem; line-height: 1; }

.lang-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Error state for repos */
.repo-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: var(--r);
  border: 1px solid rgba(239,68,68,.2);
  background: rgba(239,68,68,.04);
  font-size: .82rem;
  color: var(--muted);
}
.repo-error i { color: #ef4444; font-size: 1rem; flex-shrink: 0; }

/* ─────────────────────────────────────────────── Contact */

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(52,211,153,.04) 0%, rgba(91,141,238,.04) 100%);
  pointer-events: none;
}
.contact-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52,211,153,.4), transparent);
}
.contact-body    { position: relative; }
.contact-heading { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; color: var(--text); }
.contact-sub     { font-size: .85rem; color: var(--sub); max-width: 360px; line-height: 1.6; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }

/* ─────────────────────────────────────────────── Footer */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  animation: fadeUp .5s .28s ease both;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
}
.footer-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border2);
  pointer-events: none;
}
.footer-dot { opacity: .4; }

.footer-right { display: flex; align-items: center; gap: 14px; }

.footer-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-link i     { font-size: .82rem; line-height: 1; }
.footer-link:hover { color: var(--text); }

/* ─────────────────────────────────────────────── Animations */

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

/* ─────────────────────────────────────────────── Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ─────────────────────────────────────────────── Mobile */

@media (max-width: 640px) {
  .hero              { flex-direction: column; gap: 20px; }
  .hero-name         { font-size: 2.2rem; }
  .featured-card     { flex-wrap: wrap; gap: 16px; }
  .featured-arrow    { display: none; }
  .nav-link span     { display: none; }
  .hero-stats        { gap: 14px; }
  .contact-card      { flex-direction: column; align-items: flex-start; }
  .skills-grid       { grid-template-columns: 1fr; }
  .repo-grid         { grid-template-columns: 1fr; }
}
