/* ============================================================
   style.css — Vivek Rawat Portfolio
   Sections:
     1. Reset & Root Variables
     2. Global / Utilities
     3. Syntax color helpers
     4. Layout & Containers
     5. Navigation
     6. Hero + Terminal + Pipeline
     7. Section labels
     8. About (file card)
     9. Skills
    10. Certifications
    11. Experience (git log)
    12. Projects
    13. Education
    14. Contact
    15. Footer
    16. Reveal animation
    17. Responsive
   ============================================================ */

/* ── 1. Reset & Root Variables ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Background palette */
  --bg:      #0d1117;
  --bg-2:    #161b22;
  --bg-3:    #21262d;
  --border:  #30363d;

  /* Syntax / accent colours */
  --green:   #39d353;
  --green-2: #56d364;
  --cyan:    #79c0ff;
  --purple:  #bc8cff;
  --orange:  #ffa657;
  --yellow:  #e3b341;
  --red:     #ff7b72;
  --text:    #e6edf3;
  --muted:   #7d8590;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Geometry */
  --radius:       10px;
  --radius-sm:    6px;
  --section-gap:  80px;
  --card-shadow:  0 8px 32px rgba(0, 0, 0, .5);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. Global / Utilities ─────────────────────────────────── */
a { color: inherit; }

ul { list-style: none; }

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
}

/* ── 3. Syntax colour helpers ──────────────────────────────── */
.c-kw     { color: var(--purple); }
.c-fn     { color: var(--cyan); }
.c-str    { color: var(--green); }
.c-arg    { color: var(--orange); }
.c-flag   { color: var(--yellow); }
.c-muted  { color: var(--muted); }
.c-comment{ color: var(--muted); }
.c-green  { color: var(--green); }
.c-val    { color: var(--cyan); }

/* ── 4. Layout & Containers ────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section { padding: var(--section-gap) 0; }

/* ── 5. Navigation ─────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, .92);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 24px;
  flex-wrap: wrap;
}

/* Brand / logo */
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.brand__prompt { color: var(--green); }
.brand__at     { color: var(--muted); }
.brand__host   { color: var(--cyan); }

.brand__cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--green);
  vertical-align: middle;
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}

.nav__links a:hover { color: var(--cyan); background: rgba(121, 192, 255, .08); }

.nav__dl {
  color: var(--green-2) !important;
  border: 1px solid rgba(86, 211, 100, .35) !important;
  transition: background .2s, color .2s !important;
}

.nav__dl:hover {
  background: rgba(86, 211, 100, .1) !important;
  color: var(--green) !important;
}

/* ── 6. Hero + Terminal + Pipeline ─────────────────────────── */
.hero-section { padding-top: 72px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* -- Terminal window -- */
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.terminal__chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.chrome__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chrome__dot--red    { background: #ff5f57; }
.chrome__dot--yellow { background: #febc2e; }
.chrome__dot--green  { background: #28c840; }

.chrome__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 8px;
}

.terminal__body {
  padding: 18px 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  min-height: 290px;
}

/* Terminal line types */
.t-line { display: flex; gap: 8px; }

.t-line__ps {
  color: var(--green);
  white-space: nowrap;
  user-select: none;
}

.t-output       { padding-left: 2px; margin: 2px 0 10px; }
.t-output__key  { color: var(--purple); }
.t-output__val  { color: var(--green-2); }
.t-output__str  { color: var(--yellow); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  vertical-align: middle;
  animation: cursor-blink 1.1s step-end infinite;
}

/* Skills terminal variant */
.terminal__body--skills { padding: 18px 20px; }

.skill-cmd {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 14px;
}

/* -- Pipeline panel -- */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pipeline__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.pipeline__canvas-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 22px 16px 18px;
  box-shadow: var(--card-shadow);
}

.pipeline__stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  background: var(--bg-3);
  color: var(--muted);
}

.stat-chip__val { color: var(--cyan); }

/* ── 7. Section labels ──────────────────────────────────────── */
.sec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── 8. About (file card) ───────────────────────────────────── */
.file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.file-card__tabs {
  display: flex;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.file-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 18px;
  color: var(--muted);
  border-right: 1px solid var(--border);
}

.file-tab--active {
  color: var(--text);
  border-bottom: 2px solid var(--cyan);
  margin-bottom: -1px;
  background: var(--bg-2);
}

.file-card__body {
  padding: 22px 26px;
}

.c-comment { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }

.prose p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 14px;
}

.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--cyan); font-weight: 600; }

