/* =====================================================================
   Kamran Ahmed — Personal Site
   Design system + components + animations
   ===================================================================== */

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

/* ----------  Design tokens  ---------- */
:root {
  /* dark (default) */
  --bg:           #05070e;
  --bg-2:         #080b16;
  --bg-3:         #0c1120;
  --surface:      rgba(255, 255, 255, 0.035);
  --surface-2:    rgba(255, 255, 255, 0.06);
  --border:       rgba(255, 255, 255, 0.09);
  --border-strong:rgba(255, 255, 255, 0.16);
  --text:         #e8edf7;
  --text-soft:    #b9c2d6;
  --muted:        #7f8aa3;
  --muted-2:      #59627a;

  --accent:       #38bdf8;   /* sky   */
  --accent-2:     #6366f1;   /* indigo*/
  --accent-3:     #22d3ee;   /* cyan  */
  --accent-glow:  rgba(56, 189, 248, 0.5);
  --grad:         linear-gradient(120deg, #22d3ee 0%, #38bdf8 40%, #6366f1 100%);
  --grad-soft:    linear-gradient(120deg, rgba(34,211,238,.16), rgba(99,102,241,.16));

  --radius:       18px;
  --radius-sm:    12px;
  --radius-lg:    26px;
  --shadow:       0 24px 60px -20px rgba(0,0,0,.6);
  --shadow-glow:  0 0 0 1px var(--border), 0 20px 60px -25px var(--accent-glow);

  --maxw: 1180px;
  --nav-h: 72px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

:root[data-theme="light"] {
  --bg:           #f5f7fc;
  --bg-2:         #eef1f8;
  --bg-3:         #e6ebf5;
  --surface:      rgba(12, 20, 40, 0.028);
  --surface-2:    rgba(12, 20, 40, 0.05);
  --border:       rgba(12, 24, 55, 0.10);
  --border-strong:rgba(12, 24, 55, 0.2);
  --text:         #0d1526;
  --text-soft:    #34405a;
  --muted:        #5b6784;
  --muted-2:      #8390aa;

  --accent:       #0284c7;
  --accent-2:     #4f46e5;
  --accent-3:     #0891b2;
  --accent-glow:  rgba(2, 132, 199, 0.28);
  --grad:         linear-gradient(120deg, #0891b2 0%, #0284c7 40%, #4f46e5 100%);
  --grad-soft:    linear-gradient(120deg, rgba(8,145,178,.12), rgba(79,70,229,.12));
  --shadow:       0 24px 60px -26px rgba(30,50,110,.28);
}

/* ----------  Reset / base  ---------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  letter-spacing: .002em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
::selection { background: var(--accent-2); color: #fff; }

/* Background aurora layer */
.bg-aura {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(56,189,248,.15), transparent 60%),
    radial-gradient(55% 50% at 92% 12%, rgba(99,102,241,.16), transparent 60%),
    radial-gradient(60% 60% at 78% 92%, rgba(34,211,238,.10), transparent 62%),
    var(--bg);
}
.bg-aura::after {
  content: ""; position: absolute; inset: -10%;
  background-image: radial-gradient(rgba(255,255,255,.5) .6px, transparent .6px);
  background-size: 46px 46px;
  opacity: .025;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 40%, transparent 100%);
}
:root[data-theme="light"] .bg-aura::after { opacity: .05; }

.bg-blob {
  position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px);
  opacity: .5; pointer-events: none; will-change: transform;
}
.bg-blob.b1 { width: 480px; height: 480px; top: -140px; left: -120px; background: radial-gradient(circle, rgba(56,189,248,.5), transparent 70%); animation: float1 18s var(--ease) infinite; }
.bg-blob.b2 { width: 420px; height: 420px; bottom: -160px; right: -100px; background: radial-gradient(circle, rgba(99,102,241,.45), transparent 70%); animation: float2 22s var(--ease) infinite; }
@keyframes float1 { 50% { transform: translate(60px, 40px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-50px, -30px) scale(1.08); } }

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 200; box-shadow: 0 0 14px var(--accent-glow);
  transition: width .1s linear;
}

