:root {
  --bg: #ffffff;
  --surface: #f7f8fc;
  --surface-2: #eef1f7;
  --text: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.08);
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 10px 30px rgba(16, 24, 40, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --container: 1180px;
  --accent: #111827;
  --accent-2: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 2px;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav a:hover::after {
  transform: scaleX(1);
}

/* Sections */
.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 34px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.section-heading h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.form-message {
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

.form-message.success {
  color: #16a34a;
}

.form-message.error {
  color: #dc2626;
}
/* Works section */
.works-section {
  padding: 72px 0 28px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(59, 130, 246, 0.18);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(16, 24, 40, 0.06);
  background: var(--surface);
}

.project-card h2 {
  margin: 14px 2px 4px;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.project-card p {
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-card a {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.project-card a:hover {
  transform: translateY(-1px);
  background: rgba(59, 130, 246, 0.16);
}

/* Contact section */
.contact-section {
  padding: 34px 0 80px;
}

.contact-section .container {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-xl) + 4px);
  box-shadow: var(--shadow);
  padding: 42px 24px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.08);
}

/* Responsive */
@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header .container {
    min-height: 68px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .works-section {
    padding-top: 54px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading p {
    font-size: 0.96rem;
  }

  .nav {
    gap: 12px;
    font-size: 0.92rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .project-card {
    padding: 10px;
    border-radius: 18px;
  }

  .project-card img {
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }

  .project-card h2 {
    font-size: 0.96rem;
    margin-top: 10px;
  }

  .project-card p {
    font-size: 0.84rem;
    margin-bottom: 10px;
  }

  .project-card a {
    padding: 9px 11px;
    font-size: 0.82rem;
  }


}

@media (max-width: 420px) {
  .logo {
    font-size: 0.98rem;
  }

  .nav {
    gap: 10px;
  }

  .nav a {
    font-size: 0.88rem;
  }

  .projects-grid {
    gap: 10px;
  }
}

.contact-section {
  padding: 80px 0;
}

.contact-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.contact-copy,
.contact-form {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-xl) + 4px);
  box-shadow: var(--shadow);
}

.contact-copy {
  padding: 38px;
}

.contact-copy h2 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.contact-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contact-method:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.08);
}

.method-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 1.1rem;
}

.method-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.method-text strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.method-text small {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-form {
  padding: 34px;
}

.form-top {
  margin-bottom: 22px;
}

.form-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.form-top h3 {
  margin: 14px 0 8px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.form-top p {
  margin: 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.input-wrap {
  position: relative;
}

.input-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-wrap input,
.input-wrap textarea {
  width: 100%;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-wrap input {
  height: 56px;
  padding: 0 16px 0 46px;
}

.input-wrap.textarea textarea {
  min-height: 170px;
  resize: vertical;
  padding: 16px 16px 16px 46px;
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
  color: #98a2b3;
}

.input-wrap input:focus,
.input-wrap textarea:focus {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.send-btn {
  margin-top: 18px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #111827 0%, #2563eb 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(37, 99, 235, 0.24);
}

/* Responsive */
@media (max-width: 920px) {
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-copy,
  .contact-form {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .contact-section {
    padding: 60px 0;
  }

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

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

  .contact-copy,
  .contact-form {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .contact-copy h2 {
    font-size: 1.9rem;
  }

  .form-top h3 {
    font-size: 1.3rem;
  }

  .method-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
