/* ========================================================
   Ardeshir Beheshti — Portfolio
   Design system: a technical blueprint — the historical
   dark-mode of drafting and surveying documents. Deep
   blueprint blue, white linework, cyan and amber accents.
   ======================================================== */

:root {
  --ink: #12324A;
  --ink-2: #163B57;
  --ink-3: #1B4463;
  --grid: #2C5875;
  --grid-soft: #234D6A;
  --paper: #EAF3F8;
  --paper-dim: #A9C4D6;
  --paper-faint: #6E8FA3;
  --contour: #7FCB8F;
  --brass: #6FC3FF;
  --brass-bright: #8ED2FF;
  --gold: #E0A458;

  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-pill: 2px;
  --shadow-soft: none;

  --display: 'Big Shoulders', sans-serif;
  --body: 'Public Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --nav-w: 240px;
  --map-w: 300px;
  --hud-h: 40px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  padding-left: var(--nav-w);
  padding-bottom: var(--hud-h);
}

a { color: var(--brass-bright); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; color: var(--paper); letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

/* ---------- Layer panel (nav) — styled as a map sheet's legend column ---------- */

.layer-panel {
  position: fixed;
  top: 0; left: 0; bottom: var(--hud-h);
  width: var(--nav-w);
  background: var(--ink-2);
  border-right: 2px solid var(--paper);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.layer-panel__brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--grid);
}

.layer-panel__brand .name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--paper);
  line-height: 1.05;
}

.layer-panel__brand .role {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-faint);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.layer-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  flex: 1;
}

.layer-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.layer-item a:hover { color: var(--paper); }

.layer-item .swatch {
  width: 10px; height: 10px;
  border: 1.5px solid var(--paper-faint);
  border-radius: 2px;
  flex-shrink: 0;
}

.layer-item.active a {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
}
.layer-item.active .swatch {
  background: var(--gold);
  border-color: var(--gold);
}

.layer-panel__footer {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--grid);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-faint);
}

.layer-panel__footer a { color: var(--paper-dim); }

.nav-toggle {
  display: none;
}

/* ---------- HUD bar (bottom status bar) ---------- */

.hud {
  position: fixed;
  left: var(--nav-w); right: 0; bottom: 0;
  height: var(--hud-h);
  background: var(--ink-2);
  border-top: 2px solid var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-faint);
  z-index: 40;
  letter-spacing: 0.03em;
}

.hud__coords span { color: var(--brass-bright); }
.hud__scale { display: flex; align-items: center; gap: 8px; }
.hud__scale-bar {
  width: 60px; height: 1px; background: var(--paper-faint);
  position: relative;
}
.hud__scale-bar::before, .hud__scale-bar::after {
  content: ''; position: absolute; top: -3px; width: 1px; height: 7px; background: var(--paper-faint);
}
.hud__scale-bar::before { left: 0; }
.hud__scale-bar::after { right: 0; }

/* ---------- Sections ---------- */

main { position: relative; }

.section {
  padding: 76px 60px;
  border-bottom: 1px solid var(--grid-soft);
  position: relative;
}

.section-inner {
  max-width: 760px;
}

.section--wide .section-inner { max-width: 980px; }

/* ---------- Hero ---------- */

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px;
  overflow: hidden;
}

.hero__contours {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero .tagline {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--paper-dim);
  margin-top: 22px;
  max-width: 520px;
  line-height: 1.7;
}

.hero__cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--paper);
  color: var(--paper);
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.btn--solid {
  background: var(--brass);
  border-color: var(--brass);
  color: #FFFFFF;
  font-weight: 600;
}
.btn--solid:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

/* ---------- Live map widget ---------- */

.live-map-wrap {
  position: fixed;
  right: 16px;
  bottom: calc(var(--hud-h) + 16px);
  width: 220px;
  height: 160px;
  z-index: 38;
  border: 2px solid var(--paper);
  overflow: hidden;
  background: var(--ink-2);
}

.live-map-label {
  position: absolute;
  top: 8px; left: 10px;
  z-index: 10;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(15, 27, 36, 0.75);
  padding: 3px 8px;
  pointer-events: none;
}

#live-map {
  width: 100%;
  height: 100%;
  filter: saturate(0.7) brightness(0.9);
}

.pulse-marker {
  width: 14px;
  height: 14px;
  position: relative;
}
.pulse-marker::before, .pulse-marker::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pulse-marker::before {
  width: 8px; height: 8px;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}
.pulse-marker::after {
  width: 8px; height: 8px;
  border: 1.5px solid var(--gold);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { width: 8px; height: 8px; opacity: 0.9; }
  100% { width: 32px; height: 32px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-marker::after { animation: none; }
}

@media (max-width: 880px) {
  .live-map-wrap { display: none; }
}

/* ---------- About ---------- */

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

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--paper);
  box-shadow: 4px 4px 0 var(--grid);
  filter: sepia(0.12) contrast(1.03);
}

.about-copy p { color: var(--paper-dim); margin: 0 0 16px; }
.about-copy p:last-child { margin-bottom: 0; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--contour);
  border: 1px solid var(--contour);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

/* ---------- Career ---------- */

.route-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-faint);
  margin: 0 0 30px;
  letter-spacing: 0.02em;
}

.timeline {
  border-left: 2px dashed var(--gold);
  margin-left: 4px;
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 4px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--gold);
}

.pitch-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--gold);
  display: inline-block;
  padding: 2px 7px;
  margin-bottom: 6px;
}

.timeline-item .dates {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--paper-faint);
  letter-spacing: 0.04em;
}

.timeline-item h3 {
  font-size: 22px;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.timeline-item .org {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
  margin-top: 3px;
}

.timeline-item p {
  color: var(--paper-dim);
  margin-top: 12px;
  font-size: 15px;
}

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--ink-2);
  border: 1px solid var(--paper);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}

.project-card:hover {
  box-shadow: 4px 4px 0 var(--gold);
}

.project-card .coord {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--paper-faint);
  letter-spacing: 0.03em;
}

.project-card h3 {
  font-size: 21px;
  margin-top: 10px;
}

.project-card .stack {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--contour);
  margin-top: 8px;
}

.project-card p {
  color: var(--paper-dim);
  font-size: 14.5px;
  margin-top: 14px;
  flex: 1;
}

.project-card .field {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--grid-soft);
  font-size: 13px;
}

.project-card .field .label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-bright);
  display: block;
  margin-bottom: 3px;
}

.project-card .links {
  margin-top: 16px;
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
}

/* ---------- Side projects (compact) ---------- */

.side-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.side-project-card {
  display: block;
  background: var(--ink-2);
  border: 1px solid var(--grid);
  padding: 18px 20px;
  transition: box-shadow 0.15s;
}

.side-project-card:hover {
  box-shadow: 3px 3px 0 var(--contour);
  text-decoration: none;
}

.side-project-card h4 {
  font-family: var(--display);
  font-size: 16px;
  color: var(--paper);
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-project-card:hover h4 { color: var(--gold); }

.side-project-card .arrow {
  color: var(--brass);
  font-family: var(--mono);
  font-size: 14px;
}

.side-project-card p {
  color: var(--paper-dim);
  font-size: 13.5px;
  margin: 8px 0 10px;
}

.side-project-card .stack {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--contour);
}

/* ---------- Contact ---------- */

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 30px;
}

.contact-links a {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--paper);
  padding: 12px 0;
  border-bottom: 1px solid var(--grid-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-links a:hover { color: var(--gold); text-decoration: none; }

.contact-links a .arrow { color: var(--brass); font-family: var(--mono); }

.section__label {
  margin-bottom: 34px;
}

/* ---------- Mobile ---------- */

@media (max-width: 880px) {
  body {
    padding-left: 0;
    padding-bottom: 0;
  }

  .layer-panel {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--grid);
    z-index: 50;
  }

  .layer-panel__brand {
    padding: 0 16px;
    border-bottom: none;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .layer-panel__brand .name { font-size: 15px; }
  .layer-panel__brand .role { display: none; }

  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--grid);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 11px;
    padding: 8px 12px;
    margin-left: auto;
    border-radius: 3px;
  }

  .layer-list {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--grid);
    flex: none;
    margin: 0;
    padding: 8px 0;
  }
  .layer-list.open { display: block; }

  .layer-panel__footer { display: none; }

  .hud {
    left: 0;
    right: 0;
    top: 56px;
    bottom: auto;
    height: 34px;
    position: fixed;
    z-index: 35;
  }

  main { padding-top: 90px; }

  .section { padding: 60px 24px; min-height: auto; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
}
