/* siddharth-shankar.com
   One unscrollable screen.

   The visual world is robn's, and robn's is the house brand: Syne for the
   display voice, DM Sans for everything that reads, lime #c8f135 as the one
   accent on court-green darks, glass surfaces over an ambient mesh. Tokens
   mirror apps/robn/public/styles.css — if a value differs from robn, robn is
   right.

   Layout: bar / center / base on a 100dvh column, over a field of light that
   is 365 real days of commits. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* ground: court-green darks, shared with robn */
  --dark: #0b100a;
  --court: #1a472a;
  --court-light: #2d6a42;

  --white: #f5f5f0;
  --muted: #93a48e;
  --muted-2: #6a7a65;

  /* the one accent */
  --lime: #c8f135;
  --lime-tint: rgba(200, 241, 53, 0.12);

  /* glass, straight from robn */
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --glass-brd: rgba(255, 255, 255, 0.10);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --ink: rgba(8, 12, 7, 0.35);

  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --r-card: 16px;
  --r-ctl: 12px;

  /* the light that follows the pointer */
  --torch: 330px;
  --mx: 32vw;
  --my: 42vh;
}

html {
  background: var(--dark);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ambient court-green mesh the glass refracts, exactly robn's */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(45, 106, 66, 0.55), transparent 60%),
    radial-gradient(90% 70% at -15% 30%, rgba(26, 71, 42, 0.65), transparent 55%),
    radial-gradient(70% 60% at 70% 105%, rgba(200, 241, 53, 0.07), transparent 60%),
    var(--dark);
}

::selection { background: var(--lime); color: var(--dark); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: var(--r-ctl);
}

/* ---------- the card ---------- */
.card {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 clamp(24px, 5vw, 72px);
}

/* ---------- the field: the world in 365 days of commits ---------- */
.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  contain: layout paint;
}
.hero-field .globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the field is drawn bright and then dimmed by this veil of background colour.
   the veil is masked away around the pointer, so the light is a hole in the
   dark rather than a second copy of the mosaic. */
.field-veil {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 10, 0.3);
  -webkit-mask-image: radial-gradient(
    circle var(--torch) at var(--mx) var(--my),
    transparent 0%,
    rgba(0, 0, 0, 0.5) 45%,
    #000 76%
  );
  mask-image: radial-gradient(
    circle var(--torch) at var(--mx) var(--my),
    transparent 0%,
    rgba(0, 0, 0, 0.5) 45%,
    #000 76%
  );
  will-change: mask-image;
}

/* keep the type legible over the field */
.field-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--dark) 2%, rgba(11, 16, 10, 0.78) 30%, rgba(11, 16, 10, 0.3) 60%, rgba(11, 16, 10, 0.08) 100%),
    linear-gradient(180deg, rgba(11, 16, 10, 0.5) 0%, transparent 24%, transparent 74%, rgba(11, 16, 10, 0.8) 100%);
}

/* portrait screens put the globe above the title, so the left-hand fade that
   protects the type on wide screens would only dim the globe */
@media (max-aspect-ratio: 1 / 1) {
  .field-fade {
    background:
      linear-gradient(180deg, rgba(11, 16, 10, 0.5) 0%, transparent 18%, transparent 58%, rgba(11, 16, 10, 0.92) 82%);
  }
  .field-veil { background: rgba(11, 16, 10, 0.16); }
}

.bar,
.center,
.base { position: relative; }

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}
.bar-mark {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
}
.bar-mark .op { color: var(--lime); }
a.bar-mark { transition: opacity 0.2s var(--ease); }
a.bar-mark:hover { opacity: 0.75; }

/* quiet text link, not a button */
.bar-nav {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 9px 10px 9px 14px;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.bar-nav:hover { color: var(--white); }
.bar-nav[aria-current="page"] { color: var(--lime); }
/* the nav rides in a glass dock, robn's signature surface: one of the few
   places the blur budget is spent */
.bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 24px var(--ink);
}

