/* ---------- Design tokens ---------- */
:root{
  --bg: #08090d;
  --bg-elevated: #0f1117;
  --bg-card: #12141c;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #eef0f5;
  --text-dim: #9aa1b4;
  --text-dimmer: #676f85;
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --radius: 14px;
  --max-width: 1120px;
  --shadow-glow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px -20px rgba(124,92,255,0.25);
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1, h2, h3{ margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
p{ margin: 0; }
img, svg{ display: block; max-width: 100%; }

.text-gradient{
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* subtle background grid */
.bg-grid{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(124,92,255,0.14), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(34,211,238,0.10), transparent 40%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  mask-image: linear-gradient(to bottom, black, black 70%, transparent 100%);
}

/* ---------- Layout helpers ---------- */
.section-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section{ padding: 108px 0; }
.section-alt{ background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 15%, rgba(255,255,255,0.015) 85%, transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.kicker{
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 14px;
}

.section-head h2{ font-size: clamp(28px, 4vw, 38px); }
.section-desc{ color: var(--text-dim); max-width: 640px; margin-top: 14px; font-size: 16.5px; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--accent-grad);
  color: #06070a;
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(124,92,255,0.55); }
.btn-ghost{
  background: rgba(255,255,255,0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--accent-2); transform: translateY(-2px); }
.btn-small{ padding: 9px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8,9,13,0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo{ font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.logo-dot{ color: var(--accent-2); }
.nav-links{ display: flex; align-items: center; gap: 30px; font-size: 14.5px; font-weight: 500; }
.nav-links a{ color: var(--text-dim); transition: color .15s ease; }
.nav-links a:hover{ color: var(--text); }
.nav-cta{
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  padding: 8px 18px;
  border-radius: 999px;
}
.nav-cta:hover{ border-color: var(--accent-2); }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span{ display: block; height: 2px; width: 16px; margin: 0 auto; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero{ padding: 120px 24px 80px; max-width: var(--max-width); margin: 0 auto; }
.hero-inner{ max-width: 760px; }
.eyebrow{
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  border: 1px solid rgba(34,211,238,0.3);
  background: rgba(34,211,238,0.06);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-title{ font-size: clamp(34px, 5.4vw, 58px); }
.hero-sub{ margin-top: 22px; font-size: 18px; color: var(--text-dim); max-width: 620px; }
.hero-actions{ display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-links{ display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.hero-links a{ display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-dim); font-weight: 500; }
.hero-links a:hover{ color: var(--text); }

.hero-stats{
  margin-top: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat{ background: var(--bg-elevated); padding: 24px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-num{ font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label{ font-size: 13px; color: var(--text-dim); }

/* ---------- About ---------- */
.about-grid{ display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.about-body p{ color: var(--text-dim); font-size: 16.5px; margin-bottom: 18px; }
.facts{ margin-top: 30px; display: grid; gap: 14px; }
.facts li{
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  font-size: 14.5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.facts li span{ color: var(--text-dimmer); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; padding-top: 2px; }

/* ---------- Skills ---------- */
.skills-grid{ margin-top: 44px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .2s ease, transform .2s ease;
}
.skill-card:hover{ border-color: var(--border-strong); transform: translateY(-3px); }
.skill-card h3{ font-size: 17px; margin-bottom: 16px; }
.tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.tags span{
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Projects ---------- */
.projects{ margin-top: 48px; display: flex; flex-direction: column; gap: 24px; }
.project{
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.project:hover{ border-color: var(--border-strong); box-shadow: var(--shadow-glow); }
.project-media{
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(124,92,255,0.16), rgba(34,211,238,0.08));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.project-glyph{ font-size: 46px; }
.project-tag{ font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px; }
.project h3{ font-size: 22px; margin-bottom: 12px; }
.project-desc{ color: var(--text-dim); font-size: 15.5px; margin-bottom: 18px; }
.project-points{ display: grid; gap: 9px; margin-bottom: 22px; }
.project-points li{
  font-size: 14.5px;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}
.project-points li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-grad);
}
.project-tags{ margin-bottom: 22px; }
.project-links{ display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Pricing ---------- */
.pricing-grid{ margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pricing-card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
}
.pricing-card:hover{ border-color: var(--border-strong); transform: translateY(-3px); }
.pricing-card-featured{ border-color: var(--accent-2); box-shadow: var(--shadow-glow); }
.pricing-badge{
  align-self: flex-start;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.3);
  padding: 4px 10px;
  border-radius: 999px;
}
.pricing-card h3{ font-size: 19px; margin-top: 4px; }
.pricing-desc{ color: var(--text-dim); font-size: 14.5px; flex-grow: 1; }
.pricing-amount{
  font-size: 26px; font-weight: 700; color: var(--text-dimmer);
  letter-spacing: .04em;
}
.pricing-cta{ align-self: flex-start; }

/* ---------- Process ---------- */
.process-grid{ margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step{ padding: 4px; }
.process-num{
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-2);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.process-step h3{ font-size: 17px; margin-bottom: 10px; }
.process-step p{ font-size: 14.5px; color: var(--text-dim); }

/* ---------- Contact ---------- */
.contact-inner{ max-width: var(--max-width); }
.contact-grid{ margin-top: 44px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.contact-info h2{ font-size: clamp(28px, 4.5vw, 40px); margin-top: 4px; }
.contact-info .section-desc{ margin-top: 16px; }
.contact-actions{ margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.contact-actions .btn{ justify-content: flex-start; }
.contact-note{ margin-top: 32px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim); }

.contact-form-wrap{
  background: rgba(18,20,28,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.contact-form-wrap::before{
  content:"";
  position:absolute;
  top:-40%; left:-20%;
  width: 70%; height: 180%;
  background: radial-gradient(circle, rgba(124,92,255,0.14), transparent 65%);
  pointer-events:none;
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field{ margin-bottom: 20px; position: relative; }
.field label{
  display:block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dimmer); margin-bottom: 9px;
}
.field input, .field select, .field textarea{
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field select{ appearance: none; -webkit-appearance:none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%239aa1b4'/></svg>"); background-repeat:no-repeat; background-position: right 14px center; padding-right: 34px; }
.field select option{ background: var(--bg-card); color: var(--text); }
.field textarea{ min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--accent-2);
  background: rgba(34,211,238,0.04);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12), 0 0 20px -6px rgba(34,211,238,0.4);
}
.field-error{
  display:none; margin-top: 7px; font-size: 12.5px; color: #ff6b7a;
}
.field.has-error input, .field.has-error select, .field.has-error textarea{ border-color: #ff6b7a; }
.field.has-error .field-error{ display:block; }
.field-hp{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.form-submit{ display:flex; align-items:center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-status{ font-size: 13.5px; color: var(--text-dim); }
.form-status.is-success{ color: #34e6a8; }
.form-status.is-error{ color: #ff6b7a; }
.btn[disabled]{ opacity: .6; cursor: progress; pointer-events: none; }

/* ---------- Footer ---------- */
.footer{ border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-dimmer); }

/* ---------- Reveal animation ---------- */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* =====================================================
   FUTURISTIC / CYBER LAYER
   ===================================================== */

/* ---------- Particle network canvas + cursor glow + scanlines ---------- */
#particles-canvas{
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  opacity: .55;
}
#cursor-glow{
  position: fixed;
  top: 0; left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.16), rgba(34,211,238,0.05) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transition: opacity .3s ease;
}
.scanlines{
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: .5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 2px,
    transparent 3px
  );
}
.scan-sweep{
  position: fixed;
  left: 0; right: 0;
  height: 140px;
  top: -140px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(34,211,238,0.05), transparent);
  animation: scan-sweep-move 9s linear infinite;
}
@keyframes scan-sweep-move{
  0%{ transform: translateY(0); }
  100%{ transform: translateY(calc(100vh + 140px)); }
}

/* ---------- HUD corner brackets ---------- */
.hud-corners{ position: relative; }
.hud-corners::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .25s ease;
  background:
    linear-gradient(var(--accent-2), var(--accent-2)) top left / 16px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top left / 2px 16px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top right / 16px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top right / 2px 16px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom right / 2px 16px no-repeat;
}
.hud-corners:hover::after{ opacity: .95; }
.hud-corners.always-on::after{ opacity: .55; }

/* ---------- Status pill (available badge) ---------- */
.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
}
.status-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: #34e6a8;
  box-shadow: 0 0 0 0 rgba(52,230,168,0.6);
  animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,230,168,0.55); }
  70%{ box-shadow: 0 0 0 7px rgba(52,230,168,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,230,168,0); }
}

/* ---------- Terminal typing line ---------- */
.terminal-line{
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--accent-2);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}
.terminal-prompt{ color: var(--text-dimmer); }
.cursor-blink{
  display: inline-block;
  width: 8px;
  color: var(--accent-2);
  animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink{ 0%,100%{ opacity: 1; } 50%{ opacity: 0; } }

/* ---------- Animated gradient border accents ---------- */
.hero-stats{ position: relative; }
.hero-title .text-gradient{
  background-size: 200% 100%;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift{
  0%, 100%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
}

.btn-primary{ position: relative; overflow: hidden; }
.btn-primary::after{
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.btn-primary:hover::after{ left: 130%; }

/* subtle glow lift on logo */
.logo{ text-shadow: 0 0 18px rgba(124,92,255,0.35); }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  #particles-canvas, .scan-sweep, .status-dot, .cursor-blink, .hero-title .text-gradient{ animation: none !important; }
  #cursor-glow{ display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .about-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: 1fr; }
  .process-grid{ grid-template-columns: repeat(2, 1fr); }
  .pricing-grid{ grid-template-columns: 1fr; }
  .hero-stats{ grid-template-columns: repeat(2, 1fr); }
  .project{ grid-template-columns: 1fr; }
  .project-media{ min-height: 90px; }
  .contact-grid{ grid-template-columns: 1fr; gap: 36px; }
  .form-row{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .nav-links{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 26px;
    gap: 18px;
    display: none;
  }
  .nav-links.open{ display: flex; }
  .nav-toggle{ display: flex; }
  .hero{ padding-top: 64px; }
  .section{ padding: 72px 0; }
  #cursor-glow{ display: none; }
}

@media (max-width: 520px){
  .process-grid{ grid-template-columns: 1fr; }
  .hero-stats{ grid-template-columns: 1fr; }
  .facts li{ grid-template-columns: 1fr; gap: 4px; }
  .contact-form-wrap{ padding: 26px; }
}
