/* ============================================================
   XOFTWARE X — Version 2 CSS
   Original fonts (Helvetica Neue / Arial) preserved
   Original cyan glow effect preserved
   Modernized layout · Mobile-responsive
   ============================================================ */

/* ── Variables ── */
:root {
  --dark-blue:   #001f3f;
  --dark-blue2:  #001f4d;
  --cyan:        #00ffff;
  --black:       #000;
  --white:       #fff;
  --gray:        #f1f1f1;
  --text-muted:  #555;
  --nav-h:       56px;
  --section-px:  clamp(20px, 6vw, 80px);
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Glow effect config ── */
  --glow-radius: 80;   /* px — spotlight radius around cursor */
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #111;
  background-color: #f9f9f9;
  background-image: url("about-bg.jpg");
  background-attachment: fixed;
  background-size: cover;
  overflow-x: hidden;
  line-height: 1.7;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--dark-blue); border-radius: 4px; }

/* ============================================================
   HEADER — Brand Title  (original font + cyan glow kept)
   Full-screen splash on ALL screen sizes
   ============================================================ */
.header {
  background: var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100svh;
  min-height: 100svh;
  padding: 0 24px;
  position: relative;
}

/* subtle bottom line */
.header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

/* ── Original .xx styles — font & size untouched ── */
.xx {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(2rem, 9vw, 80px);   /* fluid: 80px desktop, scales down */
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0;
  user-select: none;
  cursor: default;
  letter-spacing: 0.04em;
}

/* ── Canvas-based cursor-light glow ──────────────────────────
   The .xx text is hidden — a <canvas> overlay renders everything.
   JS traces each glyph's pixel outline and illuminates the edges
   closest to the cursor, like a torch shining on white text.
── */
/* ── Cursor-light glow — filter:drop-shadow traces glyph pixel edges ──
   JS sets --glow-h (hue) and --glow-i (intensity) per letter each frame.
   drop-shadow follows the actual rendered pixel outline of each glyph,
   so the glow emanates from the letterform edges, not a bounding box.
── */
.letter {
  position: relative;
  display: inline-block;
  --glow-h: 0;
  --glow-i: 0;
  color: #ffffff;
  filter: none;
  will-change: filter, color;
  transition: none;
}

.letter.active {
  /* Letter colour shifts toward the hue as intensity rises */
  color: hsl(var(--glow-h), calc(100% * var(--glow-i)), calc(100% - 45% * var(--glow-i)));
  /* drop-shadow traces real glyph pixel edges — 4 layers: tight core → wide bloom */
  filter:
    drop-shadow(0 0 calc(1px  + 3px  * var(--glow-i))  hsl(var(--glow-h), 100%, calc(95% * var(--glow-i))))
    drop-shadow(0 0 calc(3px  + 6px  * var(--glow-i))  hsl(var(--glow-h), 100%, calc(72% * var(--glow-i))))
    drop-shadow(0 0 calc(7px  + 12px * var(--glow-i))  hsl(var(--glow-h), 100%, calc(50% * var(--glow-i))))
    drop-shadow(0 0 calc(14px + 20px * var(--glow-i))  hsl(var(--glow-h), 100%, calc(28% * var(--glow-i))));
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 255, 255, 0.08);
  /* hidden until user scrolls past splash */
  transform: translateY(-100%);
  transition: transform 0.35s var(--ease);
  overflow: visible;
}
body.scrolled .navbar {
  transform: translateY(0);
}

.navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--section-px);
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.navbar ul::-webkit-scrollbar { display: none; }
.navbar ul li:first-child { margin-right: auto; flex-shrink: 0; }

.navbar ul li a {
  color: rgba(255,255,255,0.7);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 7px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
}
.navbar ul li a:hover {
  color: var(--cyan);
  background: rgba(0, 255, 255, 0.06);
}

.nav_logo {
  height: 30px;
  width: auto;
}