/* ── 9. Skills ──────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.skill-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-3);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s;
  cursor: default;
  min-height: 44px;
}

.skill-item:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(121, 192, 255, .12);
}

.skill-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.skill-item__icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.skill-item__name {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.35;
  flex: 1;
  /* allow up to 2 lines, full text on hover */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-item:hover .skill-item__name {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.skill-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

.badge--core   { background: rgba(121, 192, 255, .12); color: var(--cyan);    border: 1px solid rgba(121, 192, 255, .25); }
.badge--cloud  { background: rgba(188, 140, 255, .12); color: var(--purple);  border: 1px solid rgba(188, 140, 255, .25); }
.badge--stream { background: rgba(57, 211, 83, .12);   color: var(--green-2); border: 1px solid rgba(57, 211, 83, .25);  }
.badge--gov    { background: rgba(255, 166, 87, .12);  color: var(--orange);  border: 1px solid rgba(255, 166, 87, .25); }

.install-success {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--green-2);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── 10. Certifications ─────────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.cert-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .2s;
}

.cert-card:hover { border-color: var(--yellow); }

.cert-card__icon { font-size: 22px; flex-shrink: 0; }

.cert-card__text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}

.cert-card__valid {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

/* ── 11. Experience (git log) ───────────────────────────────── */
.git-log {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  font-family: var(--font-mono);
}

.git-log__header {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 12px;
}

.git-entry {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}

.git-entry:last-child { border-bottom: none; }
.git-entry:hover      { background: rgba(121, 192, 255, .04); }

.git-entry__hash  { font-size: 12px; color: var(--yellow); padding-top: 2px; }
.git-entry__title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }

.git-entry__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.git-entry__branch { color: var(--purple); }

.git-entry__tag {
  color: var(--green-2);
  padding: 1px 6px;
  border: 1px solid rgba(86, 211, 100, .3);
  border-radius: 4px;
}

.git-entry__bullets { list-style: none; }

.git-entry__bullets li {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
  padding: 2px 0;
}

.git-entry__bullets li::before { content: '- '; color: var(--green); }

/* ── 12. Projects ───────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
}

.project-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(121, 192, 255, .1);
}

.project-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  min-height: 40px;
  overflow: hidden;
}

.project-card__fn  {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.project-card__ext { font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex-shrink: 0; }

.project-card__dur {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

.project-card__body {
  padding: 16px 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card__bullets { list-style: none; }

.project-card__bullets li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  padding: 2px 0;
}

.project-card__bullets li::before {
  content: '▸ ';
  color: var(--green);
  font-size: 11px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-3);
}

/* ── 13. Education ──────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.edu-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  padding: 18px;
  transition: border-color .2s;
}

.edu-card:hover { border-color: var(--purple); }

.edu-card__year   { font-family: var(--font-mono); font-size: 11px;   color: var(--yellow); margin-bottom: 6px; }
.edu-card__degree { font-family: var(--font-mono); font-size: 13.5px; color: var(--cyan);   margin-bottom: 2px; }
.edu-card__field  { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.edu-card__inst   { font-size: 12.5px; color: var(--muted); }
.edu-card__grade  { font-family: var(--font-mono); font-size: 11px; color: var(--green-2); margin-top: 8px; }

/* ── 14. Contact ────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 20px 22px;
  font-family: var(--font-mono);
  transition: border-color .2s;
}

.contact-card:hover { border-color: var(--cyan); }

.contact-card--dl              { border-color: rgba(86, 211, 100, .3); }
.contact-card--dl:hover        { border-color: var(--green-2); }
.contact-card--dl a            { color: var(--green-2); font-size: 14px; text-decoration: none; }
.contact-card--dl a:hover      { text-decoration: underline; }

.contact-card__label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-card a {
  color: var(--cyan);
  font-size: 13px;
  text-decoration: none;
  word-break: break-all;
}

.contact-card a:hover { text-decoration: underline; }

/* ── 15. Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── 16. Reveal animation ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── 17. Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .pipeline {
    order: -1;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root { --section-gap: 56px; }

  .nav { padding: 10px 16px; }

  .nav__links a     { font-size: 11.5px; padding: 5px 7px; }

  .terminal__body   { font-size: 12px; }

  .git-entry        { grid-template-columns: 1fr; gap: 6px; }
  .git-entry__hash  { display: none; }

  .certs-grid,
  .edu-grid,
  .contact-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .skills-grid      { grid-template-columns: repeat(2, 1fr); }
  .hero-section     { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal           { opacity: 1; transform: none; transition: none; }
  #matrix-canvas    { display: none; }
  .brand__cursor,
  .t-cursor         { animation: none; opacity: 1; }
}
