/* Vivek Sama — portfolio
   Paper body, a deep petrol "boardroom" band for headers and footer,
   lucite deal tombstones with a brass rule (the one bold element). */
:root {
  --paper: #F6F7F5;
  --ink: #1A1D23;
  --graphite: #5B6270;
  --rule: #D6DAD6;
  --petrol: #1D5C63;
  --petrol-deep: #154247;
  --board: #0F3236;
  --on-board: #E9F0EE;
  --on-board-dim: #A9BDBA;
  --board-rule: rgba(233, 240, 238, .18);
  --lucite: #E6EFEE;
  --lucite-edge: #B7CBC8;
  --brass: #A8834A;
  --brass-light: #CDAE78;
  --ok: #2E7550;
  --ok-tint: #E3F0E8;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.7 var(--serif);
  font-feature-settings: "kern", "liga";
}
img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--petrol-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 2px; }
.site-header :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: var(--brass-light); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); color: var(--ink); padding: .5rem .75rem; z-index: 10; }

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1.5rem; }
.measure { max-width: 40rem; }

/* ---------- Header (sits on the band) ---------- */
.site-header { background: var(--board); }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-top: 1.35rem; padding-bottom: 1.1rem; flex-wrap: wrap;
}
.brand { font: 500 1.2rem/1 var(--serif); color: var(--on-board); text-decoration: none; letter-spacing: .005em; }
.brand:hover { color: #fff; }
.site-nav { display: flex; gap: 1.75rem; font: 500 .95rem/1 var(--sans); }
.site-nav a { color: var(--on-board-dim); text-decoration: none; padding: .3rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--on-board); box-shadow: inset 0 -2px 0 var(--brass-light); }