/* ── Mobile hamburger ── */
.nav-toggle {
  /* hidden by default; shown via media query on mobile
     and shown on desktop only during the splash screen */
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  margin-left: 0;
  flex-shrink: 0;
  position: fixed;
  z-index: 300;
}

/* ── Desktop splash: hamburger fixed bottom-right, hides after scroll ── */
@media (min-width: 641px) {
  body:not(.scrolled) .nav-toggle {
    display: flex;
    bottom: 36px;
    right: 36px;
    top: auto;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(0, 255, 255, 0.28);
    border-radius: 12px;
    padding: 13px 14px;
    gap: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px rgba(0, 255, 255, 0.14);
  }
  /* once scrolled on desktop: full navbar links show, no hamburger */
  body.scrolled .nav-toggle {
    display: none;
  }
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: 0.25s var(--ease);
}
/* ── Navbar-embedded toggle: only visible on mobile, right-aligned in sticky navbar ── */
.nav-toggle--navbar {
  display: none;  /* hidden by default on desktop */
}


/* ============================================================
   SECTIONS — Shared
   ============================================================ */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 100px) var(--section-px);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #111;

  /* Original fade animation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
  scroll-snap-align: start;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}
.section.hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.section.dark-bg {
  background-color: var(--dark-blue2);
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}
.section.dark-bg.visible { opacity: 1; transform: translateY(0); }
.section.dark-bg.hidden  { opacity: 0; transform: translateY(-20px); }

h1, h2, h3 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: inherit;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-blue);
}

.section.dark-bg h3 { color: var(--cyan); }

p {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
  max-width: 680px;
}

/* ── Cyan accent underline on h2 ── */
h2::after {
  content: '';
  display: block;
  width: 36px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  margin: 10px auto 0;
  opacity: 0.5;
}

/* ============================================================
   HOME
   ============================================================ */
#home {
  background: var(--dark-blue2);
  position: relative;
  overflow: hidden;
}
body.scrolled #home {
  padding-top: calc(var(--nav-h) + 48px);
}

#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,255,255,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.header-content .logo {
  width: clamp(90px, 18vw, 200px);
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 0 18px rgba(0,255,255,0.15));
}

.header-content h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.header-content > p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: 25px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.3s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn.primary {
  background: var(--white);
  color: var(--black);
}
.btn.primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,255,255,0.18);
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: center;
  text-align: left;
}

#about .content {
  flex: 1;
  min-width: 280px;
  max-width: 560px;
}

#about h2::after { margin: 10px 0 0; }

#about h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--dark-blue);
}

.about-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--dark-blue);
  flex-shrink: 0;
  box-shadow: 0 0 40px rgba(0,31,63,0.3);
}

/* ============================================================
   SERVICES
   ============================================================ */
#services {
  align-items: flex-start;
  text-align: left;
}

#services h2::after { margin: 10px 0 0; }

.services-intro {
  max-width: 620px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  width: 100%;
}

.service-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,255,255,0.1);
  border-radius: 10px;
  padding: 24px 20px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.service-item:hover {
  border-color: rgba(0,255,255,0.35);
  transform: translateY(-3px);
}
.service-item h3 { color: var(--cyan); }
.service-item p  { color: rgba(255,255,255,0.65); max-width: none; }

.services-outro {
  grid-column: 1 / -1;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  max-width: none;
  margin: 0;
}

/* ============================================================
   PROJECTS
   ============================================================ */
#projects {
  align-items: flex-start;
  text-align: left;
}
#projects h2::after { margin: 10px 0 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 28px;
}

.project-card {
  background: var(--gray);
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 22px 20px;
  color: var(--black);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.project-card:hover {
  border-color: var(--dark-blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,31,63,0.1);
}
.project-card:first-child {
  grid-column: 1 / -1;
  background: transparent;
  border: none;
  padding: 0 0 8px;
}
.project-card h3 { color: var(--dark-blue); }

/* ============================================================
   REVIEWS
   ============================================================ */
#reviews {
  align-items: flex-start;
  text-align: left;
}
#reviews h2::after { margin: 10px 0 0; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 28px;
}

