:root {
  --bg: #f8f7f4;
  --text: #111111;
  --muted: #5f5d58;
  --ink: #070707;
  --line: rgba(17, 17, 17, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --accent: #2f3130;
  --accent-soft: rgba(17, 17, 17, 0.08);
  --shadow: 0 28px 80px rgba(20, 16, 12, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

* {
  min-width: 0;
}

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

body {
  margin: 0;
  font-family: "Thmanyah", "ثمانية", "Noto Kufi Arabic", system-ui, sans-serif;
  background:
    radial-gradient(circle at 17% 16%, rgba(0, 0, 0, 0.075) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 20%, rgba(0, 0, 0, 0.045) 0 2px, transparent 3px),
    radial-gradient(circle at 12% 75%, rgba(0, 0, 0, 0.06) 0 3px, transparent 4px),
    radial-gradient(ellipse at 22% 18%, rgba(17, 17, 17, 0.07), transparent 34%),
    radial-gradient(ellipse at 82% 78%, rgba(17, 17, 17, 0.06), transparent 30%),
    linear-gradient(180deg, #fbfaf8 0%, #f7f6f2 48%, #fbfaf7 100%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.75;
  word-break: normal;
  overflow-wrap: break-word;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  z-index: -1;
  background-image:
    radial-gradient(circle at 22% 34%, rgba(0, 0, 0, 0.07) 0 1px, transparent 2px),
    linear-gradient(rgba(0, 0, 0, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.014) 1px, transparent 1px);
  background-size: 180px 180px, 46px 46px, 46px 46px;
}

.hero-copy,
.section-heading,
.about-card,
.skill-card,
.service-card,
.project-card,
.step,
.contact-panel,
.featured-project,
.footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 22px clamp(18px, 5vw, 58px);
  transition: 0.25s ease;
}

.site-header.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(248, 247, 244, 0.84);
  backdrop-filter: blur(20px) saturate(1.08);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.nav-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.nav-links,
.social-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
  flex-wrap: wrap;
}

.social-links,
.header-actions {
  justify-content: flex-start;
  direction: ltr;
}

.nav-links a,
.social-links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(17, 17, 17, 0.78);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.lang-switch,
.icon-link {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.icon-link,
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link[aria-label="LinkedIn"] svg,
.icon-link[aria-label="GitHub"] svg {
  fill: currentColor;
  stroke: none;
}

.lang-switch {
  width: auto;
  min-width: 82px;
  gap: 6px;
  padding: 4px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 34px rgba(17, 17, 17, 0.16);
}

.lang-switch span {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
}

.lang-current {
  background: #fff;
  color: var(--ink);
}

.lang-next {
  color: rgba(255, 255, 255, 0.72);
}

.lang-switch:hover,
.icon-link:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: #fff;
}

.lang-switch:hover {
  background: #242424;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  place-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: 999px;
}

.section {
  padding: clamp(74px, 10vw, 128px) clamp(18px, 6vw, 76px);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding-top: 110px;
  direction: ltr;
}

.hero-art {
  position: relative;
  min-height: clamp(430px, 62vw, 720px);
  display: grid;
  place-items: center;
  padding: 0;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: min(72%, 420px);
  height: min(72%, 420px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at center, rgba(17, 17, 17, 0.08), transparent 64%);
  filter: blur(2px);
  z-index: -2;
}

.portrait-card {
  position: relative;
  width: min(100%, 610px);
  aspect-ratio: 0.74;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  padding: 0;
}

.portrait-card::before {
  display: none;
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset: auto 4% -18px;
  height: 70px;
  background: radial-gradient(ellipse at center, rgba(17, 17, 17, 0.12), transparent 70%);
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

.portrait-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
  filter: saturate(0.98) contrast(1.04) drop-shadow(0 22px 34px rgba(17, 17, 17, 0.1));
  transform: none;
  border-radius: 0;
  background: transparent;
}

.ink-cloud {
  position: absolute;
  width: min(76vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 48%, rgba(0, 0, 0, 0.2) 0 3%, transparent 4%),
    radial-gradient(circle at 58% 28%, rgba(0, 0, 0, 0.18) 0 4%, transparent 5%),
    radial-gradient(circle at 24% 70%, rgba(0, 0, 0, 0.16) 0 5%, transparent 6%),
    radial-gradient(circle at 64% 70%, rgba(0, 0, 0, 0.12) 0 7%, transparent 8%),
    radial-gradient(circle at center, rgba(17, 17, 17, 0.16), transparent 56%);
  filter: blur(1px);
  transform: rotate(-8deg) scale(1.02);
  opacity: 0.82;
}

.hero-copy {
  max-width: 660px;
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] .hero-copy {
  direction: ltr;
  text-align: left;
}

.eyebrow,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.06);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.55vw, 4.65rem);
  line-height: 1.32;
  letter-spacing: 0;
  max-width: 820px;
  text-wrap: balance;
  overflow-wrap: normal;
}

