/* ============================================================
   viraj rao — portfolio
   code-aesthetic. mono-forward. one accent. no glow.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  --bg:           #0c0d10;
  --bg-soft:      #11131a;
  --bg-row:       #0e1015;
  --border:       #1c1e26;
  --border-soft:  #16181f;
  --text:         #d4d4d4;
  --text-dim:     #8a8d97;
  --text-faint:   #5a5d66;
  --accent:       #7ee787;   /* terminal green — used SPARINGLY */
  --accent-dim:   #4a8a52;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* very subtle grain — just enough to break flatness, not AI-glossy */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.025;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}
.brand img { border-radius: 3px; }
.brand-name { color: var(--text); }
.brand-sep  { color: var(--text-faint); margin: 0 2px; }
.brand-path { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 2px;
  transition: color 120ms ease, background 120ms ease;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }

/* ============================================================
   Layout
   ============================================================ */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

@media (max-width: 600px) {
  main { padding: 40px 18px 24px; }
  .header-inner { padding: 12px 18px; flex-wrap: wrap; gap: 10px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 4px 6px; font-size: 12px; }
  .brand { font-size: 12px; }
  .brand img { width: 22px; height: 22px; }
  .soon-pill { top: 8px; right: 8px; font-size: 9px; padding: 2px 6px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { margin-bottom: 72px; }

.prompt-line {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.prompt-line.small { font-size: 12px; margin-bottom: 12px; }

.prompt       { color: var(--text-faint); }
.prompt-sep   { color: var(--accent); }
.prompt-cmd   { color: var(--text); font-weight: 500; }
.prompt-arg   { color: var(--text-dim); }

.hero-name {
  font-family: var(--sans);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 16px;
  color: var(--text);
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 32px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
}

.role-tag {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-soft);
  color: var(--text-dim);
}

.hero-bio {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  max-width: 640px;
  margin: 0 0 40px;
}

.comment-prefix {
  font-family: var(--mono);
  color: var(--text-faint);
  font-style: italic;
  margin-right: 2px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 12px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { color: var(--text); font-size: 18px; font-weight: 500; }
.stat-label { color: var(--text-faint); }

/* ============================================================
   Section head
   ============================================================ */
.section-head {
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}
.section-title .count {
  color: var(--text-faint);
  font-weight: 400;
  font-family: var(--mono);
  font-size: 16px;
  margin-left: 4px;
}
.section-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 0;
}

/* ============================================================
   Project list
   ============================================================ */
.projects { margin-bottom: 72px; }

.project-list {
  border-top: 1px solid var(--border-soft);
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  transition: background 140ms ease;
}

.project:hover {
  background: var(--bg-row);
}
.project:hover .project-name { color: var(--accent); }
.project:hover .link-arrow   { transform: translateX(3px); color: var(--accent); }
.project:hover .link-url     { color: var(--accent); }
.project:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.project-mark {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0b0e;
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.project-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-main { min-width: 0; }

.project-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.project-name {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  transition: color 140ms ease;
}
.project-path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

.project-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 10px;
  max-width: 56ch;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
}

.tag {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-dim);
  background: transparent;
  letter-spacing: 0.01em;
}
.tag-status.status-shipped { color: var(--accent); border-color: rgba(126, 231, 135, 0.25); }
.tag-status.status-dev     { color: #f0b96b; border-color: rgba(240, 185, 107, 0.25); }
.tag-status.status-soon    { color: var(--text-faint); border-color: var(--border); }

.project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: right;
  flex-shrink: 0;
}
.link-url {
  transition: color 140ms ease;
}
.link-arrow {
  display: inline-block;
  transition: transform 160ms ease, color 140ms ease;
  color: var(--text-faint);
}

/* coming-soon pill */
.soon-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--text-faint);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 2px;
  z-index: 2;
}
.soon-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.project-soon { opacity: 0.78; }
.project-soon:hover { opacity: 1; }
.project-soon:hover .project-name { color: var(--text); } /* don't tease with accent on unlaunched */
.project-soon:hover .link-arrow   { color: var(--text); transform: translateX(0); }
.project-soon:hover .link-url     { color: var(--text-dim); }

/* ============================================================
   About
   ============================================================ */
.about { margin-bottom: 80px; }

.about-grid {
  border-top: 1px solid var(--border-soft);
}
.about-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  align-items: baseline;
}
.about-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.about-val {
  color: var(--text-dim);
  font-family: var(--sans);
}
.about-val a {
  color: var(--text);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.about-val a:hover { color: var(--accent); border-color: var(--accent-dim); }
.dot-sep { color: var(--text-faint); margin: 0 4px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 32px;
  padding: 20px 0 40px;
}
.footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.foot-left { display: inline-flex; gap: 8px; }
.foot-prompt { color: var(--accent); }
.foot-text   { color: var(--text-faint); }
.foot-right  { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.foot-right a {
  color: var(--text-dim);
  padding: 2px 6px;
  transition: color 120ms ease;
}
.foot-right a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .project {
    grid-template-columns: 48px 1fr;
    gap: 14px;
    padding: 18px 8px;
  }
  .project-mark { width: 44px; height: 44px; }
  .project-link { grid-column: 2 / -1; justify-self: start; margin-top: 4px; }
  .project-name { font-size: 17px; }
  .about-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 8px; }
  .hero-stats { gap: 20px; }
}

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