.review {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,255,255,0.1);
  border-radius: 10px;
  padding: 26px 22px 20px;
  position: relative;
  transition: border-color 0.2s var(--ease);
}
.review:hover { border-color: rgba(0,255,255,0.3); }
.review::before {
  content: '\201C';
  position: absolute;
  top: 8px; left: 18px;
  font-size: 3rem;
  color: var(--cyan);
  opacity: 0.2;
  line-height: 1;
  font-family: Georgia, serif;
}
.review p {
  color: rgba(255,255,255,0.75);
  font-style: italic;
  font-size: 0.9rem;
  padding-top: 10px;
  max-width: none;
  margin-bottom: 14px;
}
.review h4 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.07em;
  opacity: 0.8;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  align-items: flex-start;
  text-align: left;
}
#contact h2::after { margin: 10px 0 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  width: 100%;
  max-width: 500px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--dark-blue);
  background: var(--white);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  color: #111;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #0050a0;
  box-shadow: 0 0 0 3px rgba(0,31,63,0.08);
}

.contact-form button {
  align-self: flex-start;
  background: var(--dark-blue);
  color: var(--white);
  border: none;
  padding: 11px 28px;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-form button:hover {
  background: #003070;
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark-blue);
  color: var(--white);
  padding: 32px var(--section-px);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer-links a {
  color: var(--white);
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-links a:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(0,255,255,0.3);
}

.footer-content > p {
  font-size: 0.78rem;
  opacity: 0.5;
  margin: 0;
}

/* ============================================================
   FADE ANIMATION (original preserved)
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s, transform 0.5s;
}

.visible {
  animation: fadeIn 1s ease-in-out forwards;
}

/* ============================================================
   RESPONSIVE — TABLET  ≤900px
   ============================================================ */
@media (max-width: 900px) {
  #about {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #about h2::after { margin: 10px auto 0; }
  .about-image { width: 150px; height: 150px; }
}

/* ============================================================
   RESPONSIVE — MOBILE  ≤640px
   Splash screen · In-flow hamburger below glow text
   Navbar sticky — travels with page then sticks at top
   ============================================================ */
@media (max-width: 640px) {

  /* ── HEADER: normal flow, full screen splash ── */
  .header {
    position: relative;   /* normal flow so navbar can follow it */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .header::after { display: none; }

  /* ── NAVBAR: sticky on mobile — sticks to top once header scrolls away ── */
  .navbar {
    position: sticky;
    top: 0;
    /* override the base fixed+hidden styles */
    transform: none !important;
    transition: none;
    z-index: 200;
    overflow: visible;
    /* flex row so toggle + ul sit side by side */
    display: flex;
    align-items: center;
    padding: 0 16px;
  }

  /* The navbar-embedded hamburger: right-side, plain, no border */
  .nav-toggle--navbar {
    display: flex;
    position: relative;
    margin-left: auto;
    top: auto; bottom: auto; right: auto; left: auto;
    background: none;
    border: none;
    border-radius: 0;
    padding: 8px 4px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: auto;
  }

  /* link list dropdown off navbar */
  .navbar ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    padding: 10px 24px 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), visibility 0.25s;
    z-index: 99;
  }
  .navbar ul.open {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
  }
  .navbar ul li:first-child { margin-right: 0; }
  .navbar ul li a { padding: 11px 8px; width: 100%; font-size: 0.95rem; }

  /* ── SECTIONS ── */
  .section,
  .section.dark-bg {
    min-height: auto;
    padding: 56px 20px;
  }

  /* single-column grids */
  .services-grid,
  .projects-grid,
  .reviews-grid { grid-template-columns: 1fr; }

  .project-card:first-child { grid-column: 1; }
  .services-outro { grid-column: 1; }

  /* contact */
  .contact-form { max-width: 100%; }
  .contact-form button { align-self: stretch; text-align: center; justify-content: center; }

  /* decorative circle hidden */
  .about-image { display: none; }

  /* footer links */
  .footer-links { gap: 6px; }
}
