:root {
  --bg: #080c10;
  --bg2: #0d1117;
  --bg3: #111820;
  --border: rgba(0,255,160,0.12);
  --accent: #00ffa0;
  --accent2: #00c8ff;
  --text: #e8edf2;
  --muted: #6b7a8d;
  --card: rgba(255,255,255,0.03);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 999; opacity: .5;
}

/* ── GRID BACKGROUND ── */
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,255,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,160,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── GLOW ORBS ── */
.orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(100px); opacity: .15;
}
.orb-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--accent2); bottom: 200px; left: -100px; }

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

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 13px; color: var(--accent); letter-spacing: .08em;
}

.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--muted); text-decoration: none; letter-spacing: .08em;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--bg); background: var(--accent);
  padding: 8px 20px; border-radius: 2px; text-decoration: none;
  letter-spacing: .08em; transition: opacity .2s;
}
.nav-cta:hover { opacity: .85; }

/* ── SECTIONS ── */
section { position: relative; z-index: 1; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 60px 80px;
  max-width: 1200px; margin: 0 auto;
}

.hero-inner { max-width: 860px; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-tag::before {
  content: ''; width: 32px; height: 1px; background: var(--accent);
}

.hero-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.6); }
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

h1 .line-accent { color: var(--accent); display: block; }
h1 .line-dim { color: rgba(232,237,242,0.5); }

.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 580px;
  line-height: 1.7; margin-bottom: 48px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--bg);
  font-family: 'DM Mono', monospace; font-size: 13px;
  font-weight: 500; letter-spacing: .06em;
  padding: 14px 32px; border-radius: 2px;
  text-decoration: none; transition: all .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,255,160,0.25); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text);
  font-family: 'DM Mono', monospace; font-size: 13px;
  letter-spacing: .06em;
  padding: 14px 32px; border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex; gap: 48px; margin-top: 72px;
  padding-top: 40px; border-top: 1px solid var(--border);
}

.stat-num {
  font-family: 'Syne', sans-serif; font-size: 36px;
  font-weight: 800; color: var(--text);
  line-height: 1;
}
.stat-num span { color: var(--accent); }
.stat-label {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
  margin-top: 6px;
}

/* ── SERVICES ── */
#services {
  padding: 120px 60px;
  max-width: 1200px; margin: 0 auto;
}

.section-tag {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.section-tag::after { content: ''; flex: 1; height: 1px; background: var(--border); max-width: 80px; }

h2 {
  font-family: 'Syne', sans-serif; font-size: clamp(32px, 4vw, 52px);
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 64px;
  line-height: 1.1;
}

.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 40px; position: relative;
  overflow: hidden; transition: all .3s;
}

.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,255,160,0.05) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover { border-color: rgba(0,255,160,0.3); transform: translateY(-2px); }

.service-num {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); letter-spacing: .15em; margin-bottom: 20px;
  opacity: .6;
}

.service-title {
  font-family: 'Syne', sans-serif; font-size: 20px;
  font-weight: 700; margin-bottom: 14px;
}

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

.service-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px;
}
.tag {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--accent); letter-spacing: .1em;
  border: 1px solid rgba(0,255,160,0.2);
  padding: 4px 10px; border-radius: 2px;
}

/* ── EXPERIENCE ── */
#experience {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
}

.exp-inner { max-width: 1200px; margin: 0 auto; }

.exp-list { display: flex; flex-direction: column; gap: 0; }

.exp-item {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 60px; padding: 48px 0;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}

.exp-left { padding-right: 40px; border-right: 1px solid var(--border); }

.exp-company {
  font-family: 'Syne', sans-serif; font-size: 18px;
  font-weight: 700; margin-bottom: 6px;
}
.exp-role {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); letter-spacing: .1em; margin-bottom: 12px;
}
.exp-period {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--muted); letter-spacing: .08em;
}

.exp-bullets { list-style: none; }
.exp-bullets li {
  font-size: 14px; color: var(--muted); padding: 7px 0;
  padding-left: 20px; position: relative; line-height: 1.6;
}
.exp-bullets li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-size: 12px;
}

.exp-highlight {
  font-size: 13px; font-family: 'DM Mono', monospace;
  color: var(--accent2); background: rgba(0,200,255,0.06);
  border: 1px solid rgba(0,200,255,0.15);
  padding: 10px 16px; margin-top: 16px; border-radius: 2px;
  letter-spacing: .04em;
}

/* ── STACK ── */
#stack {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.stack-inner { max-width: 1200px; margin: 0 auto; }

.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px; margin-top: 48px;
}

.stack-item {
  border: 1px solid var(--border);
  padding: 24px 20px; text-align: center;
  transition: all .2s; background: var(--card);
}
.stack-item:hover {
  border-color: rgba(0,255,160,0.4);
  background: rgba(0,255,160,0.04);
  transform: translateY(-3px);
}
.stack-name {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--text); letter-spacing: .08em;
}
.stack-cat {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--muted); letter-spacing: .1em;
  text-transform: uppercase; margin-top: 4px;
}

/* ── HOW I WORK ── */
#process {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
  max-width: 1200px; margin: 0 auto;
}

.process-steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-top: 64px;
}

.process-step {
  padding: 40px 32px;
  border: 1px solid var(--border);
  position: relative; background: var(--card);
}

