/* ========================================
   GioStudio — Production-Ready Portfolio
   Glassmorphism, 3D, 60fps Optimized
   ======================================== */

:root {
  --color-bg: #050505;
  --color-bg-elevated: #0a0a0a;
  --color-surface: #111111;
  --color-surface-hover: #1a1a1a;
  --color-accent: #e0e0e0;
  --color-accent-dim: rgba(224, 224, 224, 0.12);
  --color-accent-glow: rgba(224, 224, 224, 0.25);
  --color-text: #f0f0f0;
  --color-text-muted: #a3a3a3; /* Increased contrast for WCAG AA compliance */
  --color-text-dim: #808080;   /* Increased contrast for better legibility */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 3840px;
  --nav-height: 64px;
}

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

html { font-size: clamp(14px, 1.2vw, 18px); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body { background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); overflow-x: hidden; line-height: 1.6; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Accessibility */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  padding: 0.8rem 1.5rem; background: var(--color-accent); color: var(--color-bg);
  border-radius: 0 0 8px 8px; z-index: 10000; font-weight: 600;
  transition: top 0.3s ease;
}
.skip-link:focus { top: 0; }

/* ========================================
   Grain Overlay
   ======================================== */

.grain-overlay {
  position: fixed; top: -50%; left: -50%; right: -50%; bottom: -50%;
  width: 200%; height: 200%;
  background: transparent 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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E") repeat;
  pointer-events: none; z-index: 9998; opacity: 0.5;
  animation: grainShift 0.5s steps(1) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(7%, -25%); }
  50% { transform: translate(-15%, 10%); }
  70% { transform: translate(0%, 15%); }
  90% { transform: translate(-10%, 10%); }
}

.page-transition-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--color-bg); z-index: 9999; pointer-events: none;
  opacity: 0 !important;
  display: none !important;
}

/* ========================================
   LOADING SCREEN
   ======================================== */

.loader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--color-bg); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-accent);
  animation: loaderPulse 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

.loader-bar {
  width: 120px;
  height: 2px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: 2px;
  animation: loaderFill 1.5s ease-out forwards;
}

@keyframes loaderFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Promote animated elements to GPU layers to prevent layout thrashing */
.service-card, .project-card, .timeline-item, .timeline-content, .advantage-stat, 
.faq-item, .testimonial-card, .blog-card, .pricing-card, .tech-tag {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Fix heading hierarchy for Accessibility */
.advantage-stat h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Optimize for touch devices without losing beauty */
@media (hover: none) and (pointer: coarse) {
  /* Replace heavy blur with elegant semi-transparent layers */
  .glass {
    background: rgba(17, 17, 17, 0.85) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .top-nav {
    background: rgba(5, 5, 5, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  /* Use hardware-accelerated transforms instead of shadows */
  .service-card, .project-card, .timeline-content, .advantage-stat {
    transition: transform 0.3s ease !important;
  }
  .service-card:active, .project-card:active, .timeline-content:active {
    transform: scale(0.98) !important;
  }

  /* Hide grain on mobile for performance */
  .grain-overlay { display: none; }
  
  /* Disable heavy canvases but keep beautiful CSS gradients */
  #hero-canvas, #services-canvas, #contact-canvas { display: none; }
}

/* Beautiful CSS fallback for hero background on tablets */
@media (hover: none) and (pointer: coarse) {
  .hero {
    background: 
      radial-gradient(circle at 50% 50%, rgba(224, 224, 224, 0.08) 0%, transparent 60%),
      linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
  }
  .hero::before { display: none; }
}

.glass {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========================================
   TOP NAVIGATION
   ======================================== */

.top-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 4rem); z-index: 1000;
  background: rgba(5, 5, 5, 0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: transform 0.4s var(--ease-out-expo), background 0.3s ease;
}

.top-nav.nav-hidden { transform: translateY(-100%); }
.top-nav.nav-solid { background: rgba(5, 5, 5, 0.95); }

.nav-logo { font-family: var(--font-display); font-size: 1.1rem; font-weight: 900; letter-spacing: 0.2em; }

.nav-links { display: flex; align-items: center; gap: clamp(0.6rem, 1.5vw, 1.5rem); }

.nav-link {
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-text-muted); transition: color 0.3s ease; position: relative;
}

.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--color-accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover { color: var(--color-text); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  padding: 0.4rem 1rem; border: 1px solid var(--color-accent-dim); border-radius: 30px;
  color: var(--color-accent) !important; transition: all 0.3s ease;
}

.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--color-accent); color: var(--color-bg) !important; }

.nav-lang { display: flex; gap: 0.3rem; align-items: center; }
.lang-link {
  font-size: 0.6rem; letter-spacing: 0.1em; color: var(--color-text-dim);
  padding: 0.2rem 0.4rem; border-radius: 4px; transition: all 0.3s ease;
}
.lang-link:hover, .lang-link.active { color: var(--color-accent); background: var(--color-accent-dim); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 8px; z-index: 1001;
}

.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--color-text); transition: all 0.3s ease; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

