@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
  --bg:           #07090d;
  --surface:      #0d1117;
  --card:         #111822;
  --card-hover:   #141f2e;
  --border:       #1c2840;
  --border-hi:    #2a4060;
  --green:        #00ff88;
  --green-dim:    rgba(0,255,136,0.12);
  --green-glow:   rgba(0,255,136,0.25);
  --blue:         #00aaff;
  --blue-dim:     rgba(0,170,255,0.12);
  --amber:        #f5a623;
  --text:         #c9d8e8;
  --text-muted:   #4a6080;
  --text-bright:  #e8f4f8;
  --font:         'JetBrains Mono', monospace;
  --nav-h:        60px;
  --max-w:        1140px;
  --r:            6px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── BG LAYERS ── */
#matrix {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.028;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.025) 2px, rgba(0,0,0,0.025) 4px
  );
  pointer-events: none;
  z-index: 1;
}

nav, section, footer, main { position: relative; z-index: 2; }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(7,9,13,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--green); }

.nav-available {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.5; box-shadow: 0 0 12px var(--green); }
}

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

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 40px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-content { max-width: 760px; }

.hero-prompt {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

@keyframes glitch {
  0%, 94%, 100% { clip-path: none; transform: none; color: var(--text-bright); }
  95% { clip-path: polygon(0 18%, 100% 18%, 100% 38%, 0 38%); transform: translate(-4px, 0); color: var(--blue); }
  96% { clip-path: polygon(0 58%, 100% 58%, 100% 78%, 0 78%); transform: translate(4px, 0); color: var(--green); }
  97% { clip-path: polygon(0 33%, 100% 33%, 100% 52%, 0 52%); transform: translate(-2px, 0); }
  98% { clip-path: none; transform: translate(2px, 0); }
  99% { clip-path: none; transform: none; }
}

.hero-name.glitch { animation: glitch 7s infinite; }

.hero-role {
  margin-top: 18px;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--green);
  display: flex; align-items: center; gap: 2px;
  min-height: 1.6em;
}

.cursor {
  display: inline-block;
  color: var(--green);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-summary {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.85;
  max-width: 640px;
}

.hero-meta {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 0.78rem; color: var(--text-muted);
}
.hero-meta span::before { content: '▸ '; color: var(--green); }

.hero-cta {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 10px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border: 1px solid; border-radius: var(--r);
  text-decoration: none;
  font-family: var(--font); font-size: 0.8rem;
  transition: all 0.22s; cursor: pointer;
  letter-spacing: 0.04em;
}
.btn-filled   { border-color: var(--green); background: var(--green); color: var(--bg); font-weight: 700; }
.btn-filled:hover   { background: #00e87a; border-color: #00e87a; box-shadow: 0 0 24px var(--green-glow); }
.btn-primary  { border-color: var(--green); color: var(--green); background: transparent; }
.btn-primary:hover  { background: var(--green-dim); box-shadow: 0 0 20px var(--green-glow); }
.btn-secondary { border-color: var(--border-hi); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

/* ── STATS ── */
.hero-stats {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  max-width: 580px;
}

.stat {
  background: var(--card);
  padding: 18px 16px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--border); }

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: 0.04em;
}

/* ── SECTION ── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 40px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 44px;
  position: relative;
  padding-bottom: 14px;
}
.section-title::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── SKILLS ── */
#skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--border-hi); }

.skill-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }

.skill-tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text);
  transition: all 0.2s; cursor: default;
}
.skill-tag:hover { border-color: var(--green); color: var(--green); background: var(--green-dim); }

/* ── FILTER TABS ── */
.filter-tabs {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 28px;
}

.filter-tab {
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--text-muted);
  font-family: var(--font); font-size: 0.72rem;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.05em;
}
.filter-tab:hover { color: var(--text); border-color: var(--border-hi); }
.filter-tab.active { border-color: var(--green); color: var(--green); background: var(--green-dim); }