.step-num {
  font-family: 'Syne', sans-serif; font-size: 72px;
  font-weight: 800; color: rgba(0,255,160,0.06);
  line-height: 1; margin-bottom: 20px;
}

.step-title {
  font-family: 'Syne', sans-serif; font-size: 16px;
  font-weight: 700; margin-bottom: 10px;
}

.step-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── CONTACT ── */
#contact {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  text-align: center;
}

.contact-inner { max-width: 640px; margin: 0 auto; }

.contact-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 20px;
}

.contact-title .accent { color: var(--accent); }

.contact-sub {
  font-size: 16px; color: var(--muted); margin-bottom: 48px; line-height: 1.7;
}

.contact-links {
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}

.contact-link {
  display: flex; align-items: center; gap: 16px;
  font-family: 'DM Mono', monospace; font-size: 14px;
  color: var(--text); text-decoration: none;
  padding: 16px 32px; border: 1px solid var(--border);
  border-radius: 2px; width: 100%; max-width: 400px;
  transition: all .2s; background: var(--card);
}
.contact-link:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,255,160,0.04);
}

.contact-link .link-icon { font-size: 18px; }
.contact-link .link-label { flex: 1; text-align: left; }
.contact-link .link-arrow { color: var(--muted); transition: color .2s; }
.contact-link:hover .link-arrow { color: var(--accent); }

/* ── FOOTER ── */
footer {
  padding: 32px 60px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}

.footer-copy {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--muted); letter-spacing: .08em;
}

.footer-status {
  display: flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--accent); letter-spacing: .1em;
}
.footer-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0; transform: translateY(24px);
  animation: fadeUp .7s ease forwards;
}

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

.fade-in:nth-child(1) { animation-delay: .1s; }
.fade-in:nth-child(2) { animation-delay: .2s; }
.fade-in:nth-child(3) { animation-delay: .3s; }
.fade-in:nth-child(4) { animation-delay: .4s; }

/* ── CHAT WIDGET ── */
#chat-trigger {
  position: fixed; bottom: 32px; right: 32px; z-index: 500;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,255,160,0.35);
  transition: all .3s; font-size: 22px;
}
#chat-trigger:hover { transform: scale(1.1); box-shadow: 0 12px 40px rgba(0,255,160,0.5); }
#chat-trigger .trigger-dot {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #ff4d4d; border: 2px solid var(--bg);
  animation: pulse 2s infinite;
}

#chat-window {
  position: fixed; bottom: 100px; right: 32px; z-index: 500;
  width: 380px; height: 540px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(20px) scale(0.95);
  opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: all;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: var(--bg3); border-radius: 4px 4px 0 0;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name {
  font-family: 'Syne', sans-serif; font-size: 14px;
  font-weight: 700; line-height: 1;
}
.chat-header-status {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--accent); letter-spacing: .1em; margin-top: 3px;
  display: flex; align-items: center; gap: 5px;
}
.chat-header-status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
.chat-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 18px; padding: 4px;
  transition: color .2s;
}
.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); }

.msg {
  display: flex; flex-direction: column; gap: 4px;
  animation: msgIn .25s ease forwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.user { align-items: flex-end; }
.msg.bot  { align-items: flex-start; }

.msg-bubble {
  max-width: 85%; padding: 10px 14px;
  font-size: 13px; line-height: 1.55;
  border-radius: 2px;
}
.msg.user .msg-bubble {
  background: var(--accent); color: var(--bg);
  font-weight: 500;
}
.msg.bot .msg-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
}

.msg-time {
  font-family: 'DM Mono', monospace; font-size: 9px;
  color: var(--muted); letter-spacing: .05em;
}

.typing-indicator {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 14px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 2px;
  width: fit-content;
}
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .4;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
  0%, 100% { opacity: .4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.chat-suggestions {
  padding: 0 20px 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.suggestion-btn {
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--accent); letter-spacing: .06em;
  border: 1px solid rgba(0,255,160,0.25);
  background: rgba(0,255,160,0.05);
  padding: 5px 10px; border-radius: 2px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.suggestion-btn:hover {
  background: rgba(0,255,160,0.12);
  border-color: var(--accent);
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end;
}
#chat-input {
  flex: 1; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 2px;
  padding: 10px 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  resize: none; outline: none;
  transition: border-color .2s; line-height: 1.4;
  max-height: 80px;
}
#chat-input::placeholder { color: var(--muted); }
#chat-input:focus { border-color: rgba(0,255,160,0.4); }

#chat-send {
  width: 38px; height: 38px; border-radius: 2px;
  background: var(--accent); border: none;
  color: var(--bg); cursor: pointer;
  font-size: 16px; flex-shrink: 0;
  transition: all .2s; display: flex;
  align-items: center; justify-content: center;
}
#chat-send:hover { opacity: .85; transform: scale(1.05); }
#chat-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }

@media (max-width: 500px) {
  #chat-window { right: 12px; left: 12px; width: auto; bottom: 90px; }
  #chat-trigger { right: 20px; bottom: 20px; }
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  #hero, #services, #experience, #stack, #process, #contact { padding: 80px 24px; }
  .exp-item { grid-template-columns: 1fr; gap: 24px; }
  .exp-left { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 28px; }
  footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px; }
}

@media (max-width: 500px) {
  .process-steps { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 20px; }
}