/* ---------- Band ---------- */
.band {
  background: var(--board);
  color: var(--on-board);
  border-bottom: 1px solid var(--brass);
}
.band:has(.wrap:empty) { display: none; }
.band h1, .band h2 { color: #fff; }
.band a { color: var(--on-board); }
.band .lede { color: var(--on-board); }
.band p { color: var(--on-board-dim); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); }
h1 { font-weight: 400; font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 1rem; }
h2 { font-weight: 500; font-size: 1.6rem; line-height: 1.25; margin: 3.25rem 0 .9rem; letter-spacing: -0.005em; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.35; margin: 2rem 0 .5rem; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
li { margin-bottom: .45rem; }
li::marker { color: var(--graphite); }
strong { font-weight: 600; }

.lede { font-size: 1.3rem; line-height: 1.55; color: var(--ink); }
.tagline { font: 500 1rem/1.4 var(--sans); color: var(--brass-light) !important; margin: 0 0 2rem; letter-spacing: .01em; }

main { padding-bottom: 5rem; }

/* ---------- Home hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 4.5rem; padding: 4.5rem 0 5rem; align-items: center;
}
.hero h1 {
  font-weight: 300; font-size: clamp(3.4rem, 7.6vw, 6.4rem);
  line-height: .95; letter-spacing: -0.03em; margin: 0 0 1.1rem;
}
.hero .lede { font-size: 1.32rem; max-width: 36rem; }
.hero-text p:last-child { max-width: 36rem; margin-bottom: 0; }

/* ---------- Tombstones ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 4.75rem; }
.section-head h2 { margin: 0 0 1.75rem; font-size: 2.1rem; }
.section-head p { margin: 0; font: 400 .95rem/1.4 var(--sans); color: var(--graphite); }

.tombstones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 0 0 2.25rem; padding: 0; list-style: none; }
.tombstones li { margin: 0; }

.tombstone {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  text-align: center; height: 100%; min-height: 24rem;
  padding: 2.6rem 1.9rem 2.2rem;
  background: linear-gradient(168deg, #F8FBFA 0%, #E9F1EF 34%, #DCE8E6 100%);
  border: 1px solid var(--lucite-edge);
  border-radius: 3px;
  color: var(--ink); text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 2px 0 #C6D6D3,
    0 4px 0 #AEC2BF,
    0 26px 32px -22px rgba(15, 50, 54, .5);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* engraved inner frame */
.tombstone::before {
  content: ""; position: absolute; inset: 10px; z-index: -1;
  border: 1px solid rgba(29, 92, 99, .26); border-radius: 1px; pointer-events: none;
}
/* light catching the top face of the acrylic */
.tombstone::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 42%; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0));
  pointer-events: none;
}
a.tombstone:hover {
  color: var(--ink); border-color: var(--petrol); transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 2px 0 #C6D6D3,
    0 4px 0 #AEC2BF,
    0 34px 38px -24px rgba(15, 50, 54, .6);
}
.ts-top, .ts-bottom { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.ts-role { font: 500 .85rem/1.35 var(--sans); color: var(--graphite); }
.ts-name { font: 500 2.1rem/1.1 var(--serif); letter-spacing: -0.012em; margin: .6rem 0 0; color: var(--ink); }
.ts-ticker { font: 500 .8rem/1.3 var(--sans); color: var(--graphite); font-variant-numeric: tabular-nums; }
.ts-desc { font: italic 400 1.05rem/1.45 var(--serif); color: var(--ink); margin-top: .9rem; max-width: 17rem; }
.ts-rule {
  display: block; width: 3.25rem; height: 2px; margin: 1.5rem auto;
  background: linear-gradient(90deg, var(--brass), #D9BE8C 50%, var(--brass));
}
.ts-fig { font: 500 1.15rem/1.4 var(--serif); max-width: 17rem; }
.ts-foot { font: 400 .8rem/1.4 var(--sans); color: var(--graphite); margin-top: 1.1rem; }

.tombstones.small .tombstone { min-height: 17rem; padding: 2rem 1.5rem 1.7rem; }
.tombstones.small .ts-name { font-size: 1.65rem; }
.tombstones.small .ts-rule { margin: 1.1rem auto; }

/* tombstones on the dark band */
.band .tombstone {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 2px 0 #B9CCC9,
    0 5px 0 #8FA8A4,
    0 40px 60px -26px rgba(0, 0, 0, .7);
}
.band .tombstone p, .band .tombstone dd { color: var(--ink); }
.band .tombstone h2 { color: var(--ink); }

/* hero credentials tombstone */
.hero-ts { min-height: 0; padding: 2.4rem 2rem 2.2rem; justify-content: flex-start; }
.hero-ts .ts-name { font-size: 1.85rem; }
.ts-facts { margin: 0; display: grid; gap: 1rem; width: 100%; }
.ts-facts div { display: flex; flex-direction: column; align-items: center; }
.ts-facts dt { font: 500 .8rem/1.3 var(--sans); color: var(--graphite); }
.ts-facts dd { margin: .15rem 0 0; font: 500 1.5rem/1.2 var(--serif); color: var(--ink); font-variant-numeric: lining-nums; }
.ts-facts small { display: block; font: 400 .82rem/1.35 var(--sans); color: var(--graphite); margin-top: .15rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-ts { animation: settle .7s cubic-bezier(.2, .7, .2, 1) .1s both; }
  @keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- More work ---------- */
#more-h { font-size: 2.1rem; margin-top: 4.5rem; margin-bottom: 1.25rem; }
.more { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.more li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.more .what { font-weight: 600; line-height: 1.4; }
.more .what span { display: block; font: 400 .85rem/1.4 var(--sans); color: var(--graphite); margin-top: .25rem; }
.more p { margin: 0; line-height: 1.6; max-width: 40rem; }

/* ---------- Case study pages ---------- */
.case-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 4rem;
  align-items: center; padding: 2.75rem 0 0;
}
.crumb { font: 500 .9rem/1 var(--sans); margin: 0 0 1.75rem; }
.band .crumb a { color: var(--on-board-dim); text-decoration: none; }
.band .crumb a:hover { color: var(--on-board); text-decoration: underline; }
.band .kicker { font: 500 1rem/1.4 var(--sans); color: var(--brass-light); margin: 0 0 .75rem; }
.case-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.07; max-width: 42rem; margin: 0; }
.case-ts { min-height: 0; padding: 2rem 1.5rem 1.8rem; }
.case-ts .ts-name { font-size: 1.6rem; }
.case-ts .ts-rule { margin: 1.1rem auto; }

.band .facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 2rem;
  margin: 3rem 0 0; padding: 0 0 2.5rem; border-top: 1px solid var(--board-rule);
}
.band .facts div { padding: 1rem 0 0; }
.band .facts dt { font: 500 .82rem/1.3 var(--sans); color: var(--on-board-dim); }
.band .facts dd { margin: .3rem 0 0; font: 400 1.02rem/1.45 var(--serif); color: var(--on-board); }

.case > .measure > h2:first-child { margin-top: 3.5rem; }

.status { display: inline-flex; align-items: center; gap: .45rem; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--graphite); }
.status.done::before { background: var(--ok); }
.status.partly::before { background: linear-gradient(90deg, var(--ok) 50%, var(--graphite) 50%); }
.band .status.partly::before { background: linear-gradient(90deg, #6FC197 50%, var(--on-board-dim) 50%); }

table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font: 400 .98rem/1.45 var(--sans); font-variant-numeric: tabular-nums; }
caption { text-align: left; font: 500 .85rem/1.4 var(--sans); color: var(--graphite); padding-bottom: .5rem; }
th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--ink); padding: .5rem .75rem .5rem 0; vertical-align: bottom; }
td { border-bottom: 1px solid var(--rule); padding: .65rem .75rem .65rem 0; vertical-align: top; }
th.num, td.num { text-align: right; padding-right: 0; padding-left: .75rem; }
tr.key td { font-weight: 600; background: rgba(168, 131, 74, .09); }
tr.key td:first-child { box-shadow: inset 3px 0 0 var(--brass); padding-left: .65rem; }

