/* =========================================================
   style.css — Dark Terminal Portfolio
   Slava Matsukevich | Platform Engineer
   ========================================================= */

/* --- Google Fonts loaded in index.html ------------------- */

/* --- Design Tokens --------------------------------------- */

:root {
  --bg-primary:     #0d1117;
  --bg-secondary:   #161b22;
  --bg-tertiary:    #21262d;
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;
  --accent-green:   #00ff41;
  --accent-cyan:    #58a6ff;
  --accent-yellow:  #e3b341;
  --border-color:   #30363d;
  --font-mono:      'Fira Code', 'Source Code Pro', 'Cascadia Code', ui-monospace, monospace;
  --section-gap:    3.5rem;
  --scanline-opacity: 0.025;
}

/* --- Reset & Base ---------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* --- CRT Scanline Overlay -------------------------------- */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 4px
  );
}

/* --- Typography ------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.3;
}

h2 {
  font-size: 1.15rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

h2::before {
  content: '> ';
  color: var(--accent-green);
  opacity: 0.7;
}

h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 0.75rem;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: var(--accent-green);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
  text-decoration: underline;
}

/* --- Scrollbar ------------------------------------------- */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-green);
  border-radius: 3px;
  opacity: 0.6;
}

/* --- Shared Prompt Symbol -------------------------------- */

.prompt {
  color: var(--accent-green);
  font-weight: 600;
  margin-right: 0.4rem;
  user-select: none;
}

/* --- Navbar ---------------------------------------------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 2rem;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-user { color: var(--accent-green); }
.nav-sep  { color: var(--text-muted); }
.nav-dir  { color: var(--accent-cyan); }

.cursor-inline {
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-green);
  background: rgba(0, 255, 65, 0.08);
  text-shadow: none;
}

.nav-prefix {
  color: var(--text-muted);
  font-size: 0.8em;
}

.nav-cta {
  color: var(--accent-green) !important;
  border: 1px solid rgba(0, 255, 65, 0.3) !important;
}

.nav-cta:hover {
  background: rgba(0, 255, 65, 0.15) !important;
}

/* --- Hero ------------------------------------------------ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 3rem;
  position: relative;
}

.hero-content {
  max-width: 860px;
  width: 100%;
}

.hero-ascii {
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: clamp(0.3rem, 1.2vw, 0.65rem);
  color: var(--accent-green);
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
  line-height: 1.2;
  white-space: pre;
  animation: glowPulse 4s ease-in-out infinite;
}

.hero-name-fallback {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: var(--accent-green);
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  display: none;
}

.hero-prompt {
  display: flex;
  align-items: center;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.prompt-cmd {
  color: var(--text-primary);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent-green);
  min-height: 2.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.cursor-blink {
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
}

.hero-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.meta-item::before {
  color: var(--text-muted);
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-link {
  color: var(--accent-cyan);
  border: 1px solid rgba(88, 166, 255, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
}

.hero-link:hover {
  color: var(--accent-green);
  border-color: rgba(0, 255, 65, 0.4);
  background: rgba(0, 255, 65, 0.08);
  text-shadow: none;
  text-decoration: none;
}

.hero-scroll-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: fadeInUp 1s ease 1.5s both;
}

/* --- Shared Section Layout ------------------------------- */

.section {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--section-gap) 2rem;
}

.section-header {
  margin-bottom: 2rem;
}

.ascii-divider {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
}

.section-cmd {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* --- Shared Highlight ------------------------------------ */

.highlight {
  color: var(--accent-yellow);
  font-weight: 600;
}

/* --- Skills Section -------------------------------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-category.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-comment {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 3px;
  transition: all 0.2s;
  cursor: default;
}

.tag:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.15);
}

.tag.accent {
  border-color: rgba(0, 255, 65, 0.3);
  color: var(--accent-green);
}

/* --- Experience Section ---------------------------------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job-card {
  border-left: 2px solid var(--border-color);
  padding: 1.5rem 1.75rem;
  margin-bottom: 0.25rem;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease;
}

.job-card::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 1.75rem;
  width: 8px;
  height: 8px;
  background: var(--border-color);
  border-radius: 50%;
  transition: background 0.3s;
}

.job-card:hover {
  border-left-color: var(--accent-green);
}

.job-card:hover::before {
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
}

.job-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.job-header {
  margin-bottom: 0.75rem;
}

.job-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.3rem;
}

.job-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.job-sep {
  color: var(--text-muted);
}

.job-company {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.job-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-left: 0.4rem;
}

.job-badge.current {
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.4);
  color: var(--accent-green);
}

.job-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.job-dates {
  color: var(--text-muted);
}

.job-context {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.job-bullets {
  list-style: none;
  padding: 0;
  margin-bottom: 0.75rem;
}

.job-bullets li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  line-height: 1.6;
  position: relative;
  padding-left: 1.2rem;
}

.job-bullets li::before {
  content: '> ';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  opacity: 0.6;
}

.job-award {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-yellow);
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: rgba(227, 179, 65, 0.07);
  border: 1px solid rgba(227, 179, 65, 0.2);
  border-radius: 3px;
  width: fit-content;
}

.award-icon {
  font-weight: 700;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.tag-sm {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.tag-sm:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

/* --- Certs & Awards Section ------------------------------ */

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cert-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--accent-cyan);
  padding: 1rem 1.25rem;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
}

.cert-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.cert-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.1);
}

.cert-issuer {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cert-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

.awards-list h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.award-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid rgba(227, 179, 65, 0.4);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.award-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.award-card .award-icon {
  color: var(--accent-yellow);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.award-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.award-source {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.award-sep {
  color: var(--text-muted);
}

.award-quote {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.4rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-color);
  line-height: 1.6;
}

/* --- Education Section ----------------------------------- */

.edu-card {
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent-cyan);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-radius: 3px;
  max-width: 480px;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.edu-school {
  font-size: 0.875rem;
  color: var(--accent-cyan);
}

.edu-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Footer ---------------------------------------------- */

.footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-prompt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-green);
  text-decoration: none;
}

.footer-eof pre {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- Animations ------------------------------------------ */

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 5px rgba(0, 255, 65, 0.3); }
  50%       { text-shadow: 0 0 20px rgba(0, 255, 65, 0.7); }
}

/* --- Responsive ------------------------------------------ */

@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }

  .hero {
    padding: 5rem 1.25rem 2rem;
  }

  .ascii-art {
    font-size: 0.28rem;
  }

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

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

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

  .job-card {
    padding: 1.25rem 1.25rem;
  }

  .job-title-row {
    flex-direction: column;
    gap: 0.1rem;
  }
}