.hero h1::after {
  content: "";
  display: block;
  width: 160px;
  height: 10px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--ink), rgba(17, 17, 17, 0.14), transparent);
  border-radius: 999px;
}

.hero-summary {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--muted);
  line-height: 2.08;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
  justify-content: flex-start;
}

.btn {
  min-height: 54px;
  padding: 0 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: 0.25s ease;
}

.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.18);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.16);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin-top: 34px;
}

.hero-metrics div {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.hero-metrics strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
  position: relative;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.35vw, 4rem);
  line-height: 1.24;
  font-weight: 900;
  text-wrap: balance;
  position: relative;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: min(210px, 38vw);
  height: 9px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink), rgba(17, 17, 17, 0.12), transparent);
}

.about-grid,
.cards,
.project-grid,
.skills-grid,
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(24, 21, 30, 0.86)),
    var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.featured-project::before {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(26px);
}

.project-content {
  position: relative;
  z-index: 1;
}

.featured-project h3 {
  margin: 16px 0;
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  line-height: 1.25;
}

.featured-project p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.95;
  max-width: 760px;
}

.project-points {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0 28px;
}

.project-points span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.55;
}

.featured-project .btn.primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.project-preview {
  position: relative;
  z-index: 1;
  min-height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.browser-bar {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.65;
}

.preview-lines {
  padding: 34px;
  display: grid;
  gap: 18px;
}

.preview-lines strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
}

.preview-lines span {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.preview-lines span:nth-child(2) {
  width: 92%;
}

.preview-lines span:nth-child(3) {
  width: 72%;
}

.preview-lines span:nth-child(4) {
  width: 48%;
  height: 96px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
}

.about-card,
.skill-card,
.service-card,
.project-card,
.step,
.contact-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 16px 50px rgba(20, 16, 12, 0.07);
  backdrop-filter: blur(18px);
}

.about-card h3,
.service-card h3,
.project-card h3,
.step h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  font-weight: 900;
  color: var(--ink);
}

.about-card p,
.service-card p,
.project-card p,
.step p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.skills {
  padding-top: 34px;
}

.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.25s ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.6)),
    var(--panel);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--ink), rgba(17, 17, 17, 0.2), transparent);
  opacity: 0.65;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.skill-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.skill-card span {
  color: var(--muted);
  line-height: 1.75;
}

.project-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.icon,
.step strong {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  margin-bottom: 22px;
}

.service-card,
.project-card,
.step {
  transition: 0.25s ease;
}

.service-card:hover,
.project-card:hover,
.step:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.process {
  padding-top: 40px;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(26px, 5vw, 60px);
  align-items: start;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.96), rgba(17, 17, 17, 0.84)),
    var(--ink);
  color: #fff;
  overflow: hidden;
}

.contact-panel h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.15;
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.7);
}

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