/* ── PROJECT GRID ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  display: flex; flex-direction: column; gap: 11px;
  position: relative; overflow: hidden;
  transition: transform 0.24s, border-color 0.24s, box-shadow 0.24s;
}

.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0; transition: opacity 0.24s;
}

.project-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.45);
}
.project-card:hover::before { opacity: 1; }

.project-card.highlight { border-color: rgba(0,255,136,0.25); }
.project-card.highlight::before { opacity: 1; }

.project-card.hidden { display: none; }

.project-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.project-category { font-size: 0.68rem; color: var(--blue); letter-spacing: 0.06em; text-transform: uppercase; }
.project-date     { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.project-title    { font-size: 0.92rem; font-weight: 700; color: var(--text-bright); line-height: 1.35; }
.project-desc     { font-size: 0.8rem; color: var(--text); line-height: 1.7; flex: 1; }

.project-tech {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: auto;
}
.tech-tag {
  font-size: 0.68rem; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: 3px;
  color: var(--green);
}

.project-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.73rem; color: var(--text-muted);
  text-decoration: none; transition: color 0.2s; margin-top: 2px;
}
.project-link:hover { color: var(--green); }

.projects-all {
  text-align: center;
  margin-top: 32px;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom, var(--green) 0%, var(--border) 60%, transparent 100%);
}

.timeline-item {
  position: relative; margin-bottom: 44px; padding-left: 24px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute; left: -34px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--green); background: var(--bg);
  box-shadow: 0 0 8px rgba(0,255,136,0.3);
}

.timeline-role    { font-size: 0.95rem; font-weight: 700; color: var(--text-bright); }
.timeline-company { font-size: 0.82rem; color: var(--blue); margin-top: 3px; }
.timeline-date    { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 14px; }

.timeline-bullets { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.timeline-bullets li {
  font-size: 0.8rem; color: var(--text);
  padding-left: 16px; position: relative; line-height: 1.65;
}
.timeline-bullets li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--green); font-size: 0.68rem; top: 2px;
}

.timeline-github {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text-muted);
  text-decoration: none; margin-top: 12px; transition: color 0.2s;
}
.timeline-github:hover { color: var(--green); }

/* ── EDUCATION ── */
#education-list { display: flex; flex-direction: column; gap: 14px; }

.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--border-hi); }

.edu-degree { font-size: 0.88rem; font-weight: 700; color: var(--text-bright); }
.edu-school { font-size: 0.8rem; color: var(--blue); margin-top: 4px; }
.edu-date   { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.edu-note   { font-size: 0.76rem; color: var(--green); margin-top: 6px; }
.edu-note::before { content: '▸ '; }

.award-card {
  background: linear-gradient(135deg, rgba(245,166,35,0.07) 0%, transparent 60%);
  border: 1px solid rgba(245,166,35,0.28);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: flex-start;
}
.award-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-size: 0.9rem; font-weight: 700;
}
.award-title  { font-size: 0.88rem; font-weight: 700; color: var(--amber); }
.award-detail { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; line-height: 1.6; }

/* ── CONTACT ── */
#contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 860px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 26px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 7px;
  transition: all 0.22s;
}
.contact-card:hover {
  border-color: var(--green);
  background: var(--card-hover);
  transform: translateY(-2px);
}
.contact-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-value { font-size: 0.85rem; color: var(--text-bright); overflow-wrap: break-word; word-break: break-all; }
.contact-card:hover .contact-value { color: var(--green); }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
  position: relative; z-index: 2;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: none; }
  .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  #nav { padding: 0 20px; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 20px; gap: 14px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-available { display: none; }
  #hero { padding: calc(var(--nav-h) + 32px) 20px 60px; }
  .section { padding: 60px 20px; }
  .project-grid { grid-template-columns: 1fr; }
  #skills-grid { grid-template-columns: 1fr; }
  .hero-stats { max-width: 100%; }
}