figure { margin: 2rem 0; }
figcaption { font: 400 .88rem/1.45 var(--sans); color: var(--graphite); margin-top: .7rem; }
.placeholder {
  display: grid; place-items: center; aspect-ratio: 16 / 9;
  border: 1.5px dashed #A9B2AE; background: #EDF0ED; color: var(--graphite);
  font: 500 .92rem/1.4 var(--sans); text-align: center; padding: 1rem;
}
.placeholder.portrait { aspect-ratio: 4 / 5; }

details { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .9rem 0; margin: 2rem 0; }
summary { cursor: pointer; font: 600 1rem/1.4 var(--sans); }
details[open] summary { margin-bottom: .75rem; }
details p { font-size: 1.02rem; }

.note { font: 400 .9rem/1.5 var(--sans); color: var(--graphite); }

.case-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4.5rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); font: 500 1rem/1.4 var(--serif); }
.case-nav a { text-decoration: none; font-size: 1.2rem; }
.case-nav span { display: block; font: 500 .8rem/1.4 var(--sans); color: var(--graphite); margin-bottom: .2rem; }
.case-nav .next { text-align: right; margin-left: auto; }

/* ---------- Diagrams ---------- */
.diagram { background: #FBFBFA; border: 1px solid var(--rule); padding: 1rem; overflow-x: auto; }
.diagram svg { min-width: 34rem; }
.diagram text { font-family: var(--sans); fill: var(--ink); }
.diagram .sub { fill: var(--graphite); }
.diagram .box { fill: #FBFBFA; stroke: var(--graphite); stroke-width: 1.25; }
.diagram .mine { fill: var(--lucite); stroke: var(--petrol); stroke-width: 2; }
.diagram .done { fill: var(--ok-tint); stroke: var(--ok); stroke-width: 1.5; }
.diagram .todo { fill: none; stroke: var(--graphite); stroke-width: 1.25; stroke-dasharray: 4 3; }
.diagram .group { fill: none; stroke: var(--rule); stroke-width: 1.25; }
.diagram .line { fill: none; stroke: var(--graphite); stroke-width: 1.25; }
.diagram .dash { fill: none; stroke: var(--graphite); stroke-width: 1.25; stroke-dasharray: 4 3; }
.diagram .head { fill: var(--graphite); }

/* ---------- About / Experience headers ---------- */
.page-hero { padding: 3.75rem 0 3.5rem; max-width: 46rem; }
.page-hero h1 { font-weight: 300; font-size: clamp(2.8rem, 6vw, 4.6rem); letter-spacing: -0.025em; }
.page-hero .lede { margin-bottom: 1.5rem; }
.page-hero p:last-child { margin-bottom: 0; }
.about-hero { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 3.5rem; align-items: end; max-width: none; }
.about-hero .lede { max-width: 38rem; margin-bottom: 0; }
.portrait-frame { margin: 0; }
.band .placeholder { background: rgba(255, 255, 255, .05); border-color: rgba(233, 240, 238, .35); color: var(--on-board-dim); }
.prose-top { padding-top: 3rem; }
.prose-top > .lede:first-child { margin-bottom: 0; }
.exp > h2:first-child { margin-top: 3.5rem; }

/* ---------- Experience ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.timeline .when { font: 500 .88rem/1.6 var(--sans); color: var(--graphite); font-variant-numeric: tabular-nums; }
.timeline .role { font-weight: 600; line-height: 1.4; }
.timeline .org { font: 400 .92rem/1.4 var(--sans); color: var(--graphite); margin: .15rem 0 .45rem; }
.timeline .org:last-child { margin-bottom: 0; }
.timeline p { margin: 0; line-height: 1.55; }

.button {
  display: inline-block; font: 600 .95rem/1 var(--sans); padding: .85rem 1.15rem;
  border: 1.5px solid var(--petrol); color: var(--petrol); text-decoration: none; border-radius: 2px;
}
.button[aria-disabled="true"] { border-style: dashed; color: var(--graphite); border-color: #A9B2AE; cursor: default; }
.band .button { border-color: var(--brass-light); color: var(--on-board); }
.band .button[aria-disabled="true"] { border-color: rgba(233, 240, 238, .4); color: var(--on-board-dim); }

/* ---------- Footer ---------- */
.site-footer { background: var(--board); color: var(--on-board-dim); border-top: 1px solid var(--brass); padding: 3rem 0 3.25rem; font: 400 .92rem/1.6 var(--sans); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 2rem; align-items: end; }
.foot-id p { margin: 0; }
.foot-name { font: 400 1.6rem/1.2 var(--serif); color: var(--on-board); margin-bottom: .35rem !important; letter-spacing: -0.01em; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer a { color: var(--on-board); text-decoration-color: var(--brass-light); }
.site-footer a:hover { color: #fff; }
.foot-copy { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--board-rule); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding: 3rem 0 3.5rem; }
  .hero-ts { max-width: 26rem; }
  .tombstones { grid-template-columns: 1fr; max-width: 28rem; }
  .tombstone { min-height: 0; }
  .case-hero { grid-template-columns: 1fr; gap: 2.25rem; }
  .case-ts { max-width: 22rem; }
  .about-hero { grid-template-columns: 1fr; gap: 2rem; }
  .about-hero .portrait-frame { order: -1; max-width: 10rem; }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .site-nav { gap: 1.2rem; font-size: .9rem; }
  .more li, .timeline li { grid-template-columns: 1fr; gap: .35rem; }
  .section-head { flex-direction: column; gap: .25rem; }
  .section-head h2 { margin-bottom: .5rem; }
  .section-head p { margin-bottom: 1.5rem; }
  .diagram { padding: .5rem; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .band .facts { grid-template-columns: 1fr 1fr; }
  .case-ts { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* outside link in the header (LinkedIn) */
.site-nav .nav-ext { color: var(--brass-light); padding-left: 1.75rem; border-left: 1px solid var(--board-rule); }
.site-nav .nav-ext:hover { color: #E3C892; box-shadow: none; text-decoration: underline; text-underline-offset: .25em; }
@media (max-width: 600px) { .site-nav .nav-ext { padding-left: 1.2rem; } }
@media (max-width: 420px) { .site-header .wrap { flex-direction: column; align-items: flex-start; gap: .85rem; } }