.contact-form label {
  display: grid;
  gap: 9px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 16px;
  outline: none;
  resize: vertical;
  transition: 0.25s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.contact-form .btn {
  width: fit-content;
  min-width: 170px;
  grid-column: 1 / -1;
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.contact-form .btn:hover {
  background: #2a2a2a;
  color: #fff;
  border-color: #2a2a2a;
}

.form-message {
  grid-column: 1 / -1;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
}

.form-message.show {
  display: flex;
}

.form-message.success {
  background: rgba(46, 213, 115, 0.16);
  border-color: rgba(46, 213, 115, 0.34);
}

.form-message.error {
  background: rgba(255, 87, 87, 0.16);
  border-color: rgba(255, 87, 87, 0.34);
}

.footer {
  padding: 28px clamp(18px, 6vw, 76px) 42px;
  display: flex;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  line-height: 1.8;
}

.footer-divider {
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  background: rgba(17, 17, 17, 0.24);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 80;
  background: rgba(17, 17, 17, 0.04);
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.35), #080808, rgba(17, 17, 17, 0.35));
  box-shadow: 0 0 18px rgba(17, 17, 17, 0.28);
  transition: width 0.12s ease-out;
}

.floating-actions {
  position: fixed;
  right: clamp(18px, 4vw, 34px);
  bottom: clamp(42px, 6vw, 72px);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  direction: ltr;
  z-index: 70;
}

.back-to-top,
.whatsapp-float {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  box-shadow: 0 20px 48px rgba(17, 17, 17, 0.16);
  backdrop-filter: blur(18px);
  transition: 0.25s ease;
}

.back-to-top {
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.whatsapp-float {
  width: 104px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 900;
  background: rgba(17, 17, 17, 0.92);
  color: #fff;
  border-color: rgba(17, 17, 17, 0.92);
}

.back-to-top:hover,
.whatsapp-float:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-3px);
}

