:root {
  --page: #f7f8fb;
  --page-warm: #fff8f8;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.74);
  --navy: #081d43;
  --navy-2: #132b52;
  --ink: #10233f;
  --muted: #68758a;
  --pink: #f08b94;
  --pink-deep: #e87586;
  --pink-soft: #fff0f2;
  --line: rgba(8, 29, 67, 0.11);
  --line-strong: rgba(8, 29, 67, 0.18);
  --shadow-sm: 0 10px 30px rgba(8, 29, 67, 0.07);
  --shadow-md: 0 20px 55px rgba(8, 29, 67, 0.11);
  --shadow-lg: 0 32px 90px rgba(8, 29, 67, 0.16);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --max: 1180px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(240, 139, 148, 0.14), transparent 28rem),
    radial-gradient(circle at 94% 22%, rgba(8, 29, 67, 0.06), transparent 30rem),
    linear-gradient(180deg, var(--page-warm) 0, var(--page) 32rem, #f4f6fa 100%);
  font-family: "Estedad", "Vazirmatn", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image: radial-gradient(rgba(8, 29, 67, 0.12) 0.55px, transparent 0.55px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 58%);
}

body.modal-open {
  overflow: hidden;
}

::selection {
  color: #fff;
  background: var(--pink-deep);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--navy);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

button {
  font: inherit;
}

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

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

.site-shell {
  min-height: 100vh;
  overflow: clip;
}

.site-header,
.hero-section,
.intro-strip,
.works-section,
.services-section,
.contact-section,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: var(--header-height);
  margin-top: 16px;
  padding: 10px 14px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 118px;
  min-width: 118px;
  padding: 4px;
  border-radius: 12px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.brand:hover,
.brand:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
  outline: none;
}

.brand img {
  width: 100%;
  height: auto;
}

.site-nav {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 248, 251, 0.9);
}

.site-nav a,
.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.header-link:hover,
.header-link:focus-visible {
  color: var(--navy);
  background: var(--surface);
  transform: translateY(-1px);
  outline: none;
}

.site-nav a:first-child {
  color: var(--navy);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(8, 29, 67, 0.06);
}

.site-nav svg,
.header-link svg,
.footer-group svg,
.action svg,
.modal-close svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2.1;
}

/* Keep labels and icons visible even if the external icon library loads late or fails. */
.action span,
.site-nav a span,
.footer-group a span,
.project-card-footer > span:first-child {
  display: inline-block;
  color: currentColor;
  opacity: 1;
  visibility: visible;
}

.action svg,
.site-nav svg,
.footer-group svg,
.modal-close svg,
.project-arrow svg,
.project-play svg {
  display: block;
  color: currentColor;
  stroke: currentColor;
  opacity: 1;
  visibility: visible;
}

i[data-lucide] {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: currentColor;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

i[data-lucide="sparkles"]::before { content: "✦"; }
i[data-lucide="panels-top-left"]::before { content: "▦"; }
i[data-lucide="message-circle"]::before { content: "✉"; }
i[data-lucide="arrow-up-left"]::before { content: "↖"; }
i[data-lucide="phone-call"]::before { content: "☎"; }
i[data-lucide="instagram"]::before { content: "◎"; }
i[data-lucide="linkedin"]::before { content: "in"; font-size: 11px; }
i[data-lucide="external-link"]::before { content: "↗"; }
i[data-lucide="send"]::before { content: "➤"; }
i[data-lucide="play"]::before { content: "▶"; font-size: 12px; }
i[data-lucide="x"]::before { content: "×"; font-size: 21px; font-weight: 500; }

/* Shared typography */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  color: var(--pink-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-label::before {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--pink);
  content: "";
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.56fr);
  gap: 28px 52px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading .section-label {
  grid-column: 1 / -1;
  margin-bottom: -14px;
}

.section-heading h2,
.contact-section h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.45vw, 2.35rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.035em;
}

.section-heading p,
.contact-section p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 2;
}

