:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --border: #e4e7ec;
  --text: #191919;
  --muted: #5e6670;
  --blue: #0a66c2;
  --blue-dark: #004182;
  --blue-soft: #e8f1fb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  /* Segoe UI on Windows, San Francisco on Apple, Open Sans (closest match) elsewhere */
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Open Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* CARD */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.card p + p { margin-top: 12px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem var(--font); cursor: pointer; transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn--sm { min-height: 34px; padding: 0 16px; font-size: .88rem; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { color: var(--blue); border-color: var(--blue); background: #fff; }
.btn--outline:hover { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.btn--icon { width: 40px; padding: 0; background: #fff; border-color: #c4c9d0; color: var(--muted); }
.btn--icon:hover { background: #f2f4f7; color: var(--text); }

/* TOPBAR */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--blue); color: #fff; font-size: .85rem; font-weight: 700; }
.topnav { display: flex; gap: 4px; margin-left: auto; margin-right: 16px; }
.topnav a { padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.topnav a:hover { background: #f2f4f7; color: var(--text); }
.topnav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }

/* PROFILE HEADER */
main { padding: 20px 0 48px; }
.head { padding: 0; overflow: hidden; }
.head__cover {
  height: 220px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.22), transparent 35%),
    radial-gradient(circle at 10% 110%, rgba(112, 181, 249, .55), transparent 45%),
    linear-gradient(115deg, #06305c 0%, #0a66c2 60%, #3d8fe0 100%);
  position: relative;
}
.head__cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.head__body { padding: 0 28px 8px; }

.avatar { position: relative; width: 176px; margin-top: -104px; }
.avatar__ring {
  padding: 4px; border-radius: 50%;
  background: conic-gradient(from 200deg, #0a66c2, #38bdf8, #6366f1, #0a66c2);
}
.avatar__img {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff;
  background: var(--blue-soft); display: grid; place-items: center; overflow: hidden;
}
.avatar__img span { font-size: 3rem; font-weight: 700; color: var(--blue); }
.avatar__img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
  clip-path: circle(49%); transform: scale(1.02);
}

.head__main { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 14px; flex-wrap: wrap; }
.head__name { display: flex; align-items: center; gap: 8px; font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; }
.head__headline { font-size: 1.05rem; margin-top: 4px; max-width: 600px; }
.head__loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-top: 8px; }
.head__loc svg { width: 16px; height: 16px; }
.stats { display: flex; gap: 22px; margin-top: 14px; font-size: .92rem; color: var(--muted); }
.stats strong { color: var(--text); font-size: 1.05rem; margin-right: 2px; }
.head__actions { display: flex; gap: 8px; }

/* HIGHLIGHTS */
.highlights { display: flex; gap: 22px; margin: 26px 0 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.highlights a { display: grid; justify-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); width: 74px; }
.highlights a:hover { color: var(--text); }
.highlights a:hover .hl { transform: translateY(-2px); }
.hl {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--border); box-shadow: inset 0 0 0 3px #fff; transition: transform .15s;
}
.hl svg { width: 26px; height: 26px; }
.highlights .hl { border-color: var(--blue); }
.hl--1 { background: #e8f1fb; color: #0a66c2; }
.hl--2 { background: #eef0ff; color: #4f46e5; }
.hl--3 { background: #e6f7f4; color: #0f8a76; }
.hl--4 { background: #fff4e5; color: #c46a00; }
.hl--5 { background: #fdecec; color: #d32f2f; }
.hl--6 { background: #f3e8ff; color: #7e22ce; }

/* TABS */
.tabs { display: flex; border-top: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tabs a {
  padding: 14px 16px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent;
  white-space: nowrap; transition: color .15s;
}
.tabs a:hover { color: var(--text); background: #f7f8fa; }
.tabs a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }

/* LAYOUT */
.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.side, .panel { display: grid; gap: 16px; }
.side { position: sticky; top: 72px; }

/* INTRO */
.intro__bio { text-align: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.intro { display: grid; gap: 12px; }
.intro li { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; }
.intro svg { color: var(--muted); margin-top: 1px; }
.intro a { font-weight: 600; color: var(--blue); }
.intro a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips li { background: var(--blue-soft); color: var(--blue-dark); font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }

.links { display: grid; gap: 4px; }
.links a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; font-weight: 600; font-size: .93rem; }
.links a:hover { background: #f2f4f7; }
.links__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #eef1f5; color: var(--muted); font-weight: 700; font-size: .8rem; }
.links__ico--in { background: var(--blue); color: #fff; }
.links__ico--yt { background: #ff0000; color: #fff; font-size: .7rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; }

/* FEATURED */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feat { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.feat:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .1); transform: translateY(-2px); }
.feat__thumb { height: 110px; display: grid; place-items: center; color: #fff; font-weight: 700; letter-spacing: .04em; }
.feat__thumb--1 { background: linear-gradient(135deg, #0b2545, #13315c); }
.feat__thumb--2 { background: linear-gradient(135deg, #0a66c2, #38bdf8); }
.feat__thumb--3 { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.feat__thumb--4 { background: linear-gradient(135deg, #4338ca, #818cf8); }
.feat__thumb span { padding: 0 12px; text-align: center; }
.feat__body { padding: 10px 12px; display: grid; font-size: .9rem; }
.feat__body span { color: var(--muted); font-size: .8rem; }

/* EXPERIENCE */
.exp > li { display: flex; gap: 14px; }
.exp > li + li { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.exp h3 { font-size: 1rem; font-weight: 700; }
.exp__org { font-size: .92rem; }
.exp__org a:hover { color: var(--blue); text-decoration: underline; }
.exp__now { color: #15803d; font-weight: 600; font-size: .8rem; }
.exp__meta { color: var(--muted); font-size: .85rem; }
.exp p + p { margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags li { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f2f4f7; color: var(--muted); }
.bullets { list-style: disc; padding-left: 18px; margin-top: 8px; font-size: .92rem; display: grid; gap: 2px; }
.logo-sq--acc { background: #a100ff; }
.logo-sq--lua { background: #1aa3d9; }
.logo-sq { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.logo-sq--1 { background: #0b2545; }
.logo-sq--2 { background: var(--blue); }
.logo-sq--3 { background: #0f8a76; }

/* SKILLS */
.skills { display: grid; gap: 12px; }
.skill { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.skill .hl { width: 52px; height: 52px; border: 0; box-shadow: none; flex-shrink: 0; }
.skill h3 { font-size: 1rem; font-weight: 700; }
.skill p { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* FORM */
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.form input, .form textarea {
  border: 1px solid #c4c9d0; border-radius: 10px; padding: 10px 12px;
  font: inherit; color: var(--text); resize: vertical; background: #fff;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 102, 194, .15); }
.form .btn { justify-self: start; }
.form__alt { margin-top: 14px !important; font-size: .88rem; color: var(--muted); }
.form__alt a { color: var(--blue); font-weight: 600; }

/* TOAST */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; order: 2; }
  .featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { width: 100%; }
  main { padding-top: 0; }
  .topbar__inner { padding: 0 16px; }
  .brand__name { display: none; }
  .card { border-radius: 0; border-left: 0; border-right: 0; }
  .head__cover { height: 120px; }
  .head__body { padding: 0 16px 4px; }
  .avatar { width: 128px; margin-top: -68px; }
  .avatar__status { right: 8px; bottom: 8px; width: 22px; height: 22px; }
  .head__name { font-size: 1.5rem; }
  .head__actions { width: 100%; }
  .head__actions .btn:not(.btn--icon) { flex: 1; }
  .featured, .form__row { grid-template-columns: 1fr; }
  .layout { gap: 8px; margin-top: 8px; }
  .side, .panel { gap: 8px; }
}
.feat__url { font-style: normal; font-size: .78rem; font-weight: 600; color: var(--blue); margin-top: 4px; }

/* ===== SHARED PAGE BITS ===== */
.muted { color: var(--muted); }
.card__title--lg { font-size: 1.5rem; margin-bottom: 6px; }
.card__row { display: flex; justify-content: space-between; align-items: baseline; }
.mini-posts li + li { border-top: 1px solid var(--border); }
.mini-posts a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.mini-posts a:hover strong { color: var(--blue); }
.mini-posts time { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* ===== SERVICES ===== */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.service { display: flex; flex-direction: column; }
.service .hl { width: 52px; height: 52px; border: 0; box-shadow: none; margin-bottom: 14px; }
.service h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.service > p { color: var(--muted); font-size: .93rem; }
.service__points { display: grid; gap: 6px; margin: 14px 0 18px; flex: 1; font-size: .9rem; }
.service__points li { display: flex; gap: 8px; align-items: center; }
.service__points svg { width: 16px; height: 16px; color: #15803d; stroke-width: 2.4; }
.service__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap; }
.service__by { font-size: .85rem; color: var(--muted); }
.service__by:hover strong { color: var(--blue); text-decoration: underline; }

/* ===== BLOG ===== */
.post__author { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post__author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; clip-path: circle(49%); }
.post__author div { display: grid; line-height: 1.3; }
.post__author time { color: var(--muted); font-size: .82rem; }
.badge-draft { margin-left: auto; background: #fff4e5; color: #c46a00; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.post__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.post__title a:hover { color: var(--blue); }
.post__excerpt { color: var(--muted); margin-bottom: 12px !important; }
.post__img { display: block; margin: 0 -24px 14px; }
.post__img img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.wrap--narrow { width: min(760px, 100% - 32px); }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.back:hover { color: var(--blue); }
.back svg { width: 18px; height: 18px; }
.article { padding: 32px 40px; }
.article__title { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; margin: 6px 0 20px; }
.article__img { width: 100%; border-radius: 12px; margin-bottom: 24px; }
.article__foot { display: flex; gap: 8px; border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; }

.prose { font-size: 1.05rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.4rem; font-weight: 700; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .3em; }
.prose a { color: var(--blue); text-decoration: underline; }
.prose blockquote { margin-left: 0; border-left: 4px solid var(--blue); padding: 4px 0 4px 18px; color: var(--muted); font-style: italic; }
.prose code { background: #f2f4f7; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose img { max-width: 100%; border-radius: 12px; }

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topnav { margin-right: 8px; }
  .topnav a { padding: 6px 8px; font-size: .85rem; }
  .topbar .btn--sm { display: none; }
  .article { padding: 22px 18px; }
  .post__img { margin: 0 -24px 14px; }
  .wrap--narrow { width: 100%; }
  .back { margin-left: 16px; }
  .services { gap: 8px; }
}

/* fixes */
.panels { display: grid; gap: 16px; align-content: start; }
.service__points { align-content: start; }
.head__name { line-height: 1.25; }
@media (max-width: 600px) { .panels { gap: 8px; } }
.link { color: var(--blue); font-weight: 600; }
.link:hover { text-decoration: underline; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: .9rem; font-weight: 600; min-height: 1.4em; }
.form__status[data-state="ok"] { color: #15803d; }
.form__status[data-state="error"] { color: #b91c1c; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.article__subtitle { font-size: 1.12rem; color: var(--muted); line-height: 1.6; margin: -8px 0 24px !important; }
.badge-lang { margin-left: auto; background: var(--blue-soft); color: var(--blue-dark); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-lang + .badge-draft { margin-left: 6px; }

/* ===== MOBILE MENU ===== */
.burger {
  display: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; padding: 0; margin-left: auto; place-content: center; gap: 5px;
}
.burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.burger:hover { background: #f2f4f7; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .45);
  opacity: 0; transition: opacity .25s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(330px, 86vw); background: #fff; box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
}
.menu-open .drawer { transform: none; visibility: visible; }
.menu-open .drawer-backdrop { opacity: 1; }
.menu-open, .menu-open body { overflow: hidden; }

.drawer__head {
  display: flex; align-items: center; gap: 12px; padding: 18px 16px 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(115deg, #06305c 0%, #0a66c2 70%, #3d8fe0 100%); color: #fff;
}
.drawer__head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; clip-path: circle(49%); border: 2px solid rgba(255,255,255,.8); }
.drawer__head div { display: grid; line-height: 1.3; flex: 1; min-width: 0; }
.drawer__head strong { font-size: 1rem; }
.drawer__head span { font-size: .78rem; opacity: .85; }
.drawer__close {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15);
  color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.drawer__close:hover { background: rgba(255,255,255,.28); }

.drawer__nav { display: grid; padding: 10px; overflow-y: auto; }
.drawer__nav a {
  display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; color: var(--text);
}
.drawer__nav a svg { color: var(--muted); }
.drawer__nav a:hover, .drawer__nav a:active { background: #f2f4f7; }
.drawer__nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
.drawer__nav a[aria-current="page"] svg { color: var(--blue); }

.drawer__foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.drawer__foot > .btn { width: 100%; min-height: 46px; }
.drawer__social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (max-width: 760px) {
  .topnav, .topbar__cta { display: none !important; }
  .burger { display: grid; }
  .brand__name { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-backdrop { transition: none; }
}
