/* harshit.wtf */

:root {
  --bg:      #0b0b0c;
  --text:    #d8d4cf;
  --dim:     #85807a;
  --accent:  #ff9d4d;
  --line:    #26241f;
  --maxw:    620px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* faint scanline warmth, purely decorative */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgba(255,157,77,.07), transparent 60%);
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 20px 96px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: grayscale(.35);
  transition: filter .4s ease, transform .4s ease;
}

.avatar:hover { filter: grayscale(0); transform: scale(1.05); }

/* if images/me.jpg is missing, hide the broken icon */
.avatar.missing { display: none; }

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent);
}

/* ---------- blinking caret ---------- */

.caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: .1em;
  vertical-align: -.16em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

.sign .caret { height: .9em; width: .45em; opacity: .6; }

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

/* ---------- type ---------- */

h2 {
  margin: 48px 0 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -.01em;
}

p { margin: 0 0 14px; }

.intro p:first-child { color: var(--text); }

.muted { color: var(--dim); }

/* ---------- links ---------- */

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .28s cubic-bezier(.4, 0, .2, 1), color .2s ease;
}

a:hover, a:focus-visible { background-size: 100% 1px; }

a:focus-visible { outline: 1px dashed var(--accent); outline-offset: 3px; }

/* ---------- stats ---------- */

.stats { list-style: none; margin: 0; padding: 0; }

.stats li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.stats li:last-child { border-bottom: 0; }

.stats b {
  flex: 0 0 4.4em;
  font-size: 21px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stats span { color: var(--dim); font-size: 14px; line-height: 1.6; }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
  position: relative;
  padding: 14px 0 14px 18px;
  border-left: 1px solid var(--line);
  transition: border-color .3s ease;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 24px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background .3s ease, box-shadow .3s ease;
}

.timeline li:hover { border-left-color: var(--accent); }
.timeline li:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 157, 77, .13);
}

.timeline .row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.role { color: var(--text); font-weight: 500; }

.when { color: var(--dim); font-size: 12.5px; white-space: nowrap; }

.org { color: var(--dim); font-size: 13.5px; margin-top: 1px; }

.org a { font-size: inherit; }

.tag {
  display: inline-block;
  padding: 0 6px;
  margin-left: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent);
  vertical-align: 1px;
}

.timeline p {
  margin: 7px 0 0;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- posts ---------- */

.posts { list-style: none; margin: 0; padding: 0; }

.posts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.posts li:last-child { border-bottom: 0; }

.posts span { color: var(--dim); font-size: 12.5px; white-space: nowrap; }

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

footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

.sign { margin: 14px 0 0; color: var(--dim); font-size: 12.5px; }

/* ---------- scroll reveal ----------
   Content is visible by default. The hidden state is only applied once
   script.js has confirmed the browser is actually painting frames, so a
   crawler, a no-JS visitor, or a browser that never fires rAF still sees
   the whole page instead of a blank one. */

.reveal {
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

.anim-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.anim-ready .reveal.in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */

@media (max-width: 520px) {
  main { padding: 40px 18px 72px; }
  h1 { font-size: 25px; }
  .stats li { flex-direction: column; gap: 2px; }
  .stats b { flex: none; }
  .when { font-size: 12px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal,
  .anim-ready .reveal { opacity: 1; transform: none; }
  .caret { opacity: 1; }
}