/* ----------  Layout helpers  ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.section { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.section-sm { padding: clamp(48px, 7vw, 88px) 0; }
.center { text-align: center; }
.grid { display: grid; gap: 24px; }

/* Section heading */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.section-title { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 16px; }
.section-lead { color: var(--muted); max-width: 640px; font-size: 1.06rem; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 100px; font-weight: 600; font-size: .96rem;
  border: 1px solid transparent; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  position: relative; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #04121f; box-shadow: 0 10px 30px -10px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.btn-arrow svg { transition: transform .3s var(--ease); }
.btn-arrow:hover svg { transform: translateX(4px); }

/* ----------  Navbar  ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  transition: background .35s var(--ease), border-color .35s, backdrop-filter .35s, height .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border);
  height: 62px;
}
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; flex: none; }
.brand > span:last-child { display: inline-flex; flex-direction: column; line-height: 1.15; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #04121f; font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 18px -6px var(--accent-glow); flex: none;
}
.brand small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: .62rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; white-space: nowrap; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  padding: 9px 15px; border-radius: 100px; font-size: .93rem; font-weight: 500; color: var(--text-soft);
  transition: color .25s, background .25s; position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 3px; height: 2px;
  background: var(--grad); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center;
  transition: transform .4s var(--ease), border-color .3s, background .3s;
}
.theme-toggle:hover { transform: rotate(35deg); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

.nav-cta { display: inline-flex; }
.hamburger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.hamburger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--text-soft); padding: 10px 20px; transition: color .25s, transform .25s; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); }
.mobile-menu.open a { animation: menuItem .5s var(--ease-out) both; }
@keyframes menuItem { from { opacity: 0; transform: translateY(20px);} }

/* ----------  Hero  ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-h); overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.hero-status {
  display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; color: var(--text-soft);
  border: 1px solid var(--border); background: var(--surface); padding: 7px 15px; border-radius: 100px; margin-bottom: 26px;
  font-family: var(--font-mono);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0);} 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0);} }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; margin-bottom: 20px; letter-spacing: -.03em; }
.hero-roles { font-family: var(--font-mono); font-size: clamp(.95rem, 2.2vw, 1.2rem); color: var(--accent); margin-bottom: 22px; height: 1.6em; }
.hero-roles .cursor { display: inline-block; width: 2px; background: var(--accent); margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: var(--text-soft); font-size: 1.1rem; max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-socials { display: flex; gap: 12px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-soft); transition: transform .3s var(--ease), color .3s, border-color .3s, background .3s;
}
.social-btn:hover { transform: translateY(-4px); color: var(--accent); border-color: var(--accent); background: var(--surface-2); }
.social-btn svg { width: 20px; height: 20px; }

/* Hero portrait / card */
.hero-card {
  position: relative; border-radius: var(--radius-lg); padding: 30px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.hero-avatar {
  width: 130px; height: 130px; border-radius: 26px; margin: 0 auto 20px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; color: #04121f;
  background: var(--grad); box-shadow: 0 20px 50px -18px var(--accent-glow); position: relative;
}
.hero-avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 28px; background: var(--grad); z-index: -1; filter: blur(16px); opacity: .55; }
.hero-card h3 { text-align: center; font-size: 1.35rem; }
.hero-card .role { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.hero-card .meta-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border); color: var(--text-soft); font-size: .9rem; }
.hero-card .meta-row svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; font-family: var(--font-mono); letter-spacing: .15em; }
.scroll-hint .mouse { width: 24px; height: 38px; border: 2px solid var(--border-strong); border-radius: 14px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 4px; height: 7px; border-radius: 3px; background: var(--accent); animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%,0);} 40%{opacity:1;} 80% { opacity: 0; transform: translate(-50%, 12px);} }

/* ----------  Cards  ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .4s var(--ease), border-color .4s, background .4s, box-shadow .4s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(340px circle at var(--mx,50%) var(--my,0%), rgba(56,189,248,.12), transparent 60%);
  transition: opacity .4s; pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad-soft); border: 1px solid var(--border); color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  text-align: center; padding: 26px 18px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); position: relative; overflow: hidden;
}
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1; }
.stat .label { color: var(--muted); font-size: .85rem; margin-top: 10px; letter-spacing: .02em; }

/* Chips / tags */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: .82rem; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); transition: transform .25s var(--ease), color .25s, border-color .25s, background .25s;
  font-weight: 500;
}
.chip:hover { transform: translateY(-2px); color: var(--text); border-color: var(--accent); background: var(--surface-2); }
.chip.mono { font-family: var(--font-mono); font-size: .76rem; }

