/* ============================================================
   Shamil Prematunga — portfolio
   Dark, distinct theme
   ============================================================ */

:root {
  --bg: #0a0c10;
  --bg-alt: #0c0f15;
  --surface: #12151d;
  --surface-2: #161a23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #e7eaf0;
  --text-muted: #9aa3b2;
  --text-dim: #6b7280;

  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-ring: rgba(52, 211, 153, 0.35);
  --grad: linear-gradient(120deg, #34d399 0%, #22d3ee 100%);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

/* subtle grid/glow backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(760px 480px at 8% 4%, rgba(52, 211, 153, 0.10), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
strong { color: var(--text); font-weight: 600; }
em { color: var(--accent); font-style: normal; font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 12, 16, 0.6);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.nav.is-scrolled { background: rgba(10, 12, 16, 0.85); border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: block;
  border: 1px solid var(--border-strong);
}
.brand__text { font-size: 15px; letter-spacing: -0.01em; }
.brand__dot { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .2s ease, background .2s ease;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav__links a.is-active { color: var(--accent); }
.nav__cta {
  color: #04110c !important; background: var(--grad);
  font-weight: 600 !important; margin-left: 6px;
}
.nav__cta:hover { background: var(--grad); filter: brightness(1.08); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  font-family: var(--font-display); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--grad); color: #04110c; box-shadow: 0 10px 30px -12px var(--accent-ring); }
.btn--primary:hover { transform: translateY(-2px); color: #04110c; box-shadow: 0 16px 36px -12px var(--accent-ring); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--surface); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-ring); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-ring); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero__name { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero__role { font-family: var(--font-display); font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 600; color: var(--text); margin-bottom: 20px; }
.hero__role .sep { color: var(--accent); margin: 0 6px; }
.hero__role .muted { color: var(--text-dim); font-weight: 400; }
.hero__bio { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin-bottom: 30px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__socials { display: flex; gap: 22px; }
.hero__socials a { font-family: var(--font-mono); font-size: 13.5px; color: var(--text-muted); position: relative; }
.hero__socials a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: var(--accent); transition: width .25s ease; }
.hero__socials a:hover { color: var(--accent); }
.hero__socials a:hover::after { width: 100%; }

/* profile card */
.profilecard {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.profilecard::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .22; pointer-events: none; }
.profilecard__top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profilecard__avatar { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; display: block; border: 1px solid var(--border-strong); }
.profilecard__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.profilecard__sub { color: var(--text-muted); font-size: 13.5px; }
.profilecard__meta { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.profilecard__meta li { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.profilecard__meta li:last-child { border-bottom: 0; padding-bottom: 0; }
.profilecard__meta .k { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.profilecard__meta .v { color: var(--text); font-weight: 500; }
.profilecard__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.profilecard__foot code { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 54px; border-top: 1px solid var(--border); padding-top: 34px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat__num--text { font-size: clamp(1.6rem, 3.3vw, 2.2rem); }
.stat__label { color: var(--text-muted); font-size: 13.5px; }

/* ---------- sections ---------- */
.section { padding: 84px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 38px; }
.section__index { font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 500; }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; }
.section__lead { color: var(--text-muted); margin-top: -22px; margin-bottom: 34px; max-width: 640px; }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.about__lead p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.05rem; }
.about__lead p:last-child { margin-bottom: 0; }
.about__side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; height: fit-content; }
.about__sideTitle { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 18px; font-weight: 500; }
.edu { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.edu__degree { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.edu__meta { color: var(--text-muted); font-size: 13px; margin-bottom: 6px; }
.edu__meta .dot { margin: 0 4px; }
.edu__note { color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.about__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }

/* ---------- stack ---------- */
.stack__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stackgroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .25s ease, transform .25s ease; }
.stackgroup:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.stackgroup h3 { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; font-weight: 500; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 11px; transition: border-color .2s ease, color .2s ease; }
.pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--accent), transparent); }
.tl { position: relative; padding-bottom: 36px; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: -28px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tl__role { font-size: 1.2rem; font-weight: 600; }
.tl__date { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.tl__org { color: var(--accent); font-weight: 500; font-size: 14.5px; margin: 2px 0 12px; }
.tl__points { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tl__points li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 14.5px; }
.tl__points li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* consulting */
.consulting { margin-top: 40px; background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 24px; }
.consulting__tag { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.consulting__role { font-size: 1.15rem; font-weight: 600; margin: 8px 0 4px; display: inline-block; }
.consulting__date { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); margin-left: 10px; }
.consulting__desc { color: var(--text-muted); font-size: 14.5px; margin-top: 10px; max-width: 760px; }

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: all .2s ease; }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active { color: #04110c; background: var(--grad); border-color: transparent; font-weight: 600; }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden; }
.project::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.project:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.project:hover::after { transform: scaleX(1); }
.project.is-hidden { display: none; }
.project__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.project__no { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.project__cat { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.project__title { font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.project__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.project__desc { color: var(--text-muted); font-size: 14.5px; margin-bottom: 18px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; }
.tags--muted span { background: transparent; }

/* ---------- research ---------- */
.research { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.research--single { grid-template-columns: 1fr; max-width: 900px; }
.research--single .research__abstract:last-child { margin-bottom: 0; }
.research__main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.research__badge { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.research__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.research__subtitle { color: var(--accent); font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; margin-bottom: 18px; }
.research__abstract { color: var(--text-muted); font-size: 1rem; margin-bottom: 26px; }
.phases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.phase { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.phase__no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600; display: block; margin-bottom: 8px; }
.phase p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }
.research__side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: sticky; top: 90px; }
.research__side h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 14px; font-weight: 500; }
.research__side h4:not(:first-child) { margin-top: 22px; }

/* ---------- open source ---------- */
.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.repo { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; color: var(--text); }
.repo:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.repo__head { display: flex; align-items: center; gap: 9px; }
.repo__icon { color: var(--accent); flex-shrink: 0; }
.repo__name { font-family: var(--font-mono); font-size: 14.5px; font-weight: 600; color: var(--text); }
.repo:hover .repo__name { color: var(--accent); }
.repo__desc { color: var(--text-muted); font-size: 13.5px; flex-grow: 1; }
.repo__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.repo__tags span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }

/* ---------- certifications & awards ---------- */
.award { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius); padding: 28px; margin-bottom: 34px; }
.award__medal { display: grid; place-items: center; align-content: center; width: 88px; height: 88px; border-radius: 20px; background: var(--grad); color: #04110c; line-height: 1; }
.award__rank { font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.award__place { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.award__tag { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.award__title { font-size: 1.4rem; font-weight: 700; margin: 8px 0 2px; }
.award__meta { color: var(--text-muted); font-size: 13.5px; margin-bottom: 12px; }
.award__meta .dot { margin: 0 6px; }
.award__desc { color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; max-width: 760px; }

.certs__heading { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 500; margin-bottom: 16px; }
.certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-height: 430px; overflow-y: auto; padding: 2px 10px 2px 2px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.certs::-webkit-scrollbar { width: 8px; }
.certs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.certs::-webkit-scrollbar-track { background: transparent; }
.certcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; transition: border-color .2s ease, transform .2s ease; }
.certcard:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.certcard__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.35; }
.certcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.certcard__issuer { color: var(--accent); font-size: 13px; font-weight: 500; }
.certcard__year { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* ---------- writing ---------- */
.content-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contentcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; color: var(--text); }
.contentcard:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.contentcard__kind { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 12px; }
.contentcard__title { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.contentcard__desc { color: var(--text-muted); font-size: 14.5px; flex-grow: 1; margin-bottom: 16px; }
.contentcard__link { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--accent); }

/* ---------- recommendations ---------- */
.recos {
  display: flex; flex-direction: column; gap: 16px;
  max-height: 540px; overflow-y: auto;
  padding: 4px 14px 4px 4px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 22px), transparent 100%);
}
.recos::-webkit-scrollbar { width: 8px; }
.recos::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.recos::-webkit-scrollbar-track { background: transparent; }
.recos:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 4px; border-radius: var(--radius); }

.reco { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; position: relative; }
.reco::before { content: "\201C"; position: absolute; top: 2px; left: 16px; font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--accent); opacity: .25; }
.reco__text { color: var(--text-muted); font-size: 15px; line-height: 1.65; margin: 0 0 18px; position: relative; }
.reco__by { display: flex; align-items: center; gap: 13px; }
.reco__avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #04110c; font-family: var(--font-display); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.reco__meta { display: flex; flex-direction: column; }
.reco__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); }
.reco__role { font-size: 12.5px; color: var(--text-dim); }
.reco__role .dot { margin: 0 5px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact__lead h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.contact__lead p { color: var(--text-muted); margin-bottom: 26px; max-width: 460px; }
.contact__links { display: flex; flex-direction: column; gap: 10px; }
.contact__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; color: var(--text); transition: border-color .2s ease, transform .2s ease; }
.contact__row:not(.contact__row--static):hover { border-color: var(--accent); transform: translateX(4px); color: var(--text); }
.contact__k { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); }
.contact__v { font-size: 14px; color: var(--text); font-weight: 500; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__brand { font-family: var(--font-display); font-weight: 600; }
.footer__copy { color: var(--text-dim); font-size: 13px; }
.footer__top { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }

/* ---------- reveal animation (only when JS is active) ---------- */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__card { max-width: 420px; }
  .about__grid, .research, .contact { grid-template-columns: 1fr; gap: 28px; }
  .research__side { position: static; }
  .stack__grid { grid-template-columns: repeat(2, 1fr); }
  .repos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .nav__links {
    position: fixed; top: 68px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(10, 12, 16, 0.98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 12px 24px 20px;
    transform: translateY(-120%); transition: transform .32s ease; z-index: 90;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 12px; font-size: 15px; }
  .nav__cta { margin: 6px 0 0; text-align: center; }
  .nav__toggle { display: flex; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .stack__grid, .projects, .repos, .content-cards, .phases, .certs { grid-template-columns: 1fr; }
  .award { grid-template-columns: 1fr; gap: 18px; }
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 24px; }
  .tl__head { flex-direction: column; gap: 2px; }
  .consulting__date { margin-left: 0; display: block; margin-top: 4px; }
}

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