/* ==========================================================================
   Vishwajit Avarsekar — portfolio
   Plain CSS, no framework. Theme via CSS custom properties + [data-theme].
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --bg-terminal: #0d1117;
  --text: #1b1f23;
  --text-dim: #57606a;
  --border: #d0d7de;
  --accent: #116329;
  --accent-soft: #dafbe1;
  --link: #0969da;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --max-width: 780px;
  --radius: 6px;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-alt: #12161c;
  --bg-terminal: #010409;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --border: #30363d;
  --accent: #3fb950;
  --accent-soft: #0f2e1a;
  --link: #58a6ff;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 14px;
  white-space: nowrap;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .prompt { color: var(--accent); }
.brand .prompt-sep { color: var(--text-dim); }

.site-nav { flex: 1; display: flex; justify-content: center; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--link); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--text-dim); }

/* ---------- hero / terminal ---------- */

.hero {
  padding: 48px 0 32px;
}

.terminal {
  background: var(--bg-terminal);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  color: #8b949e;
  font-size: 12px;
  margin-left: 6px;
}

.terminal-body {
  padding: 18px 20px 22px;
  font-size: 13.5px;
  line-height: 1.75;
}
.terminal-body p { margin: 0 0 4px; }
.term-prompt { color: #3fb950; }
.term-out {
  color: #c9d1d9;
  margin-bottom: 14px !important;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: #3fb950;
  vertical-align: -3px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.btn:hover { border-color: var(--text-dim); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; }

/* ---------- sections ---------- */

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }

h2 {
  font-size: 20px;
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-tag { color: var(--accent); font-size: 15px; }

.prose p, .prose-line { margin: 0 0 14px; max-width: 62ch; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- project cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card-head h3 { margin: 0; font-size: 15px; font-family: var(--font-mono); }

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-new { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-muted { opacity: 0.7; }

.card-desc {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 12px;
}

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0;
  margin: 0 0 14px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.stack li::before { content: "· "; }
.stack li:first-child::before { content: ""; }

.card-links { display: flex; gap: 14px; font-size: 13px; font-family: var(--font-mono); }
.card-links-note { color: var(--text-dim); font-size: 13px; font-family: var(--font-mono); font-style: italic; }

.more-projects {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- now ---------- */

.now-box {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
}
.now-label { color: var(--accent); font-size: 12px; margin: 0 0 8px; }

/* ---------- timeline ---------- */

.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.timeline-item:first-child { border-top: none; }

.timeline-when {
  font-size: 12.5px;
  color: var(--text-dim);
  padding-top: 2px;
}
.dim { color: var(--text-dim); }

.timeline-what h3 { margin: 0 0 6px; font-size: 15px; }
.timeline-what p { margin: 0; font-size: 14px; color: var(--text-dim); max-width: 58ch; }
.tbd { color: var(--accent); }

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 24px;
}
.skill-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 6px;
}
.skill-group p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

/* ---------- contact ---------- */

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  margin-top: 16px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.site-footer p { margin: 0; font-size: 12.5px; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .header-inner { height: 52px; }
  .site-nav { position: static; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 52px;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    gap: 12px;
  }
  .nav-links.open { display: flex; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
}
