/* haridangi.com — dark, monospace, quiet */

:root {
  color-scheme: dark;
  --bg: #080808;
  --fg: #e7e7e7;
  --body: #a9a9a9;
  --muted: #828282;
  --accent: #6ecb85;
  --line: #1e1e1e;
  --dots: #262626;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--body);
  font: 400 15px/1.7 var(--mono);
}

/* ambient glow — barely there */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(600px circle at 50% 42%, rgba(110, 203, 133, 0.045), transparent 70%);
}

::selection {
  background: #1f3527;
  color: var(--fg);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* stage — one centered column, vertically centered like a title card */

.stage {
  min-height: 100svh;
  max-width: 26rem;
  margin: 0 auto;
  padding: 4rem 1.375rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.intro-copy {
  min-width: 0;
}

.portrait {
  display: block;
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #262626;
  flex: 0 0 auto;
  filter: brightness(0.92);
}

.portrait:hover {
  filter: brightness(1.05);
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
}

.tagline {
  margin: 0.3rem 0 0;
  color: var(--body);
}

.about {
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* the list — plain rows joined by dot leaders */

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

.list li,
.posts li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}

.name {
  color: var(--fg);
  font-size: 0.9375rem;
  min-width: 0;
}

.desc,
.tag {
  flex-shrink: 0;
}

.leader {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--dots);
  transform: translateY(-0.3em);
}

.desc {
  color: var(--muted);
  font-size: 0.875rem;
  text-align: right;
}

.tag {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* link rows — underline grows from the left, arrow slides in */

.rowlink {
  position: relative;
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  text-decoration: none;
}

.rowlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
}

.rowlink:hover::after,
.rowlink:focus-visible::after {
  transform: scaleX(1);
}

.rowlink:hover .name {
  color: var(--accent);
}

.arrow {
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  display: inline-block;
}

.rowlink:hover .arrow,
.rowlink:focus-visible .arrow {
  opacity: 1;
  transform: none;
}

/* inline links (blog subtitle, back links) */

.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(110, 203, 133, 0.35);
  text-underline-offset: 3px;
}

.link:hover {
  text-decoration-color: var(--accent);
}

/* footer — hairline, socials, fineprint */

.foot {
  margin-top: 3.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.socials {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

.socials a:hover {
  color: var(--fg);
  background-size: 100% 1px;
}

.fineprint {
  margin: 0.9rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* blog */

.pagehead h1 {
  font-size: 1.5rem;
}

.sub {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.back {
  margin: 3rem 0 0;
  font-size: 0.875rem;
}

.back a {
  display: inline-block;
}

.back a:hover {
  transform: translateX(-3px);
}

a:active {
  opacity: 0.65;
}

/* rows acknowledge the pointer without pretending to be links */

.list li:hover .desc,
.posts li:hover .tag {
  color: var(--body);
}

.list li:hover .leader,
.posts li:hover .leader {
  border-color: #363636;
}

/* motion — load stagger, scroll reveal, hover. all gated on user preference */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .in {
    opacity: 0;
    transform: translateY(8px);
    animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }

  .in-1 { animation-delay: 0s; }
  .in-2 { animation-delay: 0.06s; }
  .in-3 { animation-delay: 0.12s; }
  .in-4 { animation-delay: 0.18s; }
  .in-5 { animation-delay: 0.24s; }
  .in-6 { animation-delay: 0.3s; }

  /* rows below the fold rise as they scroll into view — no js */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }

  .rowlink::after {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  .rowlink .name,
  .socials a,
  .link {
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
  }

  .arrow {
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .portrait {
    transition: filter 0.3s ease;
  }

  .socials a {
    transition: color 0.15s ease, background-size 0.25s ease;
  }

  .back a {
    transition: transform 0.2s ease;
  }

  .desc,
  .tag {
    transition: color 0.2s ease;
  }

  .leader {
    transition: border-color 0.2s ease;
  }

}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* small screens — drop the leaders, let titles wrap */

@media (max-width: 480px) {
  .leader {
    display: none;
  }

  .list li,
  .posts li,
  .rowlink {
    flex-wrap: nowrap;
  }

  .desc,
  .tag {
    margin-left: auto;
  }

  .desc {
    font-size: 0.8125rem;
    flex-shrink: 1;
    min-width: 0;
  }
}
