:root {
  --bg:     #0b0c0d;
  --panel:  #131517;
  --line:   #23262a;
  --line-2: #33373d;
  --text:   #f0f2f4;
  --muted:  #8b939c;
  /* --accent: #c5c501; --accent-hi: #e0e01f; --on-accent: #14140a; */
  --accent:    #790000;  /* accent proper */
  --accent-hi: #9c1414;  /* hover shade of the accent */
  --on-accent: #ffffff;  /* text sitting on a solid accent fill */

  --display: "Anek Devanagari", sans-serif;
  --sans:    "Epilogue", sans-serif;
  --maxw:    1080px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; width: 100%; }

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Small structural label: accent tick + letterspaced caps */
.label {
  display: flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.label::before { content: ""; width: 18px; height: 2px; background: var(--accent); flex-shrink: 0; }

/* ================= NAV ================= */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,12,13,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 58px; }
.mark { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; text-decoration: none; }
.mark span { color: var(--accent); }
header nav { display: flex; flex-wrap: wrap; gap: .4rem; }
header nav a {
  text-decoration: none; color: var(--muted);
  font-size: .87rem; padding: .35rem .75rem;
  border: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
header nav a:hover { color: var(--text); border-color: var(--line-2); }
header nav a[aria-current] { color: var(--text); border-color: var(--accent); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 64vh;
  display: flex; align-items: flex-end;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: .5;
}
/* Scrim keeps the headline legible over the sim footage */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, rgba(11,12,13,.72) 45%, rgba(11,12,13,.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 5rem; padding-bottom: 3rem; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700; line-height: 1; letter-spacing: -.02em;
  margin: 1rem 0 .9rem;
}
.hero .pitch { font-size: clamp(1rem, 2vw, 1.2rem); color: #ccd3da; max-width: 54ch; }
.hero .pitch b { color: var(--text); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.9rem; }
.btn {
  text-decoration: none; font-size: .88rem;
  padding: .6rem 1.2rem; border: 1px solid var(--line-2);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.solid:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }

/* ================= ABOUT ================= */
/* Text column sizes to the copy, so the photo can centre in the space left over */
.about { display: grid; grid-template-columns: minmax(0, 60ch) 1fr; gap: 2rem; align-items: start; }
/* margin-top clears the "Who I am" label (.72rem * 1.6 line-height + .9rem body-text margin)
   so the photo's top edge starts on the same line as the first line of copy */
.about img { width: 280px; justify-self: center; margin-top: calc(.72rem * 1.6 + .9rem); display: block; border: 1px solid var(--line); border-radius: 10px; }
.about .body-text { margin-top: .9rem; }
.about a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.about a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ================= NEWS ================= */
.news { list-style: none; border-top: 1px solid var(--line); }
.news li {
  display: grid; grid-template-columns: 130px 1fr;
  gap: .35rem 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.news .when {
  font-size: .82rem; color: var(--muted);
  font-variant-numeric: tabular-nums; padding-top: .15rem;
  display: flex; align-items: baseline; gap: .6rem;
}
.news li.latest .when::after {
  content: "NEW";
  font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  background: var(--accent); color: var(--on-accent);
  padding: .05rem .4rem;
}
/* Items with a photo: text left, thumbnail right */
.news .item { display: flex; gap: 1.5rem; align-items: flex-start; }
.news .item > div { flex: 1; }
.news .thumb-link { flex-shrink: 0; width: 190px; display: block; border: 1px solid var(--line); }
.news .thumb-link img { width: 100%; height: 118px; object-fit: cover; display: block; }
.news .thumb-link:hover { border-color: var(--accent); }
.news p { font-size: .95rem; color: #c3cbd3; max-width: 68ch; }
.news p b { color: var(--text); font-weight: 600; }
.news a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; white-space: nowrap; }
.news a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ================= SECTIONS ================= */
section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: 2.25rem; }
.sec-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  line-height: 1.1; margin-top: .7rem;
}

.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: start; }
p { max-width: 64ch; }
p + p { margin-top: .85rem; }
.body-text { color: #c3cbd3; font-size: .98rem; }
.stack { margin-top: 1.4rem; font-size: .85rem; color: var(--muted); }

figure img { width: 100%; display: block; border: 1px solid var(--line); background: #000; }
figcaption { font-size: .8rem; color: var(--muted); margin-top: .6rem; }

/* ================= EXPERIENCE TABLE ================= */
.rows { border-top: 1px solid var(--line); }
.r {
  display: grid; grid-template-columns: 190px 1fr;
  gap: .35rem 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  transition: border-color .2s ease;
}
.r:hover { border-bottom-color: var(--line-2); }
.r .when { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .2rem; }
.r .org { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.r .org a { text-decoration: none; }
.r .org a:hover { color: var(--accent); }
.r .what { color: var(--muted); font-size: .92rem; }

/* ================= PROJECTS ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  background: var(--panel); text-decoration: none;
  display: flex; flex-direction: column;
  transition: background-color .25s ease;
}
.card:hover { background: #181b1e; }
.card .thumb { height: 170px; background: #000; border-bottom: 1px solid var(--line); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .txt { padding: 1.1rem 1.25rem 1.4rem; flex: 1; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; margin-bottom: .3rem; }
.card:hover h3 { color: var(--accent); }
.card p { font-size: .87rem; color: var(--muted); }

/* ================= FOOTER ================= */
footer { padding: 3rem 0; }
footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
footer .links { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9rem; }
footer .links a { color: var(--muted); text-decoration: none; }
footer .links a:hover { color: var(--accent); }
footer .copy { font-size: .78rem; color: #5e666e; }

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 1.25rem; }
  header .wrap { height: auto; padding-top: .7rem; padding-bottom: .7rem; flex-direction: column; align-items: flex-start; gap: .5rem; }
  header nav a { padding: .3rem .55rem; font-size: .82rem; }
  .hero { min-height: 56vh; }
  .hero .wrap { padding-top: 3.5rem; padding-bottom: 2.25rem; }
  section { padding: 3rem 0; }
  .r, .news li { grid-template-columns: 1fr; }
  .r .when, .news .when { order: -1; padding-top: 0; }
  .news .item { flex-direction: column; gap: .9rem; }
  .news .thumb-link { width: 100%; }
  .news .thumb-link img { height: 160px; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .about img { width: 200px; max-width: 100%; margin-top: 0; order: -1; justify-self: start; }  /* photo first, left-aligned when stacked */
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
