* { box-sizing: border-box; }

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --text: #171717;
  --muted: #6c6a65;
  --line: #d9d7d0;
  --accent: #6c4cff;
  --max: 1180px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font: 700 1.45rem "Space Grotesk", sans-serif;
  letter-spacing: -.06em;
}
.brand span { color: var(--accent); }

nav { display: flex; gap: 30px; }
nav a { color: var(--muted); font-size: .92rem; }
nav a:hover { color: var(--text); }

.hero {
  width: min(var(--max), calc(100% - 48px));
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 70px;
  padding: 60px 0 100px;
}

.eyebrow, .section-label, .project-type {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 700;
}

.eyebrow { color: var(--accent); margin: 0 0 20px; }

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -.045em;
  line-height: 1.03;
  margin-top: 0;
}

h1 { font-size: clamp(3.8rem, 7vw, 7.4rem); max-width: 800px; margin-bottom: 28px; }
h1 span { color: var(--accent); }

.hero-text {
  max-width: 590px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.button {
  padding: 13px 20px;
  border: 1px solid var(--text);
  border-radius: 999px;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--text); color: white; }
.button.secondary { border-color: var(--line); }

.portrait-wrap {
  position: relative;
  width: min(100%, 470px);
  justify-self: end;
}
.portrait {
  width: 100%;
  display: block;
  border-radius: 30px;
  position: relative;
  z-index: 1;
  filter: saturate(.92);
}
.portrait-glow {
  position: absolute;
  width: 75%;
  height: 75%;
  right: -7%;
  bottom: -7%;
  background: #d8d0ff;
  border-radius: 50%;
  filter: blur(5px);
}
.portrait-tag {
  position: absolute;
  z-index: 2;
  left: -22px;
  bottom: 24px;
  padding: 10px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0;
  border-top: 1px solid var(--line);
}

.section-label { color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: .35fr 1fr;
  gap: 60px;
}
.about h2, .connect h2 { font-size: clamp(2.5rem, 5vw, 5rem); max-width: 850px; margin-bottom: 28px; }
.about p { max-width: 720px; color: var(--muted); font-size: 1.1rem; }

.section-heading { margin-bottom: 45px; }
.section-heading h2 { font-size: clamp(3rem, 6vw, 6rem); margin-top: 14px; }

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.project-card {
  min-height: 310px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(0,0,0,.07);
}
.project-card.featured { grid-row: span 2; min-height: 636px; background: #1a1918; color: white; }
.project-number { font: 600 1rem "Space Grotesk", sans-serif; color: var(--muted); }
.featured .project-number { color: #aaa7a0; }
.project-type { color: var(--muted); margin-bottom: 10px; }
.featured .project-type { color: #b8b5af; }
.project-card h3 { font-size: 2.25rem; margin-bottom: 14px; }
.project-card p:not(.project-type) { color: var(--muted); max-width: 530px; }
.featured p:not(.project-type) { color: #bbb8b2; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.tags span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
}
.featured .tags span { border-color: #44413e; }
.project-link { font-weight: 700; }

.connect {
  display: grid;
  grid-template-columns: .35fr 1fr;
  gap: 60px;
}
.connect-content p { color: var(--muted); font-size: 1.1rem; }
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.socials a {
  min-width: 145px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.socials a:hover { border-color: var(--text); }

.social-button {
  min-width: 145px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}
.social-button:hover { border-color: var(--text); }

/* Contact modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0,0,0,.18);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-header h2 {
  font-size: 1.6rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

#contact-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }

.field input,
.field textarea {
  font-family: "DM Sans", sans-serif;
  font-size: .95rem;
  color: var(--text);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field textarea { resize: vertical; }

#contact-submit { align-self: flex-start; }
#contact-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.contact-status {
  margin: 0;
  font-size: .85rem;
}
.contact-status[data-state="error"] { color: #b3261e; }
.contact-status[data-state="success"] { color: var(--accent); font-weight: 600; }

@media (max-width: 480px) {
  .modal { padding: 24px; border-radius: 18px; }
}

footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 45px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

@media (max-width: 800px) {
  .site-header { width: min(var(--max), calc(100% - 32px)); }
  nav { gap: 15px; }
  nav a:nth-child(1) { display: none; }

  .hero {
    width: min(var(--max), calc(100% - 32px));
    grid-template-columns: 1fr;
    padding-top: 35px;
  }
  .portrait-wrap { justify-self: center; max-width: 430px; }
  h1 { font-size: clamp(3.3rem, 16vw, 5.8rem); }

  .section, footer { width: min(var(--max), calc(100% - 32px)); }
  .about, .connect { grid-template-columns: 1fr; gap: 22px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-row: auto; min-height: 430px; }
  footer { gap: 20px; flex-direction: column; }
}