/* ---------- center ---------- */
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.2vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}
h1 .line { display: block; white-space: nowrap; }
.op { color: var(--lime); }
/* floodlight on the word that matters, robn's count-num glow */
h1:not(.h-page) .op { text-shadow: 0 0 40px rgba(200, 241, 53, 0.25); }

/* ---------- interior pages ---------- */
.center-top {
  justify-content: flex-start;
  padding-top: clamp(24px, 6vh, 64px);
}
.h-page {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
}
.lede {
  margin: 14px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
}

.apps {
  list-style: none;
  margin: clamp(24px, 5vh, 48px) 0 0;
  padding: 0;
  max-width: 620px;
}
.app + .app { margin-top: 12px; }

/* an app is a glass card, robn's game-row. Every app wears the house colour
   for now; --app-accent stays as the seam to split them later if wanted. */
.app--robn { --app-accent: #c8f135; --app-accent-line: rgba(200, 241, 53, 0.4); }

.app-link {
  display: grid;
  gap: 8px;
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-card);
  padding: clamp(16px, 2.6vh, 22px) clamp(16px, 2.6vw, 22px);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.18s var(--ease);
}
.app-link:hover {
  border-color: var(--app-accent-line, var(--glass-edge));
  background: var(--glass-strong);
}
.app-link:active { transform: scale(0.99); }

.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-name {
  /* each mark written the way robn writes its own: Syne caps, two-tone */
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
}
.app-name .app-name-tail { color: var(--app-accent); }

/* robn's serve-tag: the loudest smallest thing on the page, in-app colour */
.app-status {
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--app-accent, var(--lime));
  border-radius: 6px;
  padding: 3px 7px;
}
.app-head .arr {
  margin-left: auto;
  color: var(--muted-2);
  transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}
.app-link:hover .arr {
  transform: translate(2px, -2px);
  color: var(--app-accent, var(--lime));
}

.app-summary {
  color: var(--white);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  font-weight: 600;
  text-wrap: pretty;
}
.app-detail {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- base: the status line ---------- */
.base {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 28px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.status {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.sep { color: var(--muted-2); }

/* awake in Melbourne, or not */
.dot {
  position: relative;
  top: -1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
  align-self: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.dot.awake {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 241, 53, 0.14);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {

  /* the page arrives: title lines first, then the status line */
  h1 .line,
  .base {
    opacity: 0;
    animation: rise 0.9s var(--ease) forwards;
  }
  h1 .line { transform: translateY(22px); animation-delay: 80ms; }
  h1 .line + .line { animation-delay: 220ms; }
  .base { animation-delay: 0.45s; }
  @keyframes rise {
    to { opacity: 1; transform: none; }
  }

  .dot.awake { animation: breathe 4s ease-in-out infinite; }
  @keyframes breathe {
    0%, 100% { box-shadow: 0 0 0 3px rgba(200, 241, 53, 0.14); }
    50% { box-shadow: 0 0 0 5px rgba(200, 241, 53, 0.05); }
  }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  :root { --torch: 210px; }
  .card { padding: 0 20px; }
  .bar { padding: 16px 0; }
  .bar-mark { font-size: 1.15rem; }
  .bar-actions { gap: 6px; padding: 5px; }
  .bar-nav { font-size: 0.9rem; padding: 8px 6px 8px 10px; }
  .center { justify-content: flex-end; padding-bottom: 32px; }
  /* phones get the two sentences stacked; "Product Manager." sets the width */
  h1 { font-size: clamp(1.4rem, 6.3vw, 2.2rem); }
  .h-page { font-size: clamp(1.8rem, 7.5vw, 2.4rem); }
  .base {
    padding-bottom: 20px;
    font-size: 0.74rem;
  }
}

@media (max-width: 400px) {
  .bar-mark { font-size: 1rem; }
  .base { font-size: 0.68rem; }
}

/* very short viewports: let it scroll rather than clip */
@media (max-height: 560px) {
  .card { min-height: 100dvh; height: auto; }
}