/* Hero */
.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(350px, 0.84fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: center;
  min-height: min(690px, calc(100svh - 110px));
  padding: clamp(68px, 8vw, 104px) 0 clamp(72px, 9vw, 116px);
}

.hero-section::after {
  position: absolute;
  right: -12%;
  bottom: 10%;
  z-index: -1;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(240, 139, 148, 0.09);
  filter: blur(2px);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
}

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(2.25rem, 4.4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 670px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  font-weight: 500;
  line-height: 2.1;
}

.hero-actions,
.contact-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.action:hover,
.action:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.action.primary {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 12px 28px rgba(8, 29, 67, 0.16);
}

.action.primary:hover,
.action.primary:focus-visible {
  background: var(--navy-2);
  box-shadow: 0 16px 34px rgba(8, 29, 67, 0.2);
}

.action.secondary {
  color: var(--navy);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.action.secondary:hover,
.action.secondary:focus-visible {
  color: var(--pink-deep);
  border-color: rgba(232, 117, 134, 0.32);
  background: #fff;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  inset: 2% -5% 9% -4%;
  z-index: -3;
  border: 2px solid rgba(240, 139, 148, 0.42);
  border-radius: 50%;
  transform: rotate(-10deg);
  content: "";
  animation: orbitDrift 8s ease-in-out infinite;
}

.hero-visual::after {
  position: absolute;
  inset: 14% 8% 15% 0;
  z-index: -3;
  border: 1px solid rgba(8, 29, 67, 0.14);
  border-radius: 50%;
  transform: rotate(9deg);
  content: "";
  animation: orbitDriftReverse 10s ease-in-out infinite;
}

.logo-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(94%, 500px);
  min-height: 350px;
  padding: 30px;
}

.logo-panel::before {
  position: absolute;
  inset: 22% 4% 20%;
  z-index: -2;
  border: 1px solid rgba(8, 29, 67, 0.13);
  border-radius: 50%;
  transform: rotate(-7deg);
  content: "";
  animation: orbitDriftInner 12s ease-in-out infinite;
}

.logo-panel::after {
  position: absolute;
  inset: 12% 0 10%;
  z-index: -3;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(244, 244, 249, 0.72) 48%, rgba(240, 139, 148, 0.05) 74%, transparent 100%);
  filter: blur(3px);
  content: "";
}

.logo-panel img {
  width: min(100%, 405px);
  height: auto;
  filter: drop-shadow(0 28px 34px rgba(8, 29, 67, 0.15));
  animation: logoFloat 6s ease-in-out infinite;
}

.hero-note {
  position: absolute;
  left: 1%;
  bottom: 7%;
  z-index: 2;
  display: grid;
  gap: 3px;
  width: min(78%, 330px);
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #fff;
  background: rgba(8, 29, 67, 0.94);
  box-shadow: var(--shadow-md);
}

.hero-note span {
  color: var(--pink);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  direction: ltr;
  text-align: left;
}

.hero-note strong {
  font-size: 0.9rem;
  line-height: 1.7;
}


/* Sections */
.works-section,
.services-section {
  padding-bottom: clamp(86px, 10vw, 132px);
}

.works-section .section-heading {
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.52fr);
}

.work-group {
  display: grid;
  gap: 20px;
}

.work-group + .work-group {
  margin-top: clamp(44px, 6vw, 70px);
}

.work-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.work-group-heading span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--pink-deep);
  background: var(--pink-soft);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  direction: ltr;
}

.work-group-heading h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

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

