/* nileshk.com: one small stylesheet, no framework. */

:root {
  /* Dark theme built from the steel blue (~#1f5a85) behind the profile photo. */
  --bg: #0b1a26;
  --surface: #10263a;
  --border: #1e3b54;
  --text: #e7eef4;
  --muted: #9db3c6;
  --accent: #7cc0f0;
  --accent-hover: #a9d6f7;
  --accent-soft: #16354f;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

/* Icon sprite: holds <symbol>s only, must take no space. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font);
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1rem 2rem;
}

/* Intro */
.intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.avatar {
  width: 6.5rem;
  height: 6.5rem;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tagline { margin: .35rem 0 0; color: var(--muted); font-size: 1.125rem; }

/* Social links */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, background-color .15s, color .15s;
}
.social a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.icon { width: 1.1rem; height: 1.1rem; flex: none; }

/* Sections */
section { margin-top: 3rem; }
h2 {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: .875rem; }
.project {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.picon {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  padding: .45rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.project > div { min-width: 0; }
h3 { margin: .1rem 0 .3rem; font-size: 1.0625rem; line-height: 1.35; }
h3 a { color: var(--text); text-decoration: none; }
h3 a:hover { color: var(--accent); text-decoration: underline; }
.project p { margin: 0 0 .5rem; color: var(--muted); overflow-wrap: anywhere; }
.project p:last-child { margin-bottom: 0; }
.note { font-style: italic; }

/* Footer */
.footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: var(--muted);
  font-size: .875rem;
}
.footer p { margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* 404 */
.notfound { text-align: center; padding-top: 6rem; }
.notfound h1 { margin-bottom: .5rem; }
.notfound p { color: var(--muted); }

@media (max-width: 480px) {
  .page { padding-top: 1.5rem; }
  .intro { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .avatar { width: 5.5rem; height: 5.5rem; }
  .project { padding: 1rem; gap: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
