/* Chakravarthi's Homepage. A 1997 personal homepage, built with 2026 CSS. */

@font-face {
  font-family: "Geist Pixel";
  src: url("assets/fonts/geist-pixel-square.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --space: #05051c;
  --silver: #c0c0c0;
  --silver-hi: #ffffff;
  --silver-lo: #808080;
  --silver-dk: #404040;
  --ink: #111111;
  --navy: #000080;
  --win-blue: #1084d0;
  --link: #0000ee;
  --visited: #551a8b;
  --yellow: #ffde00;
  --hot: #ff2bd6;
  --lime: #39ff14;
  --pixel: "Geist Pixel", "Courier New", monospace;
  --mono: "Geist Mono", "Courier New", monospace;
  --serif: "Times New Roman", Times, serif;
  --comic: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.5 var(--serif);
  background-color: var(--space);
  /* Tiled starfield, the way GeoCities intended (four repeating star layers). */
  background-image:
    radial-gradient(1.5px 1.5px at 23px 37px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91px 12px, #cfe3ff 50%, transparent 51%),
    radial-gradient(1px 1px at 140px 88px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 61px 131px, #fff6c2 50%, transparent 51%),
    radial-gradient(1px 1px at 12px 160px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 170px 150px, #b9c8ff 50%, transparent 51%);
  background-size: 190px 190px, 190px 190px, 190px 190px, 230px 230px, 170px 170px, 210px 210px;
}

/* A second, sparser star layer that twinkles. Fixed and non-interactive, so it never repaints the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 40px 60px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 260px 210px, #ffe98a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 150px 330px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 340px 40px, #a9c2ff 50%, transparent 51%);
  background-size: 380px 380px;
  animation: twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.15; } to { opacity: 1; } }

a { color: var(--link); }
a:visited { color: var(--visited); }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
}

.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--yellow); color: var(--ink); padding: 6px 10px; z-index: 10;
}
.skip:focus { top: 8px; }

/* Masthead */

.masthead {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 12px;
  text-align: center;
}

.wordart {
  margin: 0;
  font: 400 clamp(30px, 5.4vw, 62px)/1.1 var(--pixel);
  color: var(--yellow);
  letter-spacing: 0.01em;
  /* Stacked shadows give the 3D WordArt extrusion. */
  text-shadow:
    1px 1px 0 #ff7a00, 2px 2px 0 #ff7a00, 3px 3px 0 #e0004d,
    4px 4px 0 #e0004d, 5px 5px 0 #7a00a8, 6px 6px 0 #7a00a8,
    7px 7px 10px rgba(0, 0, 0, 0.6);
  transform: perspective(600px) rotateX(10deg);
}

.tagline {
  margin: 14px 0 18px;
  color: var(--lime);
  font: 20px/1.4 var(--comic);
}

.marquee {
  overflow: hidden;
  border: 3px ridge var(--silver);
  background: var(--navy);
  color: var(--yellow);
  font: 16px/1 var(--mono);
  padding: 8px 0;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: marquee 38s linear infinite; }
.marquee-track span { padding-right: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

.mobile-nav { display: none; }

/* Layout */

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px 24px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (min-width: 821px) {
  .sidebar { position: sticky; top: 12px; }
}

/* The beveled grey box, the building block of the 90s. */
.box {
  background: var(--silver);
  border: 2px solid;
  border-color: var(--silver-hi) var(--silver-dk) var(--silver-dk) var(--silver-hi);
  box-shadow: inset -1px -1px 0 var(--silver-lo), inset 1px 1px 0 #dfdfdf;
  padding: 3px;
}
.box + .box { margin-top: 18px; }

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 5px 8px 4px;
  background: linear-gradient(90deg, var(--navy), var(--win-blue));
  color: #fff;
  font: 400 15px/1.2 var(--pixel);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Decorative minimise / maximise / close buttons, drawn as three bevelled squares. */
.titlebar::after {
  content: "";
  flex: none;
  width: 50px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) 4px 9px / 6px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 21px 3px / 8px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 21px 4px / 1px 7px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 28px 4px / 1px 7px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 21px 10px / 8px 1px no-repeat,
    linear-gradient(45deg, transparent 44%, var(--ink) 45% 55%, transparent 56%) 38px 3px / 8px 8px no-repeat,
    linear-gradient(-45deg, transparent 44%, var(--ink) 45% 55%, transparent 56%) 38px 3px / 8px 8px no-repeat,
    linear-gradient(var(--silver), var(--silver)) 0 0 / 14px 14px no-repeat,
    linear-gradient(var(--silver), var(--silver)) 18px 0 / 14px 14px no-repeat,
    linear-gradient(var(--silver), var(--silver)) 36px 0 / 14px 14px no-repeat;
  filter: drop-shadow(1px 1px 0 var(--silver-dk));
}
.counter-box .titlebar, .buddy .titlebar { justify-content: space-between; }

.panel-body { padding: 18px 22px 22px; }
.small { font-size: 15px; color: #2a2a2a; }
.center { text-align: center; }

/* Buttons */

.btn {
  display: inline-block;
  background: var(--silver);
  color: var(--ink);
  text-decoration: none;
  font: 15px/1.2 var(--mono);
  padding: 6px 12px;
  border: 2px solid;
  border-color: var(--silver-hi) var(--silver-dk) var(--silver-dk) var(--silver-hi);
  box-shadow: inset -1px -1px 0 var(--silver-lo), inset 1px 1px 0 #dfdfdf;
  cursor: pointer;
  white-space: nowrap;
}
.btn:visited { color: var(--ink); }
.btn:hover { background: #d4d4d4; }
.btn:active {
  border-color: var(--silver-dk) var(--silver-hi) var(--silver-hi) var(--silver-dk);
  box-shadow: inset 1px 1px 0 var(--silver-lo);
  transform: translate(1px, 1px);
}
.btn-big { font-size: 15px; padding: 9px 13px; }

.nav-buttons { display: grid; gap: 6px; padding: 10px; }
.nav-buttons .btn { text-align: left; }

/* Sidebar widgets */

.buddy-body { padding: 10px 12px 12px; font: 14px/1.4 var(--mono); }
.buddy-body p { margin: 0; }
.led {
  display: inline-block;
  vertical-align: -1px;
  margin-right: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 1px #0a5a00, inset -2px -2px 0 rgba(0,0,0,.25);
}
.away {
  margin-top: 10px !important;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--silver-lo);
  font: 15px/1.35 var(--comic);
}
.away span { display: block; font: 12px/1.3 var(--mono); color: #555; margin-bottom: 2px; }

.counter-box { text-align: center; }
.counter-box .small { margin: 8px 10px 10px; font-size: 14px; }
.odometer {
  display: inline-flex;
  gap: 2px;
  margin-top: 12px;
  padding: 3px;
  background: #000;
  border: 2px inset var(--silver);
}
.odometer span {
  display: inline-block;
  width: 26px;
  padding: 3px 0;
  background: linear-gradient(#2b2b2b, #0a0a0a 50%, #1c1c1c);
  color: var(--lime);
  font: 600 24px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.odometer .plus { color: var(--yellow); }

.construction { text-align: center; padding: 0; max-width: 380px; margin: 0 auto 20px; color: var(--ink); }
.construction p { margin: 0; padding: 10px 12px; font: 14px/1.4 var(--comic); }
.construction b { font-family: var(--pixel); font-weight: 400; font-size: 15px; letter-spacing: 0.05em; }
.hazard {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, #141414 12px 24px);
}

/* 88x31 web badges. */
.badges {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, 88px);
  gap: 8px;
  justify-content: center;
}
.b88 {
  width: 88px;
  height: 31px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.5), inset -1px -1px 0 rgba(0,0,0,.4);
  line-height: 1;
  overflow: hidden;
}
.b88 b { font: 400 12px/1 var(--pixel); letter-spacing: 0.04em; }
.b88 i { font: 9px/1.1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; }
.b-go { background: linear-gradient(#00add8, #00728f); color: #fff; }
.b-rust { background: linear-gradient(#f0a070, #b7410e); color: #1b0b00; }
.b-ex { background: linear-gradient(#8a5bb5, #4b275f); color: #fde9ff; }
.b-expo { background: linear-gradient(#ffffff, #d7d7d7); color: #000020; }
.b-pg { background: linear-gradient(#5b8fc4, #336791); color: #fff; }
.b-any { background: linear-gradient(#ffef7a, #e2b800); color: #200; }
.b-any b { font-size: 10px; letter-spacing: 0; white-space: nowrap; }
.b-any i { font-size: 8px; }

/* About */

.about { display: grid; grid-template-columns: minmax(0, 1fr) 206px; gap: 24px; }
.about-text p { margin: 0 0 12px; max-width: 62ch; }
.hello { font-size: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.about-side { display: grid; gap: 16px; align-content: start; }
.me {
  margin: 0;
  padding: 8px 8px 4px;
  background: linear-gradient(135deg, #ffd700, #ff8c00 40%, #e0004d 70%, #7a00a8);
  border: 2px solid #000;
  box-shadow: 4px 4px 0 var(--silver-dk);
  transform: rotate(-1.5deg);
}
.me img { display: block; width: 100%; height: auto; border: 2px solid #fff; }
.me figcaption {
  text-align: center;
  padding: 5px 0 1px;
  color: #fff;
  font: 400 15px/1.2 var(--pixel);
  text-shadow: 1px 1px 0 #000;
}

.facts {
  margin: 0;
  padding: 12px 14px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 3px 3px 0 var(--silver-dk);
  font: 14px/1.35 var(--comic);
  align-self: start;
}
.facts dt { font: 400 12px/1.2 var(--pixel); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); margin-top: 10px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 2px 0 0; }

/* Rainbow horizontal rule, straight from 1997. */
.rainbow {
  height: 6px;
  border: 0;
  margin: 22px 0;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffee00, #33dd00, #0099ff, #6633ff, #ff00cc);
}

/* Projects */

.stats {
  list-style: none;
  margin: 18px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.1fr 1fr;
  gap: 10px;
}
.stats li {
  padding: 12px 12px 10px;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 var(--silver-dk);
}
.stats b { display: block; font: 400 34px/1 var(--pixel); }
.stats span { display: block; margin-top: 6px; font: 13px/1.3 var(--mono); }
.st-1 { background: var(--yellow); }
.st-2 { background: #00e5ff; }
.st-3 { background: #ff8ae2; }
.st-4 { background: var(--lime); }

.pixel-h {
  margin: 0 0 10px;
  font: 400 26px/1.15 var(--pixel);
  letter-spacing: 0.02em;
}
.pixel-h a, .pixel-h a:visited { color: var(--navy); }

.stars { list-style: none; padding: 0; margin: 14px 0 0; max-width: 70ch; }
.stars li { position: relative; padding-left: 28px; margin: 0 0 10px; }
.stars li::before {
  content: "\2605";
  position: absolute; left: 2px; top: 0;
  color: #e0004d;
  text-shadow: 1px 1px 0 var(--yellow);
}

.album {
  margin: 26px 0 0;
  padding: 16px 16px 6px;
  border: 10px solid #7a4a22;
  border-image: linear-gradient(135deg, #9b6331, #5e3816) 1;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
  /* Cork: speckles over a warm base. */
  background-color: #c4935a;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(90, 50, 20, .35) 1px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(255, 230, 190, .35) 1px, transparent 2px),
    radial-gradient(circle at 45% 60%, rgba(90, 50, 20, .3) 1.5px, transparent 2.5px);
  background-size: 13px 11px, 17px 19px, 23px 21px;
}
.album-title {
  text-align: center;
  color: #fff;
  text-shadow: 2px 2px 0 #5e3816;
  font: 400 20px/1 var(--pixel);
  margin: 0 0 14px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  max-width: 780px;
  margin: 0 auto;
}
.polaroid {
  position: relative;
  margin: 0;
  background: #fff;
  padding: 8px 8px 4px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.55);
}
.polaroid img { display: block; width: 100%; height: auto; border: 1px solid #ddd; }
.polaroid figcaption { text-align: center; font: 16px/1.3 var(--comic); padding: 6px 0 2px; }
.pin {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a8a, #d40000 55%, #7a0000);
  box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.45);
}
.tilt-r .pin { background: radial-gradient(circle at 35% 35%, #8ad4ff, #0068d4 55%, #00337a); }
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(1.5deg) translateY(10px); }
.album .small { color: #2b1606; font-weight: 700; }

/* Open source */

.feature {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.feature p { margin: 0 0 12px; max-width: 60ch; }
.tv {
  padding: 10px;
  background: linear-gradient(#3a3a3a, #1a1a1a);
  border-radius: 14px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 var(--silver-dk);
}
.tv video { display: block; width: 100%; height: auto; border-radius: 6px; background: #eee; }

.new {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 6px 3px;
  background: var(--hot);
  color: #fff;
  font: 400 13px/1 var(--pixel);
  transform: rotate(-6deg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.links-inline { display: flex; flex-wrap: wrap; gap: 18px; }

.oss {
  width: 100%;
  margin-top: 26px;
  border-collapse: separate;
  border-spacing: 2px;
  border: 2px outset var(--silver);
  background: var(--silver);
  font-size: 16px;
}
.oss caption {
  caption-side: top;
  text-align: left;
  font: 400 18px/1.2 var(--pixel);
  color: var(--navy);
  padding-bottom: 8px;
}
.oss th {
  background: var(--navy);
  color: #fff;
  font: 400 13px/1.2 var(--pixel);
  letter-spacing: 0.05em;
  text-align: left;
  padding: 6px 8px;
}
.oss td {
  background: #ececec;
  border: 1px inset var(--silver);
  padding: 8px;
  vertical-align: top;
}
.oss td:first-child { font-weight: 700; white-space: nowrap; }
.oss td:nth-child(2) { font: 14px/1.4 var(--mono); white-space: nowrap; }

/* History */

.history { width: 100%; border-collapse: collapse; }
.history td { padding: 12px 10px; vertical-align: top; }
.history tr + tr td { border-top: 2px groove var(--silver); }
.history .when { font: 14px/1.5 var(--mono); white-space: nowrap; color: var(--navy); width: 1%; }

/* Guestbook */

.guestbook .panel-body { background: #ffffe1; margin: 3px 0 0; border: 1px solid #000; }
.guestbook p { margin: 0 0 12px; max-width: 62ch; }
.gb-form { display: grid; gap: 14px; max-width: 520px; margin: 6px 0 18px; }
.field { display: grid; gap: 6px; }
.field label { font: 400 14px/1.2 var(--pixel); letter-spacing: 0.04em; color: var(--navy); }
.field input, .field textarea {
  width: 100%;
  padding: 8px 10px;
  font: 17px/1.4 var(--serif);
  color: var(--ink);
  background: #fff;
  border: 2px solid;
  border-color: var(--silver-dk) var(--silver-hi) var(--silver-hi) var(--silver-dk);
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px dotted var(--navy); outline-offset: 2px; }
.hint { margin: 0 !important; font-size: 14px; color: #3d3d3d; }
.gb-form .btn { justify-self: start; }
.or { margin-bottom: 6px !important; font-size: 15px; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.email { font: 600 clamp(17px, 2.4vw, 22px)/1.3 var(--mono); word-break: break-all; }

.webring {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font: 16px/1.4 var(--mono);
}

/* Footer */

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 40px;
  text-align: center;
  color: #d8d8ff;
  font-size: 15px;
}
.footer a, .footer a:visited { color: var(--yellow); }
.footer p { margin: 6px 0; }

/* Phones and small tablets: one column, sidebar after the content. */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .masthead { padding-top: 22px; }
  .wordart { transform: none; }
  .layout { grid-template-columns: 1fr; padding: 12px 12px 24px; }
  .sidebar { order: 2; }
  .nav-box { display: none; }
  .mobile-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin-top: 12px;
    font: 15px/1.4 var(--mono);
  }
  .mobile-nav a, .mobile-nav a:visited { color: var(--yellow); }
  .about { grid-template-columns: 1fr; }
  .about-side { grid-template-columns: 140px 1fr; align-items: start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .panel-body { padding: 16px; }
  .feature { grid-template-columns: 1fr; }
  .tv { max-width: 220px; margin: 0 auto; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 460px; }
  .polaroid { padding: 5px 5px 2px; }
  .polaroid figcaption { font-size: 13px; }
  .oss thead { display: none; }
  .oss, .oss tbody, .oss tr, .oss td { display: block; width: 100%; }
  .oss tr { margin-bottom: 8px; }
  .oss td:nth-child(2) { padding-top: 0; border-top: 0; }
  .oss td:first-child { border-bottom: 0; }
  .history .when { white-space: normal; width: 34%; }
  .badges { grid-template-columns: repeat(3, 88px); }
}

@media (max-width: 480px) {
  .about-side { grid-template-columns: 1fr; }
  .me { max-width: 180px; }
  /* The album becomes a sideways swipe on phones. */
  .album { padding: 14px 0 6px; }
  .album-grid {
    display: flex;
    gap: 14px;
    max-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 14px 12px;
  }
  .polaroid { flex: 0 0 64%; scroll-snap-align: center; }
  .tilt-l, .tilt-r { transform: none; }
  .badges { grid-template-columns: repeat(2, 88px); }
  .history td { display: block; width: 100%; padding: 4px 6px; }
  .history .when { width: 100%; padding-top: 12px; }
  .history tr + tr td { border-top: 0; }
  .history tr + tr .when { border-top: 2px groove var(--silver); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .new, body::before { animation: none; }
  .marquee { white-space: normal; padding: 8px 12px; }
  .marquee-track span + span { display: none; }
}

@media print {
  body { background: #fff; }
  .marquee, .sidebar, .mobile-nav, .construction { display: none; }
  .layout { grid-template-columns: 1fr; }
  .wordart { color: #000; text-shadow: none; transform: none; }
}

