/* =========================================================================
   Abhishek Venkataraman — personal site
   Design system: light, Baseten-referenced. Inter + JetBrains Mono.
   Single restrained accent (blue). Perception-overlay motif, used sparingly.
   ========================================================================= */

:root {
  /* surfaces */
  --bg:        #ffffff;
  --bg-soft:   #f5f6f8;
  --bg-panel:  #fbfbfc;
  --bg-ink:    #0b0d12;   /* dark moments */

  /* text */
  --ink:   #0b0d12;
  --ink-2: #3a414d;
  --ink-3: #6b7280;
  --ink-on-dark:   #f3f5f8;
  --ink-on-dark-2: #9aa3b2;

  /* lines */
  --line:        #e6e8ec;
  --line-strong: #d4d8df;
  --line-on-dark: rgba(255,255,255,0.12);

  /* accent (tweakable) */
  --accent:      #2563eb;
  --accent-ink:  #1d4ed8;
  --accent-wash: rgba(37, 99, 235, 0.08);
  --accent-line: rgba(37, 99, 235, 0.32);

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* rhythm */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 10px;
  --radius-lg: 16px;

  /* motif intensity: 0 hidden, 1 shown */
  --motif: 1;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.022em; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #fff; }

/* ---- layout helpers --------------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(72px, 10vw, 132px); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(56px, 7vw, 92px); }

/* section eyebrow — mono technical label */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border: 1.5px solid var(--accent);
  background: var(--accent-wash);
}

.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin-top: 16px;
  max-width: 18ch;
}
.section-head .lede {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 18px;
  max-width: 52ch;
}

/* ---- mono chips & labels --------------------------------------------- */
.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 6px 11px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip--accent { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-wash); }
.chip strong { color: var(--ink); font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 550;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn .ext { font-family: var(--mono); font-size: 12px; opacity: .7; }

.txtlink {
  color: var(--accent-ink);
  font-weight: 550;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
  transition: border-color .18s ease;
}
.txtlink:hover { border-color: var(--accent-ink); }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.is-stuck { border-color: var(--line); }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.01em; }
.brand .mark {
  width: 26px; height: 26px; flex: none;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  position: relative;
}
.brand .mark::before,
.brand .mark::after {
  content: ""; position: absolute; background: var(--accent);
}
.brand .mark::before { width: 8px; height: 1.5px; top: 7px; left: 7px; }
.brand .mark::after  { width: 1.5px; height: 8px; top: 7px; left: 7px; }
.brand .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: -4px; margin-top: 9px; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 8px 12px; border-radius: 7px;
  transition: color .15s ease, background .15s ease;
}
.nav__links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav__cta { margin-left: 8px; }