.project-card {
  --project-accent: var(--pink);
  --project-secondary: var(--navy);
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 1px solid rgba(8, 29, 67, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(232, 117, 134, 0.35);
  box-shadow: var(--shadow-md);
  outline: none;
}

/*
  Portfolio image standard
  ------------------------
  Export desktop and UI/UX preview images at 1600 × 1000 px (16:10).
  1440 × 900 px also uses the same ratio. Images are shown with object-fit:
  contain, so nothing is cropped even when a different image size is used.
*/
.project-preview {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border-bottom: 1px solid rgba(8, 29, 67, 0.07);
  background:
    radial-gradient(circle at 8% 12%, rgba(240, 139, 148, 0.1), transparent 34%),
    linear-gradient(180deg, #fafbfe, #f0f3f8);
  overflow: hidden;
}

.preview-frame {
  position: relative;
  width: 100%;
  height: auto;
}

.preview-frame.is-browser {
  border: 1px solid rgba(8, 29, 67, 0.13);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(8, 29, 67, 0.1);
  overflow: hidden;
}

.browser-chrome {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  border-bottom: 1px solid rgba(8, 29, 67, 0.08);
  background: linear-gradient(180deg, #fcfdff, #f1f4f8);
}

.browser-chrome::before {
  width: 7px;
  height: 7px;
  margin-left: 17px;
  border-radius: 50%;
  background: rgba(240, 139, 148, 0.95);
  box-shadow: 14px 0 0 rgba(8, 29, 67, 0.18), 28px 0 0 rgba(8, 29, 67, 0.1);
  content: "";
}

.browser-chrome::after {
  width: min(42%, 180px);
  height: 8px;
  margin-inline: auto;
  border-radius: 999px;
  background: rgba(8, 29, 67, 0.075);
  content: "";
}

.preview-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #fff;
  overflow: hidden;
}

.preview-viewport > img,
.preview-viewport > video,
.preview-viewport > .project-mockup {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #fff;
}

.preview-viewport > img,
.preview-viewport > video {
  object-fit: contain;
  object-position: center top;
}

.project-card.frame-mobile .project-preview {
  background:
    radial-gradient(circle at 50% 44%, rgba(240, 139, 148, 0.16), transparent 42%),
    linear-gradient(145deg, #0a2048, #132f5c);
}

.preview-frame.is-mobile {
  width: min(94%, 680px);
  margin-inline: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.preview-frame.is-mobile .preview-viewport {
  border-radius: 11px;
}

.preview-frame.is-mobile .preview-viewport > img,
.preview-frame.is-mobile .preview-viewport > video,
.preview-frame.is-mobile .preview-viewport > .project-mockup {
  border-radius: 11px;
}

.preview-frame.is-mobile .preview-viewport > img,
.preview-frame.is-mobile .preview-viewport > video {
  object-fit: contain;
  object-position: center;
}

.modal-media img,
.modal-media video {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.project-play {
  position: absolute;
  left: 26px;
  bottom: 26px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(8, 29, 67, 0.18);
  backdrop-filter: blur(12px);
}

.project-play svg {
  width: 19px;
  height: 19px;
  fill: rgba(240, 139, 148, 0.18);
  stroke-width: 2.5;
}

.project-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 285px;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(23px, 2.7vw, 31px);
}

.project-kind {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--pink-deep);
  background: var(--pink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.7;
}

.project-card h3 {
  width: 100%;
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.025em;
  text-align: start;
  unicode-bidi: plaintext;
}

.project-card h3:dir(ltr),
#modalTitle:dir(ltr) {
  font-family: "Manrope", Arial, sans-serif;
  letter-spacing: -0.035em;
}

.project-card p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.95;
}

.project-mini-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.project-mini-details span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--pink-deep);
  background: var(--pink-soft);
  transition: transform 180ms ease;
}

.project-arrow svg {
  width: 16px;
  height: 16px;
}

.project-card:hover .project-arrow,
.project-card:focus-visible .project-arrow {
  transform: translate(-2px, -2px);
}

.project-mockup {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(240, 139, 148, 0.12));
  overflow: hidden;
}

.project-mockup::before {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-10deg);
  content: "";
}

.mock-device {
  position: relative;
  width: 55%;
  aspect-ratio: 4 / 3;
  border: 8px solid rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--project-accent), var(--project-secondary));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

.mock-stack {
  position: absolute;
  right: 12%;
  bottom: 12%;
  display: grid;
  gap: 6px;
  width: 34%;
}

