:root {
  --bg: #0a0e14;
  --bg-alt: #0f141c;
  --surface: #131a24;
  --border: #1f2937;
  --text: #dbe4ee;
  --text-dim: #8b98a9;
  --accent: #39ff88;
  --accent-2: #5eead4;
  --accent-dim: rgba(57, 255, 136, 0.12);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --maxw: 880px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: var(--accent); color: #05140b; }

a { color: inherit; text-decoration: none; }

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(57,255,136,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,136,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 1px;
}
.cursor { color: var(--accent); animation: blink 1.1s infinite; }
@keyframes blink { 0%,49% {opacity:1;} 50%,100% {opacity:0;} }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.nav-links a {
  color: var(--text-dim);
  transition: color .2s;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
  transition: .25s;
}

/* HERO */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 2rem 1.5rem;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
}
.role {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--accent-2);
  margin-top: 0.6rem;
}
.tagline {
  margin-top: 1.4rem;
  max-width: 620px;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.tagline .accent { color: var(--accent); font-weight: 600; }

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all .2s;
  display: inline-block;
}
.btn-primary {
  background: var(--accent);
  color: #05140b;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 0 24px var(--accent-dim); transform: translateY(-2px); }
.btn-ghost {
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-social {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.25rem;
}
.hero-social a {
  color: var(--text-dim);
  transition: color .2s, transform .2s;
}
.hero-social a:hover { color: var(--accent); transform: translateY(-2px); }

/* SECTIONS */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.section.in-view { opacity: 1; transform: translateY(0); }

.section-label {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-top: 0.5rem;
  margin-bottom: 2.2rem;
  font-weight: 700;
}

.about-text {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 700px;
}

/* SKILLS */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.skill-pill {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  background: var(--surface);
  transition: border-color .2s, color .2s;
}
.skill-pill:hover { border-color: var(--accent); color: var(--accent); }

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.44rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  justify-content: space-between;
}
.timeline-content h3 { font-size: 1.15rem; font-weight: 600; }
.freelance { color: var(--text-dim); font-weight: 400; font-size: 0.95rem; }
.timeline-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.timeline-company {
  color: var(--accent-2);
  font-weight: 500;
  margin-top: 0.2rem;
}
.timeline-stack {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}
.timeline-list {
  margin-top: 0.9rem;
  padding-left: 1.1rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.timeline-list li { margin-bottom: 0.5rem; }

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: transform .2s, border-color .2s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.project-top { margin-bottom: 0.75rem; }
.project-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.project-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.project-card p { color: var(--text-dim); font-size: 0.95rem; }
.project-stack {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.project-stack span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}
.projects-note {
  margin-top: 2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.projects-note a { color: var(--accent); border-bottom: 1px dashed var(--accent); }

/* EDUCATION */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.edu-item {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}
.edu-item h3 { font-size: 1rem; font-weight: 600; }
.edu-sub { color: var(--accent-2); font-size: 0.9rem; margin-top: 0.2rem; }
.edu-school { color: var(--text-dim); font-size: 0.88rem; margin-top: 0.3rem; }
.edu-date { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); display: inline-block; margin-top: 0.4rem; }
.languages { margin-top: 3rem; }

/* CONTACT */
.contact-text {
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 2rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color .2s, transform .2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.contact-value { font-size: 0.95rem; }
.location {
  margin-top: 2rem;
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    height: calc(100vh - 60px);
    width: 70%;
    max-width: 280px;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    gap: 1.75rem;
    padding: 2.5rem 1.5rem;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
}