/* ----------  Timeline (experience)  ---------- */
.timeline { position: relative; margin-top: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}
.tl-item { position: relative; padding-left: 62px; padding-bottom: 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 11px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--accent); display: grid; place-items: center;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--bg) 70%, transparent);
}
.tl-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: transform .4s var(--ease), border-color .4s, box-shadow .4s; }
.tl-card:hover { transform: translateX(6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.tl-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.tl-role { font-family: var(--font-display); font-weight: 700; font-size: 1.16rem; }
.tl-date { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); white-space: nowrap; padding: 4px 12px; border: 1px solid var(--border); border-radius: 100px; background: var(--surface); }
.tl-company { color: var(--text-soft); font-weight: 500; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-company .loc { color: var(--muted); font-size: .86rem; font-weight: 400; }
.tl-desc { color: var(--muted); font-size: .95rem; margin: 12px 0 0; }
.tl-desc.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tl-more { background: none; border: none; color: var(--accent); font-size: .85rem; font-weight: 600; padding: 10px 0 0; display: inline-flex; align-items: center; gap: 6px; }
.tl-more svg { width: 14px; height: 14px; transition: transform .3s; }
.tl-more.open svg { transform: rotate(180deg); }

/* ----------  Skills  ---------- */
.skill-group { margin-bottom: 34px; }
.skill-group h3 { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; margin-bottom: 18px; }
.skill-group h3 .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--grad-soft); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); }
.skill-group h3 .ico svg { width: 20px; height: 20px; }

/* Skill meter */
.meter-list { display: grid; gap: 16px; }
.meter-row .meter-top { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 7px; }
.meter-row .meter-top b { font-weight: 600; }
.meter-row .meter-top span { color: var(--muted); font-family: var(--font-mono); font-size: .8rem; }
.meter { height: 8px; border-radius: 100px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.meter-fill { height: 100%; width: 0; border-radius: 100px; background: var(--grad); transition: width 1.4s var(--ease-out); box-shadow: 0 0 12px var(--accent-glow); }

/* ----------  Certifications  ---------- */
.cert-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-btn {
  padding: 9px 18px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font-size: .88rem; font-weight: 500; transition: all .3s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active { background: var(--grad); color: #04121f; border-color: transparent; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cert-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); transition: transform .35s var(--ease), border-color .35s, background .35s; }
.cert-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.cert-logo { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: #fff; }
.cert-body { min-width: 0; }
.cert-body h4 { font-family: var(--font-body); font-weight: 600; font-size: .98rem; line-height: 1.35; margin-bottom: 5px; }
.cert-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.cert-auth { color: var(--accent); font-weight: 500; }
.cert-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: .8rem; color: var(--accent); font-weight: 600; }
.cert-link svg { width: 13px; height: 13px; }

/* ----------  Articles  ---------- */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.article-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s; height: 100%;
}
.article-card:hover { transform: translateY(-7px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.article-cover { height: 170px; position: relative; overflow: hidden; display: grid; place-items: center; }
.article-cover .cat-tag { position: absolute; top: 14px; left: 14px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 100px; background: rgba(4,12,25,.55); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); }
.article-cover .cover-ico { color: rgba(255,255,255,.92); }
.article-cover .cover-ico svg { width: 54px; height: 54px; }
.article-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.article-meta { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); font-family: var(--font-mono); margin-bottom: 12px; }
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-meta svg { width: 13px; height: 13px; }
.article-card h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 10px; }
.article-card .excerpt { color: var(--muted); font-size: .93rem; margin-bottom: 18px; flex: 1; }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.article-read { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--accent); margin-top: auto; }
.article-read svg { width: 16px; height: 16px; transition: transform .3s; }
.article-card:hover .article-read svg { transform: translateX(4px); }

/* Article detail */
.article-hero { padding-top: calc(var(--nav-h) + 40px); }
.article-hero .cat-tag { display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding: 5px 14px; border: 1px solid var(--border); border-radius: 100px; background: var(--surface); margin-bottom: 20px; }
.article-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 18px; max-width: 900px; }
.article-hero .sub { color: var(--text-soft); font-size: 1.15rem; max-width: 760px; margin-bottom: 22px; }
.article-hero .amETA { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .88rem; font-family: var(--font-mono); align-items: center; }
.article-hero .amETA span { display: inline-flex; align-items: center; gap: 6px; }
.article-hero .amETA svg { width: 15px; height: 15px; color: var(--accent); }