.mock-stack span {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.8);
}

.mock-stack span:nth-child(2) {
  width: 75%;
}

.mock-stack span:nth-child(3) {
  width: 52%;
}

.project-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.66rem;
  font-weight: 800;
}

.project-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 28px;
  border: 1px dashed rgba(232, 117, 134, 0.35);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
  font-weight: 700;
}


/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  min-height: 250px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 26px rgba(8, 29, 67, 0.045);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-card::after {
  position: absolute;
  left: -52px;
  bottom: -66px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--pink-soft);
  content: "";
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 117, 134, 0.28);
  box-shadow: var(--shadow-sm);
}

.service-card span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 28px;
  border-radius: 11px;
  color: var(--pink-deep);
  background: var(--pink-soft);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  direction: ltr;
}

.service-card h3,
.service-card p {
  position: relative;
  z-index: 1;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: -0.025em;
}

.service-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 2;
}

/* Contact */
.contact-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px 60px;
  align-items: center;
  margin-bottom: 84px;
  padding: clamp(30px, 5vw, 52px);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(125deg, rgba(8, 29, 67, 0.98), rgba(19, 43, 82, 0.94)),
    var(--navy);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.contact-section::before {
  position: absolute;
  left: -90px;
  top: -128px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(240, 139, 148, 0.35);
  border-radius: 50%;
  content: "";
}

.contact-section > * {
  position: relative;
  z-index: 1;
}

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

.contact-section h2 {
  color: #fff;
}

.contact-section p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-section .action.primary {
  color: var(--navy);
  background: #fff;
  box-shadow: none;
}

.contact-section .action.primary:hover,
.contact-section .action.primary:focus-visible {
  color: var(--pink-deep);
  background: #fff;
}

