/* ──────────────────────────────────────
   APOLUS.TECH — CSS
   Dark / neon · Space Grotesk + Space Mono
────────────────────────────────────── */

:root {
  --bg:       #080c12;
  --bg2:      #0d1220;
  --bg3:      #111827;
  --border:   rgba(255,255,255,0.07);
  --accent:   #00e5ff;
  --accent2:  #7c3aed;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --white:    #ffffff;
  --ff-body:  'Space Grotesk', sans-serif;
  --ff-mono:  'Space Mono', monospace;
  --radius:   12px;
  --max:      1180px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* ── Utility ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ────────────────── NAV ────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 68px;
  background: rgba(8, 12, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
#navbar.scrolled { background: rgba(8,12,18,0.97); }

.logo {
  font-family: var(--ff-mono); font-size: 1.15rem; font-weight: 700;
  color: var(--white); text-decoration: none; letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-family: var(--ff-mono); font-size: 0.75rem;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.btn-nav {
  background: var(--accent); color: var(--bg); text-decoration: none;
  font-weight: 600; font-size: 0.85rem; padding: 8px 18px;
  border-radius: 8px; transition: all var(--transition);
}
.btn-nav:hover { background: #33eaff; transform: translateY(-1px); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ────────────────── HERO ────────────────── */
#hero {
  min-height: 100vh; padding: 120px 32px 80px;
  display: flex; align-items: center; justify-content: center;
  gap: 64px; position: relative; overflow: hidden;
  max-width: 100%;
}

.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-glow {
  position: absolute; top: 20%; left: 25%;
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

.hero-content { flex: 1; max-width: 560px; position: relative; z-index: 1; }
.hero-visual  { flex: 1; max-width: 480px; position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: ''; display: inline-block; width: 28px; height: 1px; background: var(--accent);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700;
  line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 24px;
  color: var(--white);
}
.hero-line { display: block; }
.hero-accent {
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem; color: var(--muted); max-width: 460px; margin-bottom: 36px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg);
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 13px 26px; border-radius: var(--radius);
  transition: all var(--transition); border: none; cursor: pointer;
  font-family: var(--ff-body);
}
.btn-primary:hover { background: #33eaff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,229,255,0.25); }
.btn-primary.full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex; align-items: center;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex; align-items: center; gap: 28px;
  padding-top: 36px; border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--ff-mono); font-size: 1.5rem; font-weight: 700;
  color: var(--white); letter-spacing: -1px;
}
.stat-label { font-size: 0.75rem; color: var(--muted); }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ── Code Window ── */
.code-window {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}
.cw-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 18px; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }
.cw-title { font-family: var(--ff-mono); font-size: 0.72rem; color: var(--muted); margin-left: auto; }
.cw-code { padding: 24px; font-family: var(--ff-mono); font-size: 0.82rem; line-height: 1.9; overflow-x: auto; }

.c-keyword { color: #c792ea; }
.c-var     { color: #82aaff; }
.c-key     { color: #7fdbca; }
.c-str     { color: #ecc48d; }
.c-num     { color: #f78c6c; }
.c-bool    { color: #ff5874; }
.c-fn      { color: #82aaff; }
.c-comment { color: var(--muted); }

/* ────────────────── SECTIONS SHARED ────────────────── */
section:not(#hero) { padding: 100px 0; }

.section-header {
  text-align: center; margin-bottom: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.section-tag {
  font-family: var(--ff-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700;
  color: var(--white); letter-spacing: -0.8px; line-height: 1.15;
}
.section-header h2 em { font-style: normal; color: var(--accent); }
.section-header p { font-size: 1rem; color: var(--muted); max-width: 480px; }

/* ────────────────── SERVICES ────────────────── */
#services { background: var(--bg2); }

.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}

.service-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  position: relative; overflow: hidden;
  transition: all var(--transition);
}
.service-card:hover {
  border-color: rgba(0,229,255,0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.service-card.featured {
  border-color: rgba(0,229,255,0.3);
  background: linear-gradient(135deg, var(--bg) 0%, rgba(0,229,255,0.04) 100%);
}
.service-card.featured::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,229,255,0.05), transparent);
  pointer-events: none;
}
.service-badge {
  display: inline-block; font-family: var(--ff-mono); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(0,229,255,0.12); color: var(--accent);
  padding: 3px 10px; border-radius: 4px; margin-bottom: 16px;
}
.service-icon { font-size: 1.8rem; color: var(--accent); margin-bottom: 16px; line-height: 1; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.service-card p  { font-size: 0.88rem; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.service-tags li {
  font-family: var(--ff-mono); font-size: 0.7rem;
  background: rgba(255,255,255,0.05); color: var(--muted);
  padding: 3px 10px; border-radius: 4px;
}

/* ────────────────── PORTFOLIO ────────────────── */
#portfolio { background: var(--bg); }

.portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}

.portfolio-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; transition: all var(--transition);
}
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0,0,0,0.4);
  border-color: var(--border);
}

.pc-header {
  height: 200px; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}

.pc-mockup {
  width: 260px; background: rgba(0,0,0,0.4); border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); overflow: hidden;
}
.pc-mockup.mobile { width: 140px; }
.pm-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 12px; background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pm-bar span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.pm-bar.mobile span { width: 60px; height: 6px; border-radius: 3px; }
.pm-content { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.pm-line { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.15); }
.pm-line.w80 { width: 80%; } .pm-line.w60 { width: 60%; }
.pm-line.w40 { width: 40%; } .pm-line.w50 { width: 50%; }
.pm-line.w70 { width: 70%; } .pm-line.w90 { width: 90%; }
.pm-blocks { display: flex; gap: 6px; margin-top: 4px; }
.pm-block { flex: 1; height: 32px; border-radius: 4px; background: rgba(255,255,255,0.1); }
.pm-card-big { height: 48px; border-radius: 6px; background: rgba(255,255,255,0.12); margin: 4px 0; }

.pc-body { padding: 20px 24px 24px; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pc-tags span {
  font-family: var(--ff-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.06); color: var(--muted);
}
.pc-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.pc-body p  { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

/* ────────────────── CONTACT ────────────────── */
#contact { background: var(--bg2); }

.contact-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.contact-info .section-tag { margin-bottom: 14px; display: block; }
.contact-info h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700;
  color: var(--white); letter-spacing: -0.5px; margin-bottom: 16px; line-height: 1.2;
}
.contact-info h2 em { font-style: normal; color: var(--accent); }
.contact-info > p { color: var(--muted); margin-bottom: 36px; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  color: var(--text); text-decoration: none; font-size: 0.9rem;
  transition: color var(--transition);
}
.contact-link:hover { color: var(--accent); }
.cl-icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,229,255,0.07); border: 1px solid rgba(0,229,255,0.15);
  border-radius: 8px; font-size: 1.1rem; color: var(--accent); flex-shrink: 0;
}

/* ── Form ── */
.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.83rem; font-weight: 500; color: var(--muted); }

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px;
  color: var(--text); font-family: var(--ff-body); font-size: 0.9rem;
  outline: none; transition: border-color var(--transition);
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(100,116,139,0.6); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form select { cursor: pointer; }

.form-success {
  text-align: center; color: #27c93f; font-size: 0.88rem;
  font-weight: 600; padding: 10px;
}

/* ────────────────── FOOTER ────────────────── */
footer {
  padding: 40px 0; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-copy { font-size: 0.82rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

/* ────────────────── RESPONSIVE ────────────────── */
@media (max-width: 900px) {
  #hero { flex-direction: column; padding: 110px 24px 60px; gap: 48px; }
  .hero-visual { width: 100%; max-width: 100%; }
  .code-window { width: 100%; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  #navbar { padding: 0 20px; }
  .nav-links, .btn-nav { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    padding: 16px 0; z-index: 99;
  }
  .nav-links.open li a { display: block; padding: 12px 28px; font-size: 1rem; }
  h1 { font-size: 2.2rem; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .stat-divider { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ────────────────── ANIMATIONS ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease forwards; }
  .hero-eyebrow { animation-delay: 0.1s; }
  h1            { animation-delay: 0.2s; }
  .hero-sub     { animation-delay: 0.3s; }
  .hero-actions { animation-delay: 0.4s; }
  .hero-stats   { animation-delay: 0.5s; }
  .hero-visual  { opacity: 0; transform: translateX(20px); animation: fadeLeft 0.7s 0.4s ease forwards; }

  @keyframes fadeUp  { to { opacity: 1; transform: none; } }
  @keyframes fadeLeft{ to { opacity: 1; transform: none; } }

  .service-card, .portfolio-card {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition), box-shadow var(--transition);
  }
  .service-card.visible, .portfolio-card.visible { opacity: 1; transform: none; }
}
