/*
  Devoxyme — Dark Futuristic Neon Theme
  - Modern typography, neon accents, animated gradients
  - Responsive grid system and micro-interactions
*/

/* CSS Reset (modern) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }

:root {
  --bg: #0b0f14;
  --bg-panel: #0e141b;
  --text: #e6f1ff;
  --muted: #a2b1c6;
  --neon-blue: #00eaff;
  --neon-pink: #ff00e6;
  --neon-green: #00ff99;
  --accent: linear-gradient(135deg, var(--neon-blue), var(--neon-pink) 60%, var(--neon-green));
  --shadow-neon: 0 0 12px rgba(0, 234, 255, 0.35), 0 0 24px rgba(255, 0, 230, 0.15);
  --radius: 16px;
  --container: 1200px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% -10%, rgba(0,234,255,0.1), transparent 60%),
              radial-gradient(800px 600px at 90% 10%, rgba(255,0,230,0.08), transparent 55%),
              radial-gradient(700px 500px at 50% 120%, rgba(0,255,153,0.07), transparent 60%),
              var(--bg);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; position: relative; }
.section-title { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 2.2rem; letter-spacing: 0.02em; margin-bottom: 28px; }
.section-sub { color: var(--muted); margin-bottom: 28px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none; color: var(--text); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn-primary { background: radial-gradient(70% 120% at 30% 20%, rgba(0,234,255,.15), transparent), var(--bg-panel); border-color: rgba(0,234,255,.35); box-shadow: var(--shadow-neon); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 16px rgba(0,234,255,.45), 0 0 32px rgba(255,0,230,.2); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.05); }

.glow { text-shadow: 0 0 18px rgba(0, 234, 255, 0.45), 0 0 36px rgba(255, 0, 230, 0.25); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; padding: 8px 12px; background: var(--bg-panel); border-radius: 6px; z-index: 1000; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
#heroParticles { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(0.2px) contrast(105%); }
.hero::after { content: ""; position: absolute; inset: -20%; background: radial-gradient(50% 50% at 50% 50%, rgba(0,234,255,0.08), transparent 60%), radial-gradient(50% 50% at 55% 45%, rgba(255,0,230,0.07), transparent 60%); filter: blur(60px); z-index: 0; }
.hero-inner { position: relative; z-index: 1; text-align: center; padding: 0 16px; }
.hero h1 { font-family: 'Orbitron', sans-serif; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin-bottom: 16px; }
.hero p { color: var(--muted); max-width: 720px; margin: 0 auto 24px; }
.hero-scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 0.9rem; opacity: 0.8; }

/* Grid & Cards */
.grid { display: grid; gap: 20px; }
.services-grid { grid-template-columns: repeat(4, 1fr); }
.projects-grid { margin-top: 24px; grid-template-columns: repeat(2, 1fr); }
.lab-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card { position: relative; background: radial-gradient(120% 100% at 0% 0%, rgba(0,234,255,.06), transparent 40%), var(--bg-panel); border-radius: var(--radius); padding: 22px; border: 1px solid rgba(255,255,255,.06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.3), 0 0 20px rgba(0,234,255,.2); border-color: rgba(0,234,255,.28); }
.card .card-accent { position: absolute; inset: 0; border-radius: var(--radius); padding: 1px; background: var(--accent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .2s ease; }
.card:hover .card-accent { opacity: 1; }
.card h3 { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Project highlight */
.project.highlight { border: 1px solid rgba(0,234,255,.35); box-shadow: var(--shadow-neon); padding: 26px; }
.project-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.project-header h3 { margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.badges li { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.cs-row { margin: 12px 0; }
.cs-row h4 { font-size: 1rem; color: var(--neon-blue); margin-bottom: 6px; }

/* Make project action buttons clearer */
.project .btn-ghost { border-color: rgba(0,234,255,.35); white-space: nowrap; padding: 8px 14px; font-size: .95rem; line-height: 1; }
.project .btn-ghost:hover { background: rgba(0,234,255,.08); }

/* Smaller, centered buttons in service cards */
.services .card .btn { padding: 8px 14px; font-size: .95rem; line-height: 1; display: inline-flex; margin: 10px auto 0; }
.services .card { text-align: center; }

/* Client Lab */
.lab-card { background: radial-gradient(120% 120% at 100% 0%, rgba(255,0,230,.07), transparent 40%), var(--bg-panel); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 22px; }
.code-sim { display: grid; grid-template-columns: 160px 1fr auto; gap: 12px; align-items: center; margin-top: 12px; }
.code-sim select, .code-sim input { background: #0c1219; color: var(--text); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; }
.code-sim input::placeholder { color: #6b7c95; }
.code-output { margin-top: 12px; background: #090d12; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 16px; max-height: 300px; overflow: auto; box-shadow: inset 0 0 0 1px rgba(0,234,255,.07); }
.code-output code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace; font-size: .95rem; }

.pipeline { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.pipeline .stage { padding: 10px 14px; border-radius: 12px; background: #0c1219; color: var(--text); border: 1px solid rgba(255,255,255,.12); cursor: pointer; transition: box-shadow .2s, transform .2s, border-color .2s; }
.pipeline .stage:disabled { opacity: .6; cursor: not-allowed; }
.pipeline .stage.active { border-color: rgba(0,255,153,.5); box-shadow: 0 0 0 1px rgba(0,255,153,.3), 0 0 16px rgba(0,255,153,.35); transform: translateY(-1px); }
.pipeline .chev { color: #687a94; }
.pipeline-progress { margin-top: 10px; color: var(--muted); min-height: 1.2em; }

.impact-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 12px; }
.impact-form label { color: var(--muted); font-size: .95rem; }
.impact-form input { background: #0c1219; color: var(--text); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; }
.impact-result { margin-top: 10px; color: var(--text); font-weight: 600; }

/* About timeline */
.timeline { position: relative; margin-top: 14px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--neon-blue), transparent 20%, transparent 80%, var(--neon-pink)); opacity: .35; }
.timeline-item { position: relative; padding-left: 30px; margin: 18px 0; }
.timeline-dot { position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--neon-green); box-shadow: 0 0 12px rgba(0,255,153,.6); }
.timeline-content h4 { font-family: 'Orbitron', sans-serif; margin-bottom: 6px; }
.timeline-content p { color: var(--muted); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.stat { background: var(--bg-panel); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 18px; text-align: center; transform: none; opacity: 1; transition: transform .6s ease, opacity .6s ease; }
.js .stat { transform: translateY(8px); opacity: 0; }
.stat.in, .js .stat.in { transform: translateY(0); opacity: 1; }
.stat-value { font-family: 'Orbitron', sans-serif; font-size: 2rem; text-shadow: 0 0 18px rgba(0,234,255,.35); }
.stat-label { color: var(--muted); margin-top: 6px; }
.quote { margin-top: 16px; padding: 16px; border-left: 3px solid rgba(0,234,255,.35); background: rgba(255,255,255,.03); border-radius: 8px; }
.quote cite { display: block; color: var(--muted); margin-top: 6px; font-style: normal; }

/* Footer */
.footer { background: #090d12; border-top: 1px solid rgba(255,255,255,.06); padding: 28px 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; align-items: start; }
.logo { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.4rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-links a { display: inline-block; margin: 6px 10px 0 0; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.social { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); color: var(--text); text-decoration: none; margin-right: 8px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.social:hover { border-color: rgba(0,234,255,.35); box-shadow: var(--shadow-neon); transform: translateY(-1px); }
.footer .mini { margin-top: 10px; color: var(--muted); }

/* Assistant FAB */
.assistant-fab { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: radial-gradient(100% 100% at 30% 30%, rgba(0,234,255,.18), rgba(255,0,230,.12)), var(--bg-panel); box-shadow: 0 4px 24px rgba(0,0,0,.35), var(--shadow-neon); cursor: pointer; z-index: 20; display: grid; place-items: center; }
.assistant-eye { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #00eaff 40%, transparent 60%), radial-gradient(circle at 70% 70%, #fff, #ff00e6 35%, transparent 60%); animation: eyePulse 2.4s ease-in-out infinite; filter: saturate(120%); }
@keyframes eyePulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(0,234,255,.4), 0 0 24px rgba(255,0,230,.2); } 50% { transform: scale(1.1); box-shadow: 0 0 18px rgba(0,234,255,.6), 0 0 32px rgba(255,0,230,.35); } }

.modal { position: fixed; inset: 0; display: none; z-index: 30; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop { position: absolute; inset: 0; backdrop-filter: blur(6px); background: rgba(0,0,0,.5); }
.modal-content { position: relative; margin: 8vh auto; max-width: 720px; background: #0d1218; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.5), var(--shadow-neon); }
.modal-close { position: absolute; right: 12px; top: 10px; background: transparent; border: none; color: var(--text); font-size: 1.6rem; cursor: pointer; }
.faq details { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* Reveal animations */
/* Default visible; JS will add .js on <html> to enable reveal-in */
[data-animate] { transform: none; opacity: 1; transition: transform .6s ease, opacity .6s ease; }
.js [data-animate] { transform: translateY(10px); opacity: 0; }
[data-animate].in, .js [data-animate].in { transform: translateY(0); opacity: 1; }

/* A11y helpers */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Section backgrounds and separators */
main .section { position: relative; z-index: 0; }
main .section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: -1;
}
main .section:nth-of-type(even)::before { background: var(--bg-panel); }
main .section + .section { border-top: 1px solid rgba(255,255,255,.06); }

/* Responsive */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .code-sim { grid-template-columns: 1fr; }
  .impact-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
  /* Hero mobile tweaks */
  .hero { min-height: 80vh; }
  .hero h1 { font-size: clamp(1.6rem, 7.2vw, 2.4rem); }
  .hero p { font-size: .95rem; padding: 0 4px; }

  /* Terminal mobile: stack prompt and input, larger tap targets */
  .terminal-input { grid-template-columns: 1fr; gap: 8px; }
  .terminal-input .prompt { display: none; }
  .terminal-input input { font-size: 1rem; padding: 12px 14px; }
  .terminal-output { min-height: 120px; max-height: 260px; font-size: .95rem; }
}

/* Terminal contact */
.terminal-window { background: #0b0f14; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; overflow: hidden; margin-top: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,234,255,.05); }
.terminal-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); }
.terminal-header .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.terminal-header .red { background: #ff5f57; box-shadow: 0 0 10px rgba(255,95,87,.5); }
.terminal-header .yellow { background: #ffbd2e; box-shadow: 0 0 10px rgba(255,189,46,.5); }
.terminal-header .green { background: #28c840; box-shadow: 0 0 10px rgba(40,200,64,.5); }
.terminal-title { margin-left: auto; color: var(--muted); font-size: .9rem; }
.terminal-output { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace; padding: 14px; min-height: 160px; max-height: 340px; overflow: auto; white-space: pre-wrap; }
.terminal-input { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); background: #0c1219; }
.terminal-input .prompt { color: #8affc8; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace; opacity: .9; }
.terminal-input input { flex: 1; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; outline: none; color: var(--text); padding: 10px 12px; }
.terminal-input input::placeholder { color: #6b7c95; }