.prose { max-width: 760px; margin: 0 auto; font-size: 1.06rem; color: var(--text-soft); }
.prose h2 { font-size: 1.55rem; margin: 2.4em 0 .7em; color: var(--text); position: relative; padding-top: .3em; }
.prose h2::before { content: ""; position: absolute; left: -22px; top: .55em; width: 8px; height: 26px; border-radius: 4px; background: var(--grad); }
.prose h3 { font-size: 1.22rem; margin: 1.8em 0 .5em; color: var(--text); }
.prose p { margin: 0 0 1.25em; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin-bottom: .55em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.prose blockquote {
  margin: 2em 0; padding: 22px 26px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-soft); font-style: italic;
}
.prose blockquote cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--font-mono); font-size: .85rem; color: var(--accent); }
.prose pre {
  background: #060911; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 22px;
  overflow-x: auto; margin: 1.6em 0; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; color: #cdd6e6;
}
:root[data-theme="light"] .prose pre { background: #0c1120; color: #cdd6e6; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border); }
.prose pre code { background: none; border: none; padding: 0; font-size: 1em; }
.prose img { border-radius: var(--radius-sm); margin: 1.6em 0; border: 1px solid var(--border); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose .callout { background: var(--grad-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 22px; margin: 1.8em 0; color: var(--text); }
.prose .table-wrap { overflow-x: auto; margin: 1.6em 0; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.prose thead th { background: var(--surface-2); color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: .88rem; }
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody td:first-child { color: var(--text); font-weight: 500; }

.article-footer-nav { max-width: 760px; margin: 60px auto 0; padding-top: 30px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ----------  About specifics  ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.value-list { display: grid; gap: 14px; }
.value-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); transition: transform .3s var(--ease), border-color .3s; }
.value-item:hover { transform: translateX(5px); border-color: var(--border-strong); }
.value-item .vi { width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); }
.value-item .vi svg { width: 20px; height: 20px; }
.value-item b { display: block; margin-bottom: 3px; }
.value-item span { color: var(--muted); font-size: .9rem; }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.info-card h3 { font-size: 1.1rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.info-card h3 svg { width: 20px; height: 20px; color: var(--accent); }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: .93rem; }
.info-row:first-of-type { border-top: none; }
.info-row .k { color: var(--muted); }
.info-row .v { color: var(--text); font-weight: 500; text-align: right; }

.lang-row { margin-bottom: 16px; }
.lang-row .meter-top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .93rem; }

/* ----------  Contact  ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.contact-card {
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 30px;
  display: flex; flex-direction: column; gap: 6px; transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.contact-card .ci { width: 54px; height: 54px; border-radius: 15px; background: var(--grad-soft); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); margin-bottom: 16px; }
.contact-card .ci svg { width: 26px; height: 26px; }
.contact-card .lbl { color: var(--muted); font-size: .82rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.contact-card .val { font-size: 1.12rem; font-weight: 600; word-break: break-word; }
.contact-card .go { margin-top: auto; padding-top: 16px; color: var(--accent); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 7px; }
.contact-card .go svg { width: 15px; height: 15px; transition: transform .3s; }
.contact-card:hover .go svg { transform: translateX(4px); }

.cta-band {
  border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 70px); text-align: center; position: relative; overflow: hidden;
  background: var(--grad-soft); border: 1px solid var(--border);
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px; }
.cta-band p { color: var(--text-soft); max-width: 560px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ----------  Footer  ---------- */
.footer { border-top: 1px solid var(--border); padding: 54px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; font-family: var(--font-mono); font-weight: 500; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--text-soft); font-size: .93rem; transition: color .25s, padding-left .25s; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.footer-brand p { color: var(--muted); font-size: .93rem; max-width: 320px; margin-top: 14px; }
.footer-socials { display: flex; gap: 10px; margin-top: 18px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.footer-bottom a { color: var(--text-soft); }
.footer-bottom a:hover { color: var(--accent); }

/* Back to top */
.to-top {
  position: fixed; right: 26px; bottom: 26px; width: 48px; height: 48px; border-radius: 50%; z-index: 90;
  border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px); color: var(--text); display: grid; place-items: center;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: all .4s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ----------  Reveal animations  ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .40s; }
.reveal-left { opacity: 0; transform: translateX(-34px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(34px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal-scale.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1 !important; transform: none !important; }
}

/* ----------  Responsive  ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 420px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 760px) {
  .prose h2::before { display: none; }
  .prose { font-size: 1.02rem; }
  .highlight-inner { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cert-grid, .articles-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