.mobile-nav {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--color-bg); z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}

.mobile-nav.active { opacity: 1; pointer-events: all; }
.mobile-nav-link {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  color: var(--color-text-muted); transition: color 0.3s ease;
}
.mobile-nav-link:hover { color: var(--color-text); }

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 2rem; font-family: var(--font-body); font-size: 0.75rem;
  font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  border-radius: 50px; cursor: pointer; transition: all 0.4s var(--ease-out-expo);
  position: relative; overflow: hidden; white-space: nowrap;
  will-change: transform;
}

.btn-primary { background: var(--color-accent); color: var(--color-bg); border: 1px solid var(--color-accent); }
.btn-primary:hover { background: transparent; color: var(--color-accent); box-shadow: 0 0 30px var(--color-accent-dim); }

.btn-outline { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.65rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.tag {
  display: inline-block; padding: 0.25rem 0.6rem; background: var(--color-accent-dim);
  border-radius: 20px; font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-text-muted);
}

/* ========================================
   Section Base
   ======================================== */

.section { position: relative; width: 100%; }
.hero { min-height: 100vh; min-height: 100dvh; overflow: hidden; }
.services, .projects, .experience, .faq, .contact {
  padding: clamp(3rem, 6vh, 6rem) 0;
}
.java-advantage {
  background: var(--color-bg);
  position: relative;
  padding: clamp(3rem, 6vh, 6rem) 0;
}

.section-header { text-align: center; margin-bottom: clamp(2rem, 4vh, 3rem); max-width: 650px; margin-left: auto; margin-right: auto; padding: 0 1rem; }
.section-eyebrow { font-size: 0.65rem; letter-spacing: 0.5em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 0.8rem; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 4rem); font-weight: 900; line-height: 1; letter-spacing: -0.02em; margin-bottom: 1rem; }
.section-desc { font-size: clamp(0.8rem, 1.1vw, 1rem); color: var(--color-text-muted); line-height: 1.7; max-width: 550px; margin: 0 auto; }

/* ========================================
   SECTION TRANSITIONS
   ======================================== */

.section-transition {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 2rem 1rem; background: var(--color-bg); position: relative; overflow: hidden;
}

.section-transition::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, var(--color-accent-dim), transparent 70%); opacity: 0.2;
}

.transition-line {
  width: 40px; height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent-dim), transparent); position: relative;
}

.transition-line::before {
  content: ''; position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: var(--color-accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--color-accent-glow);
}

.transition-text {
  font-family: var(--font-display); font-size: clamp(0.8rem, 1.5vw, 1.2rem);
  font-weight: 700; font-style: italic; color: var(--color-text-muted);
  letter-spacing: 0.05em; white-space: nowrap;
}

/* ========================================
   MARQUEE
   ======================================== */

.marquee-section {
  padding: 1.2rem 0; background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.marquee-track {
  display: flex; align-items: center; gap: 1.2rem;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-reverse { animation-direction: reverse; animation-duration: 25s; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 2rem);
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-text-dim);
  transition: color 0.3s ease;
}

.marquee-item:hover { color: var(--color-accent); }

.marquee-dot {
  font-size: 0.5rem !important;
  color: var(--color-accent-dim) !important;
}

/* ========================================
   HERO
   ======================================== */

.hero { display: flex; align-items: center; justify-content: center; min-height: 100vh; position: relative; }

.hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 50%, rgba(224, 224, 224, 0.03) 0%, transparent 60%);
  z-index: 1; pointer-events: none;
}

.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 200px;
  background: linear-gradient(to top, var(--color-bg), transparent);
  z-index: 2; pointer-events: none;
}

#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

/* Tablet fallback: gradient instead of WebGL */
@media (hover: none) and (pointer: coarse) {
  #hero-canvas { display: none; }
  .hero::before {
    background: radial-gradient(ellipse at 50% 50%, rgba(224, 224, 224, 0.06) 0%, transparent 60%) !important;
    opacity: 1 !important;
  }
  #services-canvas, #contact-canvas { display: none; }
}

