:root {
  --bg: #080b10;
  --bg2: #0d1117;
  --surface: #111820;
  --card: #131c26;
  --border: #1e2d3d;
  --border2: #243447;
  --accent: #38bdf8;
  --accent-dim: rgba(56,189,248,0.15);
  --accent2: #f97316;
  --accent2-dim: rgba(249,115,22,0.12);
  --green: #34d399;
  --green-dim: rgba(52,211,153,0.12);
  --text: #cdd9e5;
  --text2: #8ba3bc;
  --muted: #4a6278;
  --white: #e6edf3;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* GRID BG */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Oxanium', monospace;
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 40px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 4px;
  padding: 6px 14px;
  margin-bottom: 32px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 2px;
  animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

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

.hero h1 {
  font-family: 'Oxanium', monospace;
  font-weight: 800;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 8px;
  animation: fadeUp 0.6s ease 0.1s both;
}

.hero h1 .accent { color: var(--accent); }
.hero h1 .dim { color: var(--muted); font-weight: 300; }

.hero-title {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--accent2);
  letter-spacing: 2px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease 0.15s both;
}

.hero-desc {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s ease 0.2s both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.25s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 4px;
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,189,248,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid rgba(56,189,248,0.3);
  font-family: 'Oxanium', monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.hero-stats {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeUp 0.6s ease 0.3s both;
}

@media (max-width: 900px) {
  .hero-stats { display: none; }
  .hero { padding: 100px 24px 60px; }
  nav { padding: 0 24px; }
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  text-align: center;
  min-width: 120px;
  transition: border-color 0.2s;
}

.stat-box:hover { border-color: var(--accent); }

.stat-num {
  font-family: 'Oxanium', monospace;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 4px;
  text-transform: uppercase;
}

/* SECTIONS */
section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
}

@media (max-width: 600px) {
  section { padding: 60px 24px; }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border2), transparent);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.skill-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.skill-card:hover::before { transform: scaleX(1); }

.skill-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.skill-name {
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  margin-bottom: 8px;
}

.skill-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
}

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

.skill-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(56,189,248,0.08);
  transform: translateY(-4px);
}

.project-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-icon { font-size: 28px; }

.project-status {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-done { background: var(--green-dim); color: var(--green); border: 1px solid rgba(52,211,153,0.25); }
.status-wip { background: var(--accent2-dim); color: var(--accent2); border: 1px solid rgba(249,115,22,0.25); }
.status-planned { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(56,189,248,0.25); }

.project-body { padding: 16px 24px 20px; }

.project-name {
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--white);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,0.2);
}

/* CERTS */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.cert-card:hover { border-color: var(--border2); transform: translateX(4px); }

.cert-logo {
  font-size: 32px;
  flex-shrink: 0;
}

.cert-info { flex: 1; }

.cert-name {
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 3px;
}

.cert-org {
  font-size: 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

.cert-badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-done { background: var(--green-dim); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }
.badge-wip { background: var(--accent2-dim); color: var(--accent2); border: 1px solid rgba(249,115,22,0.2); }
.badge-next { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* EXPERIENCE TIMELINE */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--border), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  animation: fadeUp 0.5s ease both;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(56,189,248,0.5);
}

.timeline-period {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-role {
  font-family: 'Oxanium', monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 12px;
  font-family: 'DM Mono', monospace;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all 0.2s;
  color: var(--text);
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.contact-icon { font-size: 24px; }

.contact-info .clabel {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-info .cvalue {
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
}

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}

footer span { color: var(--accent); }

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 40px;
  position: relative;
  z-index: 1;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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