/* ==========================================================
   Iman Esfandiyar · personal site
   dark lidar-lab aesthetic, no external assets
   ========================================================== */

:root {
  --bg: #04080c;
  --bg2: #071019;
  --panel: #0a1520;
  --line: #12283a;
  --txt: #d7e6ee;
  --txt-dim: #7d97a8;
  --acc: #45ffb0;      /* lidar green   */
  --acc2: #4fc3ff;     /* scan cyan     */
  --warn: #ff5d6c;     /* ransac red    */
  --mono-stack: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

.mono { font-family: var(--mono-stack); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

::selection { background: var(--acc); color: #03130b; }

/* ============ HERO ============ */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #081420 0%, var(--bg) 70%);
}

#lidar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* HUD */
.hud {
  position: absolute;
  font-family: var(--mono-stack);
  font-size: 12px;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 3;
}

.hud-top {
  top: 22px;
  left: 26px;
  color: var(--acc);
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  background: rgba(4, 12, 18, 0.55);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.hud-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc);
  animation: blink 1.4s infinite;
}

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.hud-log {
  left: 26px;
  bottom: 130px;
  color: var(--txt-dim);
  line-height: 1.9;
  max-width: 60ch;
}

.hud-log .ln { display: block; white-space: pre; opacity: 0; animation: lnin .35s forwards; }
.hud-log .ln b { color: var(--acc2); font-weight: 500; }
@keyframes lnin { from { opacity: 0; transform: translateX(-6px); } to { opacity: .9; transform: none; } }

/* hero bottom bar */
.hero-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 26px 34px;
  text-align: center;
  z-index: 3;
}

.hero-tagline {
  color: var(--txt-dim);
  font-size: 15px;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 4px;
  font-family: var(--mono-stack);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .2s ease;
}

.btn-solid {
  background: var(--acc);
  color: #03130b;
  box-shadow: 0 0 24px rgba(69, 255, 176, 0.25);
}
.btn-solid:hover { box-shadow: 0 0 38px rgba(69, 255, 176, 0.5); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--txt);
  background: rgba(4, 12, 18, 0.4);
}
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }

.scroll-hint {
  margin: 26px auto 0;
  width: 22px; height: 36px;
  border: 1px solid var(--txt-dim);
  border-radius: 12px;
  opacity: .55;
}
.scroll-hint span {
  display: block;
  width: 3px; height: 8px;
  background: var(--acc);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ============ NAV ============ */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px;
  background: rgba(4, 8, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topnav .brand { color: var(--acc); text-decoration: none; font-size: 14px; letter-spacing: .06em; }

.topnav .links { display: flex; gap: 26px; }
.topnav .links a {
  color: var(--txt-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: color .2s;
}
.topnav .links a:hover { color: var(--acc); }

/* ============ SECTIONS ============ */

.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 110px 26px 30px;
}

.kicker {
  color: var(--acc);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section h2 {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 44px;
}

/* ---- about ---- */

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}

.portrait {
  position: relative;
  width: 280px;
  height: 280px;
  margin-top: 8px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  filter: saturate(0.92);
  position: relative;
  z-index: 2;
}

.portrait .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(69, 255, 176, 0.35);
  pointer-events: none;
}
.portrait .r1 { inset: -14px; animation: spin 26s linear infinite; }
.portrait .r2 { inset: -30px; border-color: rgba(79, 195, 255, 0.22); animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.about-text p { margin-bottom: 18px; color: var(--txt); }
.about-text strong { color: #fff; }

.stats {
  list-style: none;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin: 30px 0 26px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats li { display: flex; flex-direction: column; }
.stats .num { font-size: 30px; color: var(--acc); }
.stats .lbl { font-size: 13px; color: var(--txt-dim); max-width: 210px; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips span {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt-dim);
  background: var(--panel);
}

/* ---- experience ---- */

.timeline {
  list-style: none;
  border-left: 1px solid var(--line);
  margin-left: 6px;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 26px;
  padding: 0 0 42px 34px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--acc);
  box-shadow: 0 0 10px rgba(69, 255, 176, 0.6);
}

.tl-when { color: var(--acc2); font-size: 13px; padding-top: 3px; white-space: nowrap; }

.tl-body h3 { font-size: 19px; margin-bottom: 2px; }
.tl-org { color: var(--acc); font-size: 14px; margin-bottom: 8px; }
.tl-body p:last-child { color: var(--txt-dim); font-size: 15.5px; }

.edu {
  margin-top: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 26px 30px;
}
.edu-title { color: var(--acc); font-size: 13px; letter-spacing: .12em; margin-bottom: 14px; }
.edu ul { list-style: none; }
.edu li { padding: 7px 0; color: var(--txt-dim); font-size: 15.5px; }
.edu li .mono { color: var(--acc2); font-size: 13px; margin-right: 10px; }
.edu li strong { color: var(--txt); }

/* ---- projects ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.card {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel) 0%, var(--bg2) 100%);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.card:hover {
  border-color: rgba(69, 255, 176, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(69,255,176,.12);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--acc2);
  margin-bottom: 14px;
}

.card .tag { color: var(--acc); text-align: right; }

.card h3 { font-size: 17.5px; line-height: 1.35; margin-bottom: 10px; }
.card p { color: var(--txt-dim); font-size: 14.5px; flex: 1; }
.card-meta { margin-top: 16px; font-size: 12px !important; color: var(--txt-dim); opacity: .8; flex: 0 !important; }

/* ---- publications ---- */

.pubs { list-style: none; }

.pubs li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.pubs li:first-child { border-top: 1px solid var(--line); }

.pub-year { color: var(--acc); font-size: 14px; padding-top: 3px; }
.pubs h3 { font-size: 17px; line-height: 1.4; margin-bottom: 5px; font-weight: 600; }
.pubs p { color: var(--txt-dim); font-size: 13px; }

/* ---- contact ---- */

.contact { text-align: center; padding-bottom: 90px; }
.contact h2 { margin-bottom: 14px; }
.contact-sub { color: var(--txt-dim); margin-bottom: 30px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 34px;
  font-size: 15px;
}
.contact-links a { color: var(--acc2); text-decoration: none; }
.contact-links a:hover { color: var(--acc); }
.contact-links span { color: var(--txt-dim); }

/* ---- footer ---- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
  color: var(--txt-dim);
  font-size: 12px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { margin: 0 auto; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .topnav .links { gap: 16px; }
  .topnav .links a { font-size: 13px; }
  .hud-log { display: none; }
  .section { padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portrait .ring, .hud-dot, .scroll-hint span { animation: none; }
}
