/* Md Asif Husain portfolio. One static page, no build step. Dark only: the reactor HUD is the brand.
   Palette (3 colours): Navy #070B14 (base, neutrals derived from it), Arc cyan #38D9F5 (links, reactor, highlights),
   Ember amber #FFB547 (primary actions, prices, the heart core). Coral is functional only (end call, errors).
   Shape rule: buttons and tags are pills; surfaces (images, tiles, panels) use --r (16px). */
@font-face { font-family: Geist; src: url(assets/Geist-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(assets/GeistMono-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #070b14; --navy-2: #0b1221; --surface: #0f182a; --line: #1b2840;
  --text: #e9eef7; --muted: #9aa7bd; --faint: #6c7a92;
  --cyan: #38d9f5; --cyan-soft: rgb(56 217 245 / .1);
  --amber: #ffb547; --amber-ink: #1d1203; --amber-soft: rgb(255 181 71 / .12);
  --danger: #ff6b6b;
  --r: 16px; --max: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--text); font: 400 17px/1.6 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--cyan); color: var(--navy); }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: var(--amber); color: var(--amber-ink); border-radius: 999px; z-index: 30; }
.skip:focus { left: 12px; }

/* Icons: library SVGs used as masks so they take currentColor */
.ic { display: inline-block; width: 1.15em; height: 1.15em; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55em; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 500 16px/1 Geist, sans-serif; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: #ffc46e; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-danger { background: var(--danger); color: #1f0606; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn[aria-pressed="true"] { background: var(--text); color: var(--navy); }
.link { display: inline-flex; align-items: center; gap: .35em; color: var(--cyan); font-weight: 500; }
.link .ic { transition: transform .2s var(--ease); }
.link:hover .ic { transform: translate(2px, -2px); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 max(20px, calc((100vw - var(--max)) / 2)); background: rgb(7 11 20 / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 600; letter-spacing: -.01em; }
.nav nav { display: flex; gap: 24px; margin-left: auto; color: var(--muted); font-size: 15px; }
.nav nav a:hover { color: var(--cyan); }

section { padding: 96px max(20px, calc((100vw - var(--max)) / 2)); }
h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 36px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; min-height: calc(100dvh - 68px); padding-top: 48px; padding-bottom: 48px; background: radial-gradient(50% 60% at 78% 50%, rgb(56 217 245 / .08), transparent 70%); }
.eyebrow { font: 500 13px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 22px; }
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); max-width: 13ch; }
.lede { margin-top: 22px; max-width: 46ch; font-size: 19px; color: var(--muted); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Assistant panel */
.twin { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 24px 22px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgb(15 24 42 / .9), rgb(11 18 33 / .9)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 30px 80px -40px rgb(56 217 245 / .25); }
.twin-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.twin-id { display: flex; align-items: center; gap: 10px; }
.twin-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 2px var(--navy-2), 0 0 0 3px rgb(56 217 245 / .5); }
.twin-name { font-weight: 600; }
.twin-status { font: 500 12.5px/1 "Geist Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.twin[data-state="listening"] .twin-status, .twin[data-state="connecting"] .twin-status { color: var(--cyan); }
.twin[data-state="speaking"] .twin-status { color: var(--amber); }
.twin[data-state="error"] .twin-status { color: var(--danger); }
.reactor { display: block; width: min(320px, 72vw); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.reactor canvas { display: block; width: 100%; height: 100%; }
.twin:not([data-state="idle"]):not([data-state="ended"]):not([data-state="error"]) .reactor { cursor: default; }
.captions { width: 100%; min-height: 84px; max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 15px; scrollbar-width: thin; }
.captions .hint { color: var(--faint); text-align: center; margin: auto 0; }
.captions .line { padding: 8px 12px; border-radius: 12px; max-width: 92%; }
.captions .assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.captions .user { align-self: flex-end; background: var(--cyan-soft); border: 1px solid rgb(56 217 245 / .18); }
.captions .partial { opacity: .65; }
.twin-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; min-height: 40px; }
.fine { font-size: 12.5px; color: var(--faint); text-align: center; max-width: 42ch; }

/* Live projects */
.work-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 28px; align-items: start; }
.shot-img { display: block; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); }
.shot-img img { transition: transform .6s var(--ease); }
.shot-img:hover img { transform: scale(1.025); }
.shot-body { padding: 20px 4px 0; display: grid; gap: 10px; }
.shot-body h3 { font-size: 21px; }
.shot-body p { color: var(--muted); max-width: 60ch; }
.shot:not(.shot-lg) { margin-top: 72px; }

/* Open source rows */
.oss { background: var(--navy-2); }
.oss-list { list-style: none; margin: 0; padding: 0; display: grid; }
.oss-list > li { display: flex; justify-content: space-between; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.oss-list h3 { font-size: 20px; margin-bottom: 8px; }
.oss-list p { color: var(--muted); max-width: 70ch; }
.icon-link { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s; }
.icon-link:hover { color: var(--cyan); border-color: var(--cyan); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.tags li { font: 500 12.5px/1 "Geist Mono", monospace; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tags-lg li { font-size: 13px; }

/* Services bento: feature tile + two priced tiles */
.bento { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.tile { display: grid; align-content: start; gap: 10px; padding: 28px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.tile h3 { font-size: 22px; }
.tile p { color: var(--muted); }
.tile-feature { grid-row: span 2; align-content: end; min-height: 360px; background: radial-gradient(70% 60% at 85% 10%, rgb(255 181 71 / .22), transparent 65%), radial-gradient(60% 60% at 10% 100%, rgb(56 217 245 / .14), transparent 70%), var(--surface); transition: border-color .2s; }
.tile-feature:hover { border-color: rgb(255 181 71 / .5); }
.tile-feature h3 { font-size: clamp(26px, 2.6vw, 34px); }
.price { font: 500 15px/1 "Geist Mono", monospace; color: var(--amber); margin-top: 6px; }
.note { margin-top: 18px; color: var(--faint); font-size: 15px; }

/* About */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.portrait { border-radius: var(--r); border: 1px solid var(--line); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-copy h2 { margin-bottom: 22px; }
.about-copy > p { color: var(--muted); max-width: 62ch; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 26px 0 8px; }
.facts dt { font: 500 12.5px/1 "Geist Mono", monospace; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.facts dd { margin: 0; }

/* Contact */
.contact { text-align: center; border-top: 1px solid var(--line); background: radial-gradient(40% 70% at 50% 100%, rgb(255 181 71 / .08), transparent 70%); }
.contact h2 { margin-bottom: 14px; }
.contact > p { color: var(--muted); }
.contact .ctas { justify-content: center; }

.foot { display: flex; justify-content: space-between; align-items: center; padding: 28px max(20px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot-links { display: flex; gap: 16px; font-size: 20px; }
.foot-links a:hover { color: var(--cyan); }

/* Scroll reveal (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* Mobile */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  section { padding-top: 72px; padding-bottom: 72px; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; padding-top: 40px; }
  .work-grid, .bento, .about { grid-template-columns: 1fr; }
  .shot:not(.shot-lg) { margin-top: 0; }
  .tile-feature { grid-row: auto; min-height: 260px; }
  .about .portrait { max-width: 280px; }
}
@media (max-width: 520px) {
  .nav { gap: 12px; }
  .nav .btn { padding: 0 12px; font-size: 14px; }
  .ctas .btn { width: 100%; justify-content: center; }
  .facts { grid-template-columns: 1fr; }
  .oss-list > li { flex-direction: column; }
}
