:root {
  --bg:        #0d0f14;
  --surface:   #13161e;
  --surface2:  #1a1e2a;
  --border:    rgba(255,255,255,0.07);
  --purple:    #8b5cf6;
  --purple-lt: #a78bfa;
  --blue:      #3b82f6;
  --blue-lt:   #60a5fa;
  --teal:      #2dd4bf;
  --green:     #1F5E0C;
  --brown:     #434312;
  --newgreen:  #39541E;
  --yellow:    #fbbf24;
  --red:       #f87171;
  --muted:     #64748b;
  --body:      #94a3b8;
  --bright:    #e2e8f0;
  --white:     #f8fafc;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Syne', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Include this in each HTML <head>:
   <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;0,700;1,300&family=Syne:wght@400;600;700;800&display=swap" rel="stylesheet">
*/

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,15,20,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-logo span { color: var(--green); }

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

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--purple-lt); background: rgba(139,92,246,0.08); }

.nav-links a.active {
  color: var(--newgreen);
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
}

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover {
  background: var(--newgreen);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.35);
}

.btn-secondary { background: transparent; color: var(--bright); border: 1px solid var(--border); }
.btn-secondary:hover {
  border-color: var(--green);
  color: var(--newgreen);
  transform: translateY(-1px);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.glow-1 { width: 500px; height: 500px; background: rgba(139,92,246,0.07); top: -150px; left: -100px; }
.glow-2 { width: 400px; height: 400px; background: rgba(59,130,246,0.05); bottom: 0; right: 10%; }
.glow-3 { width: 300px; height: 300px; background: rgba(45,212,191,0.04); top: 30%; right: -50px; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.section { padding: 6rem 5vw; }
.section-alt { background: var(--surface); }

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--purple);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before { content: '//'; color: var(--muted); }

.section-title {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--body);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

.tag {
  display: inline;
  font-family: var(--mono);
  font-size: 0.78rem;
  background: rgba(45,212,191,0.1);
  color: var(--teal);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.tag.purple { background: rgba(139,92,246,0.1); color: var(--newgreen); }
.tag.yellow { background: rgba(251,191,36,0.1);  color: var(--yellow); }
.tag.blue   { background: rgba(59,130,246,0.1);  color: var(--blue-lt); }
.tag.green  { background: rgba(74,222,128,0.1);  color: var(--green); }
.tag.red    { background: rgba(248,113,113,0.1); color: var(--red); }

.skill-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--body);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}
.skill-pill:hover { border-color: var(--green); color: var(--newgreen); }
.skill-pill.hot   { border-color: var(--brown); color: var(--newgreen); }

/* ─── FOOTER ─── */
footer {
  padding: 1.5rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.footer-left { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.footer-left span { color: var(--green); }

.footer-right { display: flex; gap: 1.5rem; }
.footer-right a {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--newgreen); }

/* ─── TRAIL STRIP ─── */
.trail-strip {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 5vw;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
}

.trail-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.trail-items { display: flex; gap: 2rem; overflow: hidden; }

.trail-item {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--body);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trail-item .dot { color: var(--green); }

.live-card-desc { font-family: var(--mono); font-size: 0.72rem; color: var(--teal); margin-top: 0.5rem; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes glitch {
  0%   { clip-path: inset(0 0 95% 0); transform: translate(-4px, 0); }
  10%  { clip-path: inset(30% 0 50% 0); transform: translate(4px, 0); }
  20%  { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 0); }
  30%  { clip-path: inset(10% 0 80% 0); transform: translate(3px, 0); }
  40%  { clip-path: inset(50% 0 30% 0); transform: translate(-4px, 0); }
  50%  { clip-path: inset(0 0 0 0);      transform: translate(0, 0); }
  100% { clip-path: inset(0 0 0 0);      transform: translate(0, 0); }
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(139,92,246,0.1);
}

.term-bar {
  background: var(--surface2);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }

.term-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 auto;
  letter-spacing: 0.05em;
}

.term-body {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
}

.term-line   { display: flex; gap: 0.5rem; margin-bottom: 0.1rem; }
.term-prompt { color: var(--green); flex-shrink: 0; }
.term-cmd    { color: var(--bright); }
.term-out    { color: var(--body); padding-left: 1.2rem; }
.term-key    { color: var(--teal); }
.term-val    { color: var(--green); }
.term-comment { color: var(--muted); font-style: italic; }
.term-highlight { color: var(--yellow); }
.term-cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ─── WORK EXPERIENCE PAGE ─── */

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 5vw 4rem;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  text-align: center;
  z-index: 2;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--purple);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-label::before { content: '//'; color: var(--muted); margin-right: 0.6rem; }

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--body);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-highlight {
  font-family: var(--mono);
  color: var(--teal);
  background: rgba(45,212,191,0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

/* Code Projects Section */
.code-section {
  padding: 6rem 5vw;
  background: var(--surface);
  position: relative;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1400px;
}

.code-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.code-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  opacity: 0;
  transition: opacity 0.3s;
}

.code-card:hover {
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(139,92,246,0.15);
}

.code-card:hover::before {
  opacity: 1;
}

.code-card h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.code-card p {
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--body);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.tech-tag:hover {
  border-color: var(--green);
  color: var(--newgreen);
}

/* Timeline Section */
.timeline-section {
  padding: 6rem 5vw;
  position: relative;
}

.timeline-header {
  max-width: 900px;
  margin: 0 auto 4rem;
  text-align: center;
}

.timeline-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Timeline Track */
.timeline-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--purple), var(--teal));
  transform: translateX(-50%);
  transition: height 0.1s linear;
}

/* Job Cards */
.job {
  position: relative;
  margin-bottom: 6rem;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.job-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
}

.job:nth-child(even) .job-wrapper {
  direction: rtl;
}

.job:nth-child(even) .job-content,
.job:nth-child(even) .job-visual {
  direction: ltr;
}

.job-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.job-content:hover {
  border-color: var(--purple);
  box-shadow: 0 16px 48px rgba(139,92,246,0.12);
}

.job-year {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--teal);
  background: rgba(45,212,191,0.1);
  border: 1px solid rgba(45,212,191,0.2);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}

.company-name {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.job-title {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--purple-lt);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.job-description {
  color: var(--body);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.job-highlights {
  list-style: none;
  margin-top: 1.5rem;
}

.job-highlights li {
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  position: relative;
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.6;
}

.job-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--green);
  font-family: var(--mono);
}

.job-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--green);
  border: 3px solid var(--bg);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 0 4px var(--surface2);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .job-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .job:nth-child(even) .job-wrapper {
    direction: ltr;
  }

  .timeline-track,
  .timeline-progress {
    left: 2rem;
  }

  .timeline-dot {
    left: 2rem;
  }

  .terminal {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .section { padding: 4rem 5vw; }
}

@media (max-width: 768px) {
  nav { padding: 0.85rem 1rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.3rem 0.5rem; font-size: 0.65rem; }
  .trail-items { gap: 1rem; }
  .footer-right { gap: 1rem; flex-wrap: wrap; }

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

  .job {
    margin-bottom: 4rem;
  }

  .job-content {
    padding: 2rem;
  }
}