.whatsapp-float:hover {
  background: #1f8f4d;
  border-color: #1f8f4d;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rotateSlow {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding: 12px 14px;
  }

  .nav-shell {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .menu-toggle {
    display: grid;
  }

  .social-links {
    display: none;
  }

  .header-actions {
    justify-self: end;
    gap: 5px;
  }

  .icon-link {
    width: 38px;
    height: 38px;
  }

  .icon-link svg {
    width: 17px;
    height: 17px;
  }

  .lang-switch {
    min-width: 68px;
    height: 38px;
  }

  .lang-switch span {
    min-width: 29px;
    height: 29px;
    font-size: 0.72rem;
  }

  .nav-links {
    position: fixed;
    inset: 78px 18px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(247, 245, 241, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: rgba(17, 17, 17, 0.06);
  }

  .nav-links a::after {
    display: none;
  }

  .hero,
  .featured-project,
  .contact-panel {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding-top: 96px;
    gap: 12px;
  }

  .hero-copy {
    text-align: center;
    margin: 0 auto;
    direction: inherit;
  }

  html[dir="ltr"] .hero-copy {
    text-align: center;
  }

  .hero h1::after {
    margin-inline: auto;
  }

  .hero-summary,
  .hero-metrics {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .about-grid,
  .cards,
  .project-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

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

  .skill-card {
    min-height: 132px;
  }
}

@media (max-width: 560px) {
  .section {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .site-header {
    padding-left: 10px;
    padding-right: 10px;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
    gap: 4px;
  }

  .menu-toggle span {
    width: 17px;
  }

  .header-actions {
    gap: 3px;
  }

  .icon-link {
    width: 33px;
    height: 33px;
  }

  .icon-link svg {
    width: 15px;
    height: 15px;
  }

  .lang-switch {
    min-width: 60px;
    height: 33px;
    padding: 3px;
  }

  .lang-switch span {
    min-width: 25px;
    height: 25px;
    font-size: 0.66rem;
  }

  .hero-art {
    min-height: auto;
    padding: 0;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    transform: translateY(-18px);
  }

  .portrait-card {
    width: clamp(118px, 39vw, 158px);
    padding: 0;
    border-radius: 0;
    aspect-ratio: 0.72;
  }

  .portrait-card::after,
  .ink-cloud,
  .hero-art::before {
    display: none;
  }

  .hero-copy {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    margin: 0;
    align-self: start;
    max-width: none;
    padding-top: 4px;
  }

  html[dir="ltr"] .hero-copy {
    text-align: left;
  }

  .hero {
    min-height: auto;
    display: grid;
    direction: ltr;
    grid-template-columns: clamp(118px, 39vw, 158px) minmax(0, 1fr);
    gap: clamp(12px, 4vw, 18px);
    align-items: start;
    padding-top: 84px;
    padding-bottom: 42px;
  }

  .eyebrow,
  .section-heading span {
    padding: 6px 9px;
    margin-bottom: 12px;
    font-size: 0.62rem;
    line-height: 1.5;
  }

  .hero h1 {
    font-size: clamp(1.05rem, 5.25vw, 1.58rem);
    line-height: 1.5;
    max-width: 100%;
  }

  .hero h1::after {
    width: 88px;
    height: 7px;
    margin-top: 12px;
    margin-inline: 0;
  }

  .hero-summary {
    margin-top: 12px;
    line-height: 1.95;
    font-size: 0.74rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions {
    grid-column: 1 / -1;
    margin-top: 18px;
    gap: 10px;
    justify-content: stretch;
  }

  .hero-actions .btn {
    width: calc(50% - 5px);
    min-height: 44px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: center;
  }

  .hero-metrics {
    display: none;
  }

  .nav-shell {
    gap: 8px;
  }

  .section-heading h2 {
    font-size: clamp(1.42rem, 7.4vw, 2.1rem);
    line-height: 1.42;
  }

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

  .section-heading h2::after {
    width: 118px;
    height: 7px;
    margin-top: 14px;
  }

  .about-card,
  .service-card,
  .project-card,
  .step,
  .contact-panel {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .about-card h3,
  .service-card h3,
  .project-card h3,
  .step h3 {
    font-size: 1.18rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .about-card p,
  .service-card p,
  .project-card p,
  .step p,
  .contact-panel p {
    font-size: 0.88rem;
    line-height: 2;
  }

  .skills-grid {
    display: flex;
    gap: 12px;
    margin-inline: -16px;
    padding: 2px 16px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .skill-card {
    flex: 0 0 min(72vw, 260px);
    min-height: 116px;
    scroll-snap-align: start;
    padding: 20px;
  }

  .skill-card strong {
    font-size: 1.25rem;
  }

  .skill-card span {
    font-size: 0.84rem;
    line-height: 1.7;
  }

  .featured-project {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .featured-project h3,
  .contact-panel h2 {
    font-size: clamp(1.45rem, 7vw, 2.05rem);
    line-height: 1.42;
  }

  .featured-project p {
    font-size: 0.88rem;
    line-height: 2;
  }

  .project-points {
    gap: 8px;
  }

  .project-points span {
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 8px 11px;
  }

  .contact-panel {
    padding: 22px 16px;
    border-radius: 24px;
  }

  .contact-panel h2 {
    font-size: clamp(1.65rem, 9vw, 2.4rem);
    line-height: 1.28;
  }

  .form-message {
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-copy {
    gap: 10px;
    font-size: 0.88rem;
  }

  .footer-divider {
    height: 18px;
  }

  .back-to-top {
    width: 46px;
    height: 46px;
  }

  .floating-actions {
    right: 16px;
    bottom: 24px;
    gap: 8px;
  }

  .whatsapp-float {
    width: 92px;
    height: 46px;
    border-radius: 12px;
    font-size: 0.76rem;
  }
}

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