/* Raj Vora — site styles (Mayfair Ink).
   Most layout lives in inline styles copied from the design canvas.
   This file holds the design tokens, page basics and the interactive pieces. */

:root {
  --cream: #F5F0E6;
  --surface: #FBF8F2;
  --band: #EEE7D9;
  --ink: #14213D;
  --slate: #4A5468;
  --oxblood: #7A2E2A;
  --gilt: #B08D57;
  --gilt-light: #D9C29A;
  --rule: #D9D0BF;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--oxblood); }
a:hover { color: var(--ink); }
/* In a class because Netlify's link rewriting breaks quoted font names in inline styles */
.site-logo { font-family: 'Instrument Serif', serif; font-size: 26px; color: var(--ink); text-decoration: none; }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }

/* Scrolling city band (home) */
@keyframes rv-marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.rv-track { animation: rv-marquee 70s linear infinite; }
.rv-marquee:hover .rv-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .rv-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* Experience accordion (home) */
.role { border-bottom: 1px solid var(--rule); }
.role summary {
  list-style: none; cursor: pointer; padding: 18px 0; min-height: 44px;
  display: flex; flex-wrap: wrap; gap: 4px 32px; align-items: baseline;
}
.role summary::-webkit-details-marker { display: none; }
.role-years { flex: 0 0 110px; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.role-title { flex: 1 1 320px; font-size: 16px; font-weight: 500; }
.role-org { flex: 1 1 240px; font-size: 15px; color: var(--slate); }
.role-sign { flex: 0 0 24px; font-size: 22px; line-height: 1; color: var(--oxblood); text-align: right; }
.role-sign::after { content: '+'; }
.role[open] .role-sign::after { content: '\2212'; }
.role summary:hover .role-title { color: var(--oxblood); }
.role-points {
  margin: 0; padding: 0 40px 22px clamp(18px, 11vw, 160px);
  display: flex; flex-direction: column; gap: 8px;
  font-size: 15px; line-height: 1.6; color: var(--slate);
}

/* Project filters and cards (things-ive-built) */
.filter-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 12px 20px; min-height: 44px;
  background: transparent; color: var(--ink); border: 1px solid var(--rule); cursor: pointer;
}
.filter-btn .filter-count { color: var(--slate); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.filter-btn[aria-pressed="true"] .filter-count { color: var(--cream); opacity: 0.75; }
.project-card {
  background: var(--surface); border: 1px solid var(--rule); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.project-card[hidden] { display: none; }
.tag { font-size: 12px; color: var(--ink); border: 1px solid var(--rule); padding: 4px 10px; background: var(--cream); }
.lesson {
  margin: 0; padding-top: 14px; border-top: 1px solid var(--rule);
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--ink);
}
.card-link { margin-top: auto; font-size: 14px; font-weight: 500; }

/* Business write-up tabs (past-businesses) */
.post-tab {
  text-align: left; background: transparent; border: none; border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent; padding: 18px 16px; min-height: 44px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; font-family: var(--sans); color: var(--ink);
}
.post-tab:hover { background: var(--surface); }
.post-tab[aria-current="true"] { background: var(--surface); border-left-color: var(--oxblood); }
.post-tab-name { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.post-tab-meta { font-size: 13px; color: var(--slate); }
.post[hidden] { display: none; }
.post { scroll-margin-top: 24px; }

/* Phone: narrower page margins (!important overrides the inline canvas styles) */
@media (max-width: 640px) {
  [style*="max-width: 1200px"] { padding-left: 24px !important; padding-right: 24px !important; }
}

/* Phone and touch: 44px tap targets */
@media (max-width: 640px), (pointer: coarse) {
  header a, footer a, .card-link, a[style*="margin-top: auto"], a[style$="font-size: 15px; font-weight: 500"] {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  header nav a[style*="border-bottom"] {
    border-bottom: 0 !important; padding-bottom: 0 !important;
    text-decoration: underline !important; text-underline-offset: 4px;
  }
}

/* Phone: compact header, logo and button on one row, nav below */
@media (max-width: 640px) {
  header > div { padding-top: 12px !important; padding-bottom: 8px !important; gap: 6px 16px !important; }
  header nav { order: 1; flex: 1 0 100%; justify-content: space-between; gap: 0 12px !important; }
  header nav a { font-size: 13px; line-height: 1.25; max-width: 76px; }
}

/* Phone: experience accordion sign stays top right, full-width bullets */
@media (max-width: 640px) {
  .role summary { position: relative; padding-right: 40px; }
  .role-years { flex-basis: 100%; }
  .role-title, .role-org { flex-basis: 100%; }
  .role-sign { position: absolute; top: 18px; right: 0; }
  .role-points { padding: 0 0 22px 18px; }
}

/* Phone: featured build screenshots stack at a readable size */
@media (max-width: 640px) {
  [aria-label="Featured build"] > div { padding: 24px !important; }
  [aria-label="Featured build"] > div > div { flex-basis: 100% !important; }
  [aria-label="Featured build"] > div > div:last-child { flex-direction: column; align-items: center !important; }
  [aria-label="Featured build"] img { flex: none !important; }
  [aria-label="Featured build"] img + img { width: 56% !important; }
}

/* Phone: HRS architecture diagram reads top to bottom */
@media (max-width: 640px) {
  .arch { flex-direction: column; }
  .arch > div { flex: none !important; width: 100%; }
  .arch > svg { transform: rotate(90deg); }
}

/* Expandable note inside a project card */
.card-more { margin-top: auto; border-top: 1px solid var(--rule); }
.card-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--oxblood); }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: '+'; font-size: 22px; line-height: 1; }
.card-more[open] summary::after { content: '\2212'; }
.card-more p { margin: 4px 0 0 0; font-size: 15px; line-height: 1.6; color: var(--slate); }
