:root {
  --bg: #f9fbff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #607091;
  --primary: #276ef1;
  --primary-2: #1a5edf;
  --shadow: 0 10px 25px rgba(38, 67, 145, 0.12);
  --radius: 14px;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e6eaf4;
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.card-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 0.8rem;
  display: block;
}

.nav {
  display: flex;
  justify-content: end;
  gap: 1.1rem;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
}

.hero {
  background: linear-gradient(130deg, #e8a8ff 0%, #6dcdfa 100%);
  color: #fff;
  padding: clamp(4rem, 12vh, 9rem) 0;
  text-align: center;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin: 0 0 1rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: #f0f5ff;
  margin-bottom: 1.5rem;
}

.section {
  padding: 4.2rem 0;
}

.section-secondary {
  background: #f2f6ff;
}

h2 {
  text-align: center;
  margin: 0 0 1.4rem;
  font-size: clamp(1.7rem, 3vw, 2rem);
}

.cards,
.grid-3 {
  display: grid;
  gap: 1rem;
}

.cards {
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
}

.card,
.portfolio-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  min-height: 180px;
}

.card h3,
.portfolio-card h4 {
  margin-top: 0;
}

.card p,
.portfolio-card p {
  color: var(--muted);
}

.footer-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.contact-form label {
  font-weight: 600;
  color: #334064;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cad2f0;
  border-radius: 10px;
  padding: 0.7rem;
  font: inherit;
}

#form-message {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}

#form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--primary-2);
}

.site-footer {
  background: #fff;
  border-top: 1px solid #e5e9f4;
  padding: 1.4rem 0;
}

.footer-grid {
  grid-template-columns: 1fr;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .header-grid {
    grid-template-columns: auto auto;
  }

  .nav {
    position: absolute;
    right: 1rem;
    top: 100%;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #dde5f3;
    border-radius: 10px;
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
  }

  .nav.nav-open,
  .nav.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

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

  .hero {
    text-align: left;
  }

  .hero-content {
    text-align: left;
  }
}

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

  .section {
    padding: 3rem 0;
  }

  .card,
  .portfolio-card {
    min-height: 150px;
  }
}