@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg: #080c09;
  --bg2: #0d1410;
  --bg3: #111a13;
  --green: #00e676;
  --green-dim: #00b85a;
  --green-pale: #e8fff0;
  --cyan: #00e5ff;
  --border: #1c2e1e;
  --border2: #243628;
  --text: #d4f0d8;
  --text-dim: #6b9b72;
  --text-muted: #3d5c42;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --radius: 6px;
  --max: 1100px;
}

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

html { scroll-behavior: smooth; }

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

#bg-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: .055;
}

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: .9rem 2rem;
  background: rgba(8,12,9,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 2.5rem;
}
.nav-logo {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: var(--green); text-decoration: none; letter-spacing: .1em;
}
.blink { animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 1.8rem; list-style: none; margin-left: auto; }
.nav-links a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--text-dim); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--green); }

.nav-cta {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--bg); background: var(--green);
  padding: .4rem 1rem; border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
  transition: background .2s;
}
.nav-cta:hover { background: var(--green-dim); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 4rem;
  padding: 8rem 2rem 4rem;
  max-width: var(--max); margin: 0 auto;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--green-dim); border: 1px solid var(--border2);
  background: var(--bg3); padding: .35rem .8rem;
  border-radius: 100px; margin-bottom: 1.5rem;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,230,118,.4); }
  50% { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}
.hero-name {
  font-family: var(--mono); font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.05;
  color: #fff; margin-bottom: .8rem;
  letter-spacing: -.02em;
}
.hero-title {
  font-size: 1.05rem; color: var(--green); font-weight: 400;
  font-family: var(--mono); letter-spacing: .03em; margin-bottom: .5rem;
}
.sep { color: var(--text-muted); margin: 0 .4rem; }
.hero-sub { font-size: .88rem; color: var(--text-dim); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.btn-primary {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  background: var(--green); color: var(--bg);
  padding: .7rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 700;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--green-dim); transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  color: var(--text-dim); border: 1px solid var(--border2);
  padding: .7rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--green); border-color: var(--green); }

.hero-scroll {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .15em;
  color: var(--text-muted); text-transform: uppercase;
  animation: fadeup 1s 1.5s both;
}
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

/* Terminal widget */
.hero-terminal {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; overflow: hidden;
  font-family: var(--mono);
  animation: fadeup .8s .4s both;
}
.term-bar {
  background: var(--bg2); padding: .65rem 1rem;
  display: flex; align-items: center; gap: .45rem;
  border-bottom: 1px solid var(--border);
}
.tb { width: 11px; height: 11px; border-radius: 50%; }
.tb.r { background: #ff5f57; }
.tb.y { background: #febc2e; }
.tb.g { background: #28c840; }
.term-title { font-size: .7rem; color: var(--text-muted); margin: 0 auto; }
.term-body { padding: 1.2rem 1.5rem; min-height: 220px; font-size: .78rem; line-height: 2; }
.tl { color: var(--text-dim); }
.tl .prompt { color: var(--green); }
.tl .cmd { color: #fff; }
.tl .out { color: var(--green-dim); }
.tl .out.c { color: var(--cyan); }
.tl .cursor { display: inline-block; width: 8px; height: .9em; background: var(--green); vertical-align: text-bottom; animation: blink .9s step-end infinite; }

/* ── CONTAINER ── */
.container { max-width: var(--max); margin: 0 auto; padding: 6rem 2rem; position: relative; z-index: 1; }

.section-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .18em;
  color: var(--green); text-transform: uppercase; margin-bottom: 1.5rem;
}

h2 {
  font-family: var(--mono); font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700; line-height: 1.15; color: #fff;
  margin-bottom: 2.5rem; letter-spacing: -.02em;
}

/* ── ABOUT ── */
#about { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 1rem; font-size: .95rem; }
.about-text strong { color: var(--green); font-weight: 500; }
.about-text h2 { margin-bottom: 1.5rem; }

.about-langs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2rem; }
.about-langs span {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  border: 1px solid var(--border2); color: var(--text-dim);
  padding: .25rem .7rem; border-radius: var(--radius);
}

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
}
.stat-card.accent { border-color: var(--green); background: rgba(0,230,118,.04); }
.stat-num { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; color: var(--green); }
.stat-lbl { font-size: .75rem; color: var(--text-muted); font-family: var(--mono); letter-spacing: .08em; margin-top: .25rem; }

/* ── PROJECTS ── */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; }
.section-header h2 { margin-bottom: 0; }

.filter-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  background: transparent; border: 1px solid var(--border2);
  color: var(--text-dim); padding: .3rem .75rem; border-radius: var(--radius);
  cursor: pointer; transition: all .2s;
}
.filter:hover { border-color: var(--green-dim); color: var(--green); }
.filter.active { background: var(--green); color: var(--bg); border-color: var(--green); }

.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.project-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s, transform .2s;
  position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
}
.project-card.fullstack::before { background: var(--green); }
.project-card.security::before { background: var(--cyan); }
.project-card.web::before { background: #b46eff; }
.project-card.industrial::before { background: #ff9d3a; }
.project-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.project-card.hidden { display: none; }

.pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pc-tag {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  padding: .2rem .55rem; border-radius: var(--radius);
}
.pc-tag.fullstack { background: rgba(0,230,118,.1); color: var(--green); border: 1px solid rgba(0,230,118,.3); }
.pc-tag.security  { background: rgba(0,229,255,.1); color: var(--cyan);  border: 1px solid rgba(0,229,255,.3); }
.pc-tag.web       { background: rgba(180,110,255,.1); color: #b46eff; border: 1px solid rgba(180,110,255,.3); }
.pc-tag.industrial{ background: rgba(255,157,58,.1); color: #ff9d3a; border: 1px solid rgba(255,157,58,.3); }

.pc-links { display: flex; gap: .5rem; }
.pc-link { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.pc-link:hover { color: var(--green); }

.pc-title { font-family: var(--mono); font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .6rem; line-height: 1.3; }
.pc-desc { font-size: .82rem; color: var(--text-dim); line-height: 1.65; margin-bottom: .8rem; }

.pc-highlight {
  font-family: var(--mono); font-size: .68rem; color: var(--green-dim);
  background: rgba(0,230,118,.06); border: 1px solid rgba(0,230,118,.15);
  padding: .35rem .65rem; border-radius: var(--radius); margin-bottom: .9rem;
}
.hl-icon { margin-right: .35rem; }

.pc-tech { display: flex; flex-wrap: wrap; gap: .35rem; }
.pc-tech span {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .05em;
  color: var(--text-muted); background: var(--bg2);
  border: 1px solid var(--border); padding: .15rem .45rem; border-radius: 3px;
}

/* ── TIMELINE ── */
#experience { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.timeline { border-left: 1px solid var(--border2); padding-left: 2rem; }
.tl-item { position: relative; padding-bottom: 2.5rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -2.4rem; top: .4rem;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--border2); background: var(--bg2);
  transition: border-color .2s;
}
.tl-item.current .tl-dot { border-color: var(--green); background: var(--green); }

.tl-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem;
}
.tl-role { font-family: var(--mono); font-size: .92rem; font-weight: 700; color: #fff; }
.tl-company { font-size: .82rem; color: var(--green); margin-top: .15rem; }
.tl-loc { color: var(--text-muted); }
.tl-period { font-family: var(--mono); font-size: .7rem; color: var(--text-muted); text-align: right; }
.tl-current-badge {
  display: block; font-size: .62rem; letter-spacing: .1em;
  background: rgba(0,230,118,.15); color: var(--green);
  border: 1px solid rgba(0,230,118,.3); padding: .15rem .5rem;
  border-radius: 100px; margin-bottom: .3rem; text-align: center;
}
.tl-bullets { list-style: none; padding: 0; }
.tl-bullets li {
  font-size: .83rem; color: var(--text-dim); line-height: 1.65;
  padding-left: 1.1rem; position: relative; margin-bottom: .2rem;
}
.tl-bullets li::before { content: '—'; position: absolute; left: 0; color: var(--text-muted); }

/* ── SKILLS ── */
.skills-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.skill-group { }
.sg-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--green); text-transform: uppercase; margin-bottom: .75rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}
.sg-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.sg-tags span {
  font-family: var(--mono); font-size: .7rem;
  color: var(--text-dim); background: var(--bg3);
  border: 1px solid var(--border); padding: .3rem .65rem;
  border-radius: var(--radius); transition: border-color .2s, color .2s;
}
.sg-tags span:hover { border-color: var(--green); color: var(--green); }

/* ── CONTACT ── */
#contact { border-top: 1px solid var(--border); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-text h2 { margin-bottom: 1rem; }
.contact-text p { color: var(--text-dim); margin-bottom: 2rem; font-size: .95rem; }
.contact-links { display: flex; flex-direction: column; gap: .6rem; }
.contact-links a {
  font-family: var(--mono); font-size: .8rem; color: var(--cyan);
  text-decoration: none; transition: color .2s;
}
.contact-links a:hover { color: var(--green); }

.contact-box {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); overflow: hidden;
}
.cb-line {
  display: flex; justify-content: space-between;
  padding: .7rem 1.2rem; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .78rem;
}
.cb-line:last-child { border-bottom: none; }
.cb-k { color: var(--text-muted); }
.cb-v { color: #fff; }
.cb-green { color: var(--green); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
footer .container {
  padding-top: 1.5rem; padding-bottom: 1.5rem;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: .7rem; color: var(--text-muted);
}

/* ── SCROLL ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  #hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 6rem; }
  .hero-terminal { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  h2 { font-size: 1.8rem; }
}