@media (max-width: 860px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* =========================================================================
   PERCEPTION MOTIF — bounding-box frame, crosshair, point-cloud
   ========================================================================= */
.frame { position: relative; }
.frame__media {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}

/* corner brackets */
.bbox { position: absolute; inset: 0; pointer-events: none; opacity: var(--motif); }
.bbox span {
  position: absolute; width: 22px; height: 22px;
  border: 2px solid var(--accent);
}
.bbox span:nth-child(1) { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.bbox span:nth-child(2) { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.bbox span:nth-child(3) { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.bbox span:nth-child(4) { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

/* mono readout tag pinned to a corner of a framed visual */
.readout {
  position: absolute; z-index: 3;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff; background: var(--accent);
  padding: 3px 7px; border-radius: 4px;
  white-space: nowrap;
  opacity: var(--motif);
}
.readout--tl { top: 18px; left: 18px; }
.readout--br { bottom: 18px; right: 18px; background: var(--bg-ink); }

/* faint point-cloud / blueprint dot grid background */
.dotfield {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 75%);
  opacity: calc(0.7 * var(--motif));
}

/* baked-in framed image — fills its frame__media, sits under the motif overlays */
.slot-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero { position: relative; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(60px, 8vw, 104px);
  position: relative; z-index: 1;
}
.hero__status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--bg-panel);
  padding: 6px 12px; border-radius: 100px; margin-bottom: 28px;
}
.hero__status .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #16a34a; position: relative;
}
.hero__status .pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid #16a34a; opacity: .4; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .6 } 100% { transform: scale(1.8); opacity: 0 } }

.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.hero__tag {
  margin-top: 22px;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.hero__sub {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 17.5px;
  max-width: 46ch;
}
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
}
.hero__visual .frame__media { height: 100%; }
.hero__visual .placeholder-cap { position: absolute; inset: 0; }

/* the labeled empty-slot caption shared across image slots */
.slotcap {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 24px;
  font-family: var(--mono); color: var(--ink-3); font-size: 12.5px; letter-spacing: 0.02em;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(0,0,0,0.018) 11px 22px),
    var(--bg-soft);
  pointer-events: none;
}
.slotcap b { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.slotcap .ico {
  width: 34px; height: 34px; border: 1.5px solid var(--line-strong); border-radius: 8px;
  display: grid; place-items: center; margin-bottom: 4px;
}
.slotcap .ico::before { content: ""; width: 14px; height: 11px; border: 1.5px solid var(--ink-3); border-radius: 2px; }
/* hide caption once the slot is filled */
image-slot[data-filled] + .slotcap { display: none; }

/* hero stat bar */
.statbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 1;
}
.statbar__inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 26px var(--gutter);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.statbar__inner > .stat { padding-inline: clamp(16px, 2.4vw, 28px); }
.stat .n { font-size: clamp(26px, 3vw, 34px); font-weight: 680; letter-spacing: -0.03em; }
.stat .n .accent { color: var(--accent); }
.stat .l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { aspect-ratio: 16 / 11; max-height: 440px; }
  .statbar__inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
}

/* =========================================================================
   FEATURED — Proxy Robotics
   ========================================================================= */
.featured {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.featured__top {
  display: grid; grid-template-columns: 1fr 1fr;
}
.featured__body { padding: clamp(28px, 4vw, 48px); }
.featured__media { position: relative; min-height: 380px; border-left: 1px solid var(--line); background: var(--bg-soft); }
.featured__media .frame__media { height: 100%; border-radius: 0; }

.tagrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.role-badge {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  padding: 5px 10px; border-radius: 6px;
}
.dates { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }

.featured h3 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }
.featured__one { margin-top: 14px; color: var(--ink-2); font-size: 18px; max-width: 44ch; }

.kv { margin-top: 26px; display: grid; gap: 10px; }
.kv li {
  list-style: none; display: flex; gap: 12px; align-items: flex-start;
  font-size: 15.5px; color: var(--ink-2);
}
.kv li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px;
  background: var(--accent); transform: rotate(45deg);
}
.kv b { color: var(--ink); font-weight: 600; }

.featured__links { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }

.featured__strip {
  border-top: 1px solid var(--line);
  padding: 20px clamp(28px, 4vw, 48px);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--bg-panel);
}
.featured__strip .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

@media (max-width: 880px) {
  .featured__top { grid-template-columns: 1fr; }
  .featured__media { border-left: 0; border-top: 1px solid var(--line); min-height: 300px; order: -1; }
}

/* =========================================================================
   WORK CARDS
   ========================================================================= */
