/* ============================================
   NeoIT — Stylesheet
   Single-page website for NeoIT
   ============================================ */

/* 1. CSS Custom Properties */
:root {
  /* Primary Colors */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #6366f1;

  /* Neutral Colors */
  --dark: #0f172a;
  --dark-mid: #1e293b;
  --text: #374151;
  --muted: #6b7280;
  --light-muted: #9ca3af;
  --border: #d1d5db;
  --light-bg: #f9fafb;
  --lighter-bg: #f3f4f6;
  --white: #ffffff;

  /* Semantic Colors */
  --success: #22c55e;
  --error: #ef4444;

  /* Spacing */
  --section-padding: 100px 0;
  --container-padding: 0 24px;
  --container-max: 1120px;
  --grid-gap: 24px;
  --card-padding: 32px;
  --btn-padding: 12px 28px;
  --input-padding: 12px 16px;
  --footer-top: 48px;
  --footer-bottom: 24px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Border Radius */
  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);

  /* Animation */
  --ease: 0.2s ease;
  --ease-layout: 0.3s ease;
  --ease-fade: 0.6s ease;
}

/* 2. Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--primary-dark);
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  color: var(--muted);
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1rem;
}

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--dark);
  transform: translateY(-1px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-white:hover {
  background: #f9fafb;
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* 5. Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--ease-layout);
  padding: 20px 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  transition: color var(--ease-layout);
  text-decoration: none;
}

.navbar.scrolled .nav-logo {
  color: var(--dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.938rem;
  font-weight: 500;
  transition: color var(--ease);
  text-decoration: none;
}

.navbar.scrolled .nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.active {
  color: var(--primary);
}

.navbar.scrolled .nav-links a:hover {
  color: var(--dark);
}

.navbar.scrolled .nav-links a.active {
  color: var(--primary);
}

.nav-contact-btn {
  padding: 8px 20px;
  color: var(--white);
  font-weight: 600;
  transition: color var(--ease);
}

.navbar.scrolled .nav-contact-btn {
  color: var(--muted);
}

.nav-contact-btn:hover {
  color: var(--white);
}

.nav-contact-btn.active {
  color: var(--primary) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--ease);
  border-radius: 2px;
}

.navbar.scrolled .nav-hamburger span {
  background: var(--dark);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  padding: 80px 24px 24px;
  transition: right var(--ease-layout);
  display: none;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--dark);
  font-size: 1.063rem;
  font-weight: 500;
  border-bottom: 1px solid var(--lighter-bg);
  text-decoration: none;
}

.mobile-menu a:hover {
  color: var(--primary);
}

/* 6. Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1a1a3e 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(14,165,233,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99,102,241,0.15) 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(14,165,233,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: calc(80px + 60px) 24px 0;
  max-width: 600px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero-subtitle {
  color: var(--light-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-cta .btn-primary {
  background: var(--primary);
  box-shadow: 0 4px 16px rgba(14,165,233,0.3);
}

.hero-cta .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(14,165,233,0.4);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.hero-stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--light-muted);
}

/* 7. Sections */
.section {
  padding: var(--section-padding);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

/* Light section */
.section-light {
  background: var(--light-bg);
}

/* 8. Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--grid-gap);
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  transition: all var(--ease-layout);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.938rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.service-features {
  list-style: none;
}

.service-features li {
  font-size: 0.875rem;
  color: var(--text);
  padding: 4px 0;
  padding-left: 24px;
  position: relative;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* 9. About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-content h2 {
  text-align: left;
  margin-bottom: 24px;
}

.about-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-content p strong {
  color: var(--dark);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tech-tag {
  display: inline-block;
  background: var(--lighter-bg);
  color: var(--text);
  font-size: 0.813rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* Terminal Card */
.terminal-card {
  background: var(--dark);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  overflow: hidden;
}

.terminal-header {
  background: #111827;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.green { background: var(--success); }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.red { background: var(--error); }

.terminal-title {
  margin-left: 8px;
  color: var(--light-muted);
  font-size: 0.813rem;
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--light-muted);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* 10. Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--grid-gap);
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  transition: all var(--ease-layout);
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.portfolio-tag {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.portfolio-card h3 {
  margin-bottom: 12px;
}

.portfolio-card p {
  font-size: 0.938rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-tech span {
  background: var(--lighter-bg);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* 11. CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto 32px;
}

/* 12. Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  text-align: left;
  margin-bottom: 12px;
}

.contact-info > p {
  margin-bottom: 24px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--radius-btn);
  transition: background var(--ease);
  text-decoration: none;
  color: inherit;
}

.contact-method:hover {
  background: var(--light-bg);
}

.contact-method-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-method-label {
  display: block;
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--dark);
}

.contact-method-detail {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--light-bg);
  border-radius: var(--radius-card);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--input-padding);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font-primary);
  font-size: 0.938rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--ease);
}

.form-submit:hover {
  background: var(--primary-dark);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-success {
  background: var(--success);
  color: var(--white);
  border: none;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 12px;
  display: none;
}

/* 13. Footer */
.footer {
  background: var(--dark);
  padding-top: var(--footer-top);
}

.footer-top {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--footer-bottom);
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--light-muted);
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--light-muted);
  font-size: 0.875rem;
  transition: color var(--ease);
}

.footer-links a:hover {
  color: var(--white);
}


.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 24px 48px;
  text-align: center;
}

.footer-bottom p {
  color: var(--light-muted);
  font-size: 0.813rem;
}

/* 14. Responsive */

/* Tablet / Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
    --grid-gap: 16px;
    --card-padding: 24px;
    --footer-top: 32px;
    --footer-bottom: 16px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero-content {
    padding: 100px 24px 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    gap: 32px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .terminal-card {
    max-width: 100%;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-bottom {
    padding: 24px 24px 32px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-stat-number {
    font-size: 1.5rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .section-subtitle {
    margin-bottom: 32px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 24px;
  }
}

/* 15. Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--ease-fade), transform var(--ease-fade);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
