:root {
  --bg: #eef4ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #10213f;
  --muted: #65738d;
  --primary: #0d47a1;
  --primary-light: #1f6ed4;
  --accent: #e53935;
  --line: rgba(13, 71, 161, 0.14);
  --shadow: 0 30px 80px rgba(16, 33, 63, 0.14);
  --card-shadow: 0 15px 35px rgba(16, 33, 63, 0.08);
}

body.dark {
  --bg: #07111f;
  --surface: rgba(10, 24, 44, 0.9);
  --surface-solid: #0d1b30;
  --text: #eef5ff;
  --muted: #9eacc4;
  --primary: #5ea0ff;
  --primary-light: #81b5ff;
  --accent: #ff6b67;
  --line: rgba(129, 181, 255, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 110, 212, 0.17), transparent 30%),
    radial-gradient(circle at bottom right, rgba(229, 57, 53, 0.1), transparent 24%),
    var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.background-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  width: 260px;
  height: 260px;
  top: 8%;
  left: 4%;
  background: rgba(31, 110, 212, 0.12);
}

.orb-two {
  width: 220px;
  height: 220px;
  right: 5%;
  bottom: 8%;
  background: rgba(229, 57, 53, 0.09);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto;
}

.business-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 28px 48px 52px;
  background:
    linear-gradient(135deg, rgba(13, 71, 161, 0.09), transparent 45%),
    linear-gradient(315deg, rgba(229, 57, 53, 0.04), transparent 30%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 42px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-weight: 800;
  box-shadow: var(--card-shadow);
}

.brand-title,
.brand-subtitle,
.eyebrow,
.organisation,
.summary,
.project-category,
footer p,
.qr-panel p {
  margin: 0;
}

.brand-title {
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-solid);
  cursor: pointer;
  font-size: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.hero-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: center;
}

.profile-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--primary), var(--primary-light));
  box-shadow: var(--card-shadow);
}

.profile-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
}

.availability-dot {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 20px;
  height: 20px;
  border: 4px solid white;
  border-radius: 50%;
  background: #20c875;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}

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

.intro h1 {
  max-width: 760px;
  margin: 14px 0 12px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.intro h2 {
  margin: 0;
  color: var(--primary);
  font-size: 1.35rem;
}

.organisation {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}

.summary {
  max-width: 700px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.expertise span,
.credential-list span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 700;
}

.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 14px 28px rgba(13, 71, 161, 0.2);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-solid);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-card:last-child {
  border-right: 0;
}

.contact-card:hover {
  background: rgba(31, 110, 212, 0.06);
}

.contact-card span:last-child {
  min-width: 0;
}

.contact-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: var(--primary);
  font-weight: 800;
}

.contact-card small,
.contact-card strong {
  display: block;
}

.contact-card small {
  margin-bottom: 5px;
  color: var(--muted);
}

.contact-card strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-section,
.credentials-section,
.connect-section {
  padding: 56px 48px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h3,
.credentials-section h3,
.connect-section h3 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
}

.section-heading > p,
.connect-copy > p {
  color: var(--muted);
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  min-height: 295px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.project-number {
  position: absolute;
  right: 20px;
  top: 12px;
  color: rgba(13, 71, 161, 0.09);
  font-size: 4.6rem;
  font-weight: 800;
}

.project-category {
  position: relative;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card h4 {
  position: relative;
  margin: 34px 0 14px;
  font-size: 1.5rem;
}

.project-card > p:not(.project-category) {
  position: relative;
  color: var(--muted);
  line-height: 1.7;
}

.project-card a {
  position: absolute;
  left: 28px;
  bottom: 26px;
  color: var(--primary);
  font-weight: 800;
}

.credentials-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(13, 71, 161, 0.06), transparent);
}

.credential-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.connect-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 54px;
  align-items: center;
}

.connect-copy h3 {
  max-width: 680px;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.social-actions a {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--primary);
  background: var(--surface-solid);
  font-size: 0.9rem;
  font-weight: 800;
}

.qr-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.qr-panel img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.qr-panel p {
  margin-top: 12px;
  color: #10213f;
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  padding: 13px 18px;
  border-radius: 12px;
  color: white;
  background: #10213f;
  box-shadow: var(--card-shadow);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 290px 1fr;
    gap: 36px;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card:nth-child(2) {
    border-right: 0;
  }

  .contact-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .project-card {
    min-height: 240px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    margin: 10px auto;
  }

  .business-card {
    border-radius: 22px;
  }

  .hero,
  .content-section,
  .credentials-section,
  .connect-section {
    padding: 32px 22px;
  }

  .hero-grid,
  .section-heading,
  .credentials-section,
  .connect-section {
    grid-template-columns: 1fr;
  }

  .profile-area {
    max-width: 340px;
    margin: 0 auto;
  }

  .intro {
    text-align: center;
  }

  .expertise,
  .primary-actions,
  .social-actions {
    justify-content: center;
  }

  .section-heading {
    gap: 16px;
  }

  .connect-section {
    gap: 28px;
  }

  .qr-panel {
    width: min(260px, 100%);
    margin: 0 auto;
  }

  footer {
    flex-direction: column;
    padding: 22px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-subtitle {
    display: none;
  }

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

  .contact-card,
  .contact-card:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contact-card:last-child {
    border-bottom: 0;
  }

  .primary-actions .button {
    width: 100%;
  }
}
