/* ===== CSS Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

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

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* ===== Hero Section ===== */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero .sub {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.card {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: left;
  transition: all 0.3s;
}

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

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== Sections ===== */
.section {
  padding: 5rem 1.5rem;
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ===== Grid Layout ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.box {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.box:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.box h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.box p {
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== Portfolio ===== */
.portfolio {
  display: grid;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.project {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: all 0.3s;
}

.project:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.project-desc {
  color: var(--text);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.features {
  list-style: none;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.features li {
  color: var(--text-light);
  padding-left: 1.5rem;
  position: relative;
}

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

.tech {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== Steps ===== */
.steps {
  max-width: 800px;
  margin: 0 auto;
  list-style: none;
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  margin-bottom: 2rem;
  padding-left: 4rem;
  position: relative;
  line-height: 1.8;
  color: var(--text-light);
}

.steps li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.steps strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== Form ===== */
.form {
  max-width: 600px;
  margin: 2rem auto 0;
}

.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form label {
  display: block;
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: var(--text);
}

.form input,
.form textarea {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form textarea {
  resize: vertical;
}

.form .note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer .muted {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .nav a:not(.btn) {
    display: none;
  }

  .hero {
    padding: 3rem 1.5rem 2rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

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

  .form .row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

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

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

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .sub {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.75rem;
  }
}