.contact-section .action.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.contact-section .action.secondary:hover,
.contact-section .action.secondary:focus-visible {
  border-color: rgba(240, 139, 148, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.contact-actions {
  justify-content: flex-end;
}

/* Footer */
.site-footer {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(170px, 0.55fr) minmax(210px, 0.65fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  padding: 36px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-brand,
.footer-group {
  display: grid;
  justify-items: start;
}

.footer-brand {
  gap: 12px;
}

.footer-logo {
  display: inline-flex;
  width: 112px;
}

.footer-logo img {
  width: 100%;
  height: auto;
}

.footer-brand p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.footer-group {
  gap: 8px;
}

.footer-group h3 {
  margin: 0 0 7px;
  font-size: 0.88rem;
  font-weight: 800;
}

.footer-group a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.footer-group a:hover,
.footer-group a:focus-visible {
  color: var(--pink-deep);
  outline: none;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 32, 0.62);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1fr);
  width: min(1050px, 100%);
  max-height: min(780px, calc(100svh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(8, 29, 67, 0.1);
  border-radius: 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--pink-deep);
  outline: none;
}

.modal-media {
  min-height: 420px;
  padding: 22px;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
}

.modal-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(34px, 5vw, 58px);
  overflow: auto;
}

.modal-content .project-kind {
  margin-bottom: 14px;
}

.modal-content h2 {
  width: 100%;
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.35;
  text-align: start;
  unicode-bidi: plaintext;
}

.modal-content > p:not(.project-kind) {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 2.05;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.detail-list:empty {
  display: none;
}

.detail-list li {
  position: relative;
  padding: 7px 12px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.modal-actions {
  margin-top: auto;
}

.is-hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-section {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 36px;
  }

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

  .project-card-body {
    min-height: 250px;
  }

  .modal-panel {
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header,
  .hero-section,
  .intro-strip,
  .works-section,
  .services-section,
  .contact-section,
  .site-footer {
    width: min(var(--max), calc(100% - 28px));
  }

  .site-header {
    top: 10px;
    grid-template-columns: auto 1fr;
    gap: 14px;
    min-height: 64px;
    margin-top: 10px;
    padding: 8px 10px;
  }

  .brand {
    width: 104px;
    min-width: 104px;
  }

  .site-nav {
    justify-self: end;
  }

  .site-nav a {
    min-height: 37px;
    padding: 7px 10px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: auto;
    padding: 68px 0 88px;
  }

  .hero-copy {
    max-width: 720px;
  }

  h1 {
    max-width: 620px;
    font-size: clamp(2.15rem, 8.5vw, 3.6rem);
  }

  .hero-visual {
    min-height: 365px;
  }

  .logo-panel {
    min-height: 260px;
  }

  .hero-note {
    left: 4%;
  }

  .section-heading,
  .works-section .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-heading .section-label {
    margin-bottom: -8px;
  }

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

  .service-card {
    min-height: 0;
  }

  .contact-actions {
    justify-content: flex-start;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .modal-panel {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-media {
    min-height: 300px;
    max-height: 42svh;
  }

  .modal-content {
    overflow: visible;
  }
}

@media (max-width: 580px) {
  body {
    font-size: 15px;
  }

  .site-header {
    border-radius: 17px;
  }

  .site-nav {
    gap: 2px;
    padding: 3px;
  }

  .brand {
    width: 92px;
    min-width: 92px;
  }

  .site-nav a {
    gap: 5px;
    min-width: 0;
    padding: 6px 7px;
    font-size: 0.7rem;
  }

  .site-nav a span {
    display: inline-block;
    color: currentColor;
    opacity: 1;
    visibility: visible;
  }

  .site-nav svg,
  .site-nav i[data-lucide] {
    width: 15px;
    height: 15px;
  }

  .hero-section {
    padding: 54px 0 74px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 10.8vw, 2.9rem);
    line-height: 1.22;
  }

  .hero-lead {
    font-size: 0.93rem;
    line-height: 2;
  }

  .hero-visual {
    min-height: 290px;
  }

  .hero-visual::before {
    inset: 7% 0 18%;
  }

  .logo-panel {
    width: 96%;
    min-height: 210px;
    padding: 20px;
  }

  .hero-note {
    left: 0;
    bottom: 2%;
    width: min(90%, 310px);
    padding: 13px 14px;
  }

  .section-heading {
    gap: 16px;
    margin-bottom: 26px;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 1.48rem;
  }

  .work-group-heading {
    align-items: center;
  }

  .project-preview {
    padding: 10px;
  }

  .browser-chrome {
    height: 32px;
  }

  .browser-chrome::before {
    margin-left: 14px;
  }

  .project-card-body {
    min-height: 270px;
    padding: 23px;
  }

  .project-card h3 {
    font-size: 1.25rem;
  }

  .service-card {
    padding: 23px;
  }

  .contact-section {
    margin-bottom: 64px;
    padding: 26px 22px;
    border-radius: 24px;
  }

  .contact-actions,
  .modal-actions {
    width: 100%;
  }

  .contact-actions .action,
  .modal-actions .action {
    flex: 1 1 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100svh - 20px);
    border-radius: 22px;
  }

  .modal-close {
    top: 12px;
    left: 12px;
  }

  .modal-media {
    min-height: 230px;
    padding: 14px;
  }

  .modal-content {
    padding: 27px 22px;
  }
}


@keyframes logoFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.6deg);
  }

  50% {
    transform: translate3d(0, -10px, 0) rotate(0.6deg);
  }
}

@keyframes orbitDrift {
  0%,
  100% {
    transform: rotate(-10deg) scale(1);
  }

  50% {
    transform: rotate(-5deg) scale(1.025);
  }
}

@keyframes orbitDriftReverse {
  0%,
  100% {
    transform: rotate(9deg) scale(1);
  }

  50% {
    transform: rotate(5deg) scale(0.985);
  }
}

@keyframes orbitDriftInner {
  0%,
  100% {
    transform: rotate(-7deg) scale(1);
  }

  50% {
    transform: rotate(-2deg) scale(1.018);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