.hero-content { position: relative; z-index: 3; text-align: center; padding: 0 1rem; will-change: transform; }
.hero-eyebrow { font-size: 0.65rem; letter-spacing: 0.6em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 1.2rem; }

.hero-title {
  font-family: var(--font-display); font-size: clamp(3rem, 14vw, 14rem);
  font-weight: 900; line-height: 0.9; letter-spacing: -0.03em; display: flex; justify-content: center;
}

.hero-letter { display: inline-block; }
.hero-subtitle { font-size: clamp(0.8rem, 1.3vw, 1.1rem); font-weight: 300; letter-spacing: 0.2em; color: var(--color-text-muted); margin-top: 1.2rem; }
.hero-buttons { display: flex; gap: 0.8rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: clamp(1.5rem, 4vw, 4rem); justify-content: center;
  margin-top: 3rem; padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.hero-stat-num { font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 2.2rem); font-weight: 900; color: var(--color-accent); }
.hero-stat-label { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-text-muted); }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}

.scroll-indicator span { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-text-muted); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--color-accent), transparent); animation: scrollPulse 2s ease-in-out infinite; }

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   SERVICES
   ======================================== */

.services { background: var(--color-bg-elevated); position: relative; }

.services::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(224, 224, 224, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(224, 224, 224, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

#services-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.1; }
.services-inner { position: relative; z-index: 1; max-width: var(--max-width); padding: 0 clamp(1rem, 4vw, 6rem); }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transform: translateY(0);
}

.service-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent-dim);
  line-height: 1;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.service-card > p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.service-cta {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-top: auto;
  padding-top: 0.5rem;
  transition: opacity 0.3s ease;
  align-self: flex-start;
}
.service-cta:hover { opacity: 0.7; }

/* ========================================
   PROJECTS
   ======================================== */

.projects { background: var(--color-bg); position: relative; }

.projects-inner { position: relative; z-index: 1; max-width: var(--max-width); padding: 0 clamp(1rem, 4vw, 6rem); }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2.5rem; }

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.project-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(-8px);
}

.project-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.project-image {
  min-height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  overflow: hidden;
  transition: filter 0.4s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.project-card:hover .project-image { filter: brightness(1.2); }

.project-info {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.projects-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ========================================
   EXPERIENCE / TIMELINE
   ======================================== */

.experience { background: var(--color-bg-elevated); position: relative; }

.experience-inner { position: relative; z-index: 1; max-width: var(--max-width); padding: 0 clamp(1rem, 4vw, 6rem); }

.timeline { position: relative; max-width: 750px; margin: 0 auto 3rem; padding-left: 35px; }

.timeline::before {
  content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--color-border) 5%, var(--color-border) 95%, transparent);
}

.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: -29px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow);
  border: 2px solid var(--color-bg-elevated);
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.timeline-content:hover {
  border-color: var(--color-border-hover);
  transform: translateX(8px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.timeline-date { font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.4rem; display: block; }
.timeline-content h3 { font-family: var(--font-display); font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 700; margin-bottom: 0.6rem; }
.timeline-content p { font-size: 0.8rem; line-height: 1.6; color: var(--color-text-muted); margin-bottom: 0.8rem; }
.timeline-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.experience-tech { text-align: center; padding-top: clamp(1.5rem, 3vh, 3rem); border-top: 1px solid var(--color-border); }
.experience-tech h3 { font-family: var(--font-display); font-size: clamp(1.2rem, 1.8vw, 1.8rem); font-weight: 700; margin-bottom: 1.2rem; }

.tech-tags { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.tech-tag {
  padding: 0.4rem 1rem; background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 30px; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--color-text-muted);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.tech-tag:hover {
  border-color: var(--color-accent); color: var(--color-accent);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   JAVA ADVANTAGE
   ======================================== */

.java-advantage {
  background: var(--color-bg);
  position: relative;
  padding: clamp(4rem, 8vh, 8rem) 0;
}

.java-advantage-inner {
  position: relative; z-index: 1; max-width: var(--max-width); padding: 0 clamp(1rem, 4vw, 6rem);
}

.java-advantage-content {
  max-width: 750px;
  margin: 0 auto 3rem;
  text-align: center;
}

.java-advantage-content p {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.java-advantage-content strong {
  color: var(--color-text);
}

.java-advantage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.advantage-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
}

.advantage-stat:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.advantage-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.advantage-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-accent);
}

.advantage-stat h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.advantage-stat p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ========================================
   FAQ
   ======================================== */

.faq { background: var(--color-bg-elevated); position: relative; }

.faq-inner { position: relative; z-index: 1; max-width: 750px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 6rem); }

.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--color-border); }

.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 0; background: none; border: none; color: var(--color-text);
  font-family: var(--font-body); font-size: clamp(0.9rem, 1.2vw, 1.05rem); font-weight: 500;
  text-align: left; cursor: pointer; transition: color 0.3s ease;
}

.faq-question:hover { color: var(--color-accent); }
.faq-icon { font-size: 1.3rem; font-weight: 300; color: var(--color-text-muted); transition: transform 0.3s var(--ease-out-expo); flex-shrink: 0; margin-left: 1rem; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--color-accent); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease-out-expo), padding 0.5s var(--ease-out-expo); }
.faq-item.active .faq-answer { max-height: 300px; }
.faq-answer p { padding-bottom: 1.2rem; font-size: 0.85rem; line-height: 1.7; color: var(--color-text-muted); }

/* ========================================
   CONTACT
   ======================================== */

.contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--color-bg); min-height: 100vh; position: relative; padding-bottom: 0;
}

#contact-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

.contact-inner {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  gap: clamp(1.5rem, 3vh, 3rem); padding: clamp(4rem, 8vh, 6rem) 0; text-align: center;
}

#contact-morph-canvas { width: clamp(250px, 60vw, 800px); height: clamp(70px, 12vh, 160px); }
.contact-subtitle { font-size: clamp(0.8rem, 1.3vw, 1.1rem); color: var(--color-text-muted); font-weight: 300; }
.contact-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

.contact-form-wrap {
  width: 100%; max-width: 550px; text-align: left;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}

.contact-form-title {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  margin-bottom: 1.2rem; text-align: center;
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label {
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
}

.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--color-bg); color: var(--color-text); }

.contact-info {
  display: flex; gap: clamp(1.5rem, 3vw, 3rem); flex-wrap: wrap; justify-content: center;
  padding-top: 1.5rem; border-top: 1px solid var(--color-border);
}
.contact-item { display: flex; flex-direction: column; gap: 0.2rem; align-items: center; }
.contact-label { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--color-text-dim); }
.contact-item a, .contact-item span { font-size: 0.85rem; color: var(--color-accent); }
.contact-item a:hover { text-decoration: underline; }

/* ========================================
   FOOTER
   ======================================== */

.footer {
  position: relative; z-index: 1; width: 100%; padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 4vw, 6rem);
  border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}

.footer-brand { text-align: center; }
.footer-logo {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 900;
  letter-spacing: 0.15em; display: block; margin-bottom: 0.2rem;
}
.footer-tagline { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--color-text-muted); text-transform: uppercase; }

.footer-links { display: flex; gap: clamp(1rem, 2vw, 2rem); flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-text-muted); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--color-accent); }

.footer-social { display: flex; gap: clamp(0.8rem, 1.5vw, 1.5rem); flex-wrap: wrap; justify-content: center; }
.social-link {
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--color-text-muted);
  padding: 0.4rem 0.8rem; border: 1px solid var(--color-border); border-radius: 30px;
  transition: all 0.3s ease;
}
.social-link:hover { border-color: var(--color-accent); color: var(--color-accent); }

.footer-copy { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--color-text-dim); }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.4);
  }
  .nav-links, .nav-lang { display: none; }
  .nav-toggle { display: flex; }
  .hero-title { font-size: clamp(3rem, 16vw, 5rem); }
  .hero-buttons { flex-direction: column; align-items: center; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-buttons { flex-direction: column; align-items: center; }
  .footer { flex-direction: column; }
  .section-transition { gap: 0.8rem; padding: 2rem 1rem; }
  .transition-line { width: 30px; }
  .contact-info { flex-direction: column; gap: 1.2rem; }
  .form-row { grid-template-columns: 1fr; }
  .timeline { padding-left: 25px; }
  .timeline::before { left: 8px; }
  .timeline-dot { left: -25px; width: 8px; height: 8px; }
  .java-advantage-stats { grid-template-columns: 1fr; }
  
  /* Mobile Contact Fix */
  .contact-form-wrap {
    padding: 1.2rem;
    margin: 0 0.5rem;
  }
  .contact-form {
    gap: 0.8rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.9rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  .contact-inner {
    padding: clamp(2rem, 5vh, 4rem) 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.5rem, 14vw, 4rem); }
  .section-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
}