.work-list { display: grid; gap: 20px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 14px 40px -28px rgba(11,13,18,0.4); }
.card__media { position: relative; min-height: 280px; background: var(--bg-soft); border-right: 1px solid var(--line); }
.card__media .frame__media { height: 100%; border-radius: 0; }
.card__body { padding: clamp(24px, 3vw, 38px); display: flex; flex-direction: column; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card__co { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; }
.card__role { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.card__one { margin-top: 16px; color: var(--ink-2); font-size: 16.5px; max-width: 46ch; }
.card .chips { margin-top: auto; padding-top: 24px; }

.card--alt { grid-template-columns: 1.08fr 0.92fr; }
.card--alt .card__media { border-right: 0; border-left: 1px solid var(--line); order: 2; }

/* compact (de-emphasized older roles) */
.work-compact { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.minicard {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-panel); padding: 26px 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s ease;
}
.minicard:hover { border-color: var(--line-strong); }
.minicard .card__head { align-items: baseline; }
.minicard .card__co { font-size: 20px; }
.minicard .card__one { margin-top: 4px; font-size: 15px; }
.minicard .chips { margin-top: 6px; }
.minicard .chip { font-size: 11.5px; padding: 5px 9px; }

@media (max-width: 880px) {
  .card, .card--alt { grid-template-columns: 1fr; }
  .card__media, .card--alt .card__media { border-right: 0; border-left: 0; border-bottom: 1px solid var(--line); min-height: 220px; order: -1; }
  .card--alt .card__media { order: -1; }
  .work-compact { grid-template-columns: 1fr; }
}

/* =========================================================================
   FLEET STRIP
   ========================================================================= */
.fleet-group { margin-bottom: 40px; }
.fleet-group:last-child { margin-bottom: 0; }
.fleet-group__label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.fleet-group__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.unit {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); padding: 16px 14px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.unit:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: 0 16px 34px -26px rgba(11,13,18,0.45); }
.unit__ico { width: 100%; height: 96px; display: grid; place-items: center; }
.unit__ico img { width: auto; height: 100%; max-width: 100%; max-height: 96px; object-fit: contain; filter: saturate(0.96) contrast(1.02); transition: transform .25s ease; }
.unit:hover .unit__ico img { transform: scale(1.05); }
.unit__name { font-size: 14px; font-weight: 550; letter-spacing: -0.01em; }
.unit__kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }

/* =========================================================================
   RESEARCH
   ========================================================================= */
.pubs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pub {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pub:hover { border-color: var(--line-strong); box-shadow: 0 14px 40px -30px rgba(11,13,18,0.4); }
.pub__fig { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.pub__fig .frame__media { height: 100%; border-radius: 0; }
.pub__body { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.pub__venue { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-ink); }
.pub__title { font-size: 19px; letter-spacing: -0.02em; line-height: 1.25; }
.pub__desc { color: var(--ink-2); font-size: 15px; }
.pub__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; }

.edu-head { margin-top: 40px; }

.pub-context {
  margin-top: 14px; padding: 18px 22px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 15px; color: var(--ink-2); background: var(--bg-panel);
}

@media (max-width: 760px) { .pubs { grid-template-columns: 1fr; } }

/* =========================================================================
   CAPABILITIES
   ========================================================================= */
.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.capgroup {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px; background: var(--bg);
}
.capgroup h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.capgroup h3 .n { color: var(--ink-3); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 13px; background: var(--bg-panel);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tag:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-wash); }

@media (max-width: 760px) { .caps { grid-template-columns: 1fr; } }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { background: var(--bg-ink); color: var(--ink-on-dark); }
.footer .wrap { padding-block: clamp(64px, 9vw, 104px); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
.footer h2 { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.035em; color: #fff; }
.footer__sub { margin-top: 16px; color: var(--ink-on-dark-2); font-size: 18px; max-width: 40ch; }
.footer__links { display: grid; gap: 2px; }
.footer__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 13px 0; border-bottom: 1px solid var(--line-on-dark);
  font-family: var(--mono); font-size: 14px; color: var(--ink-on-dark);
  transition: color .15s ease, padding .15s ease;
}
.footer__links a:hover { color: #fff; padding-left: 8px; }
.footer__links a .arr { color: var(--ink-on-dark-2); }
.footer__bar {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-on-dark);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--ink-on-dark-2);
}

@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; align-items: start; } }

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero__status .pulse::after { animation: none; }
}
