:root {
  --bg-0: #132119;
  --bg-1: #0f1b16;
  --bg-2: #0c1511;

  --card: rgba(18, 31, 24, 0.8);
  --card-2: rgba(13, 24, 18, 0.78);

  --text: #f5f7f2;
  --muted: rgba(245, 247, 242, 0.68);

  --accent: #6b8e23;
  --accent-2: #5f7f20;
  --primary: #788f52;
  --white: #ffffff;

  --border: rgba(107, 142, 35, 0.28);
  --border-2: rgba(245, 247, 242, 0.16);

  --shadow: 0 24px 60px rgba(8, 12, 10, 0.55);
  --radius: 18px;
  --header-offset: 90px;

  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;

  --container: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(1200px 520px at 50% 12%, rgba(120, 143, 82, 0.28), transparent 65%),
              radial-gradient(900px 520px at 20% 24%, rgba(107, 142, 35, 0.12), transparent 60%),
              linear-gradient(180deg, #101914 0%, #0b120f 100%);
  overflow-x: hidden;
  padding-top: var(--header-offset);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { line-height: 1.6; }
h1,h2,h3,h4 {
  line-height: 1.15;
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Background helpers */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.bg__radial {
  position: absolute;
  width: 540px;
  height: 540px;
  filter: blur(60px);
  opacity: 0.35;
  border-radius: 999px;
}
.bg__radial--a { opacity: 0; }
.bg__radial--b { opacity: 0; }
.bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 140px 140px;
  mask-image: radial-gradient(1000px 520px at 50% 20%, black 45%, transparent 78%);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 18px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 26, 20, 0.9), rgba(12, 20, 16, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(7, 12, 9, 0.45);
}

/* Intro */
.intro {
  position: relative;
  height: calc(100vh - var(--header-offset));
  height: calc(100svh - var(--header-offset));
  padding-top: var(--header-offset);
  margin-top: calc(-1 * var(--header-offset));
  display: grid;
  align-items: center;
  overflow: hidden;
  z-index: 2;
}
.intro__bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/intro-bg.webp");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) brightness(0.7);
  transform: scale(1.02);
  z-index: -2;
}
.intro__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 10, 0.82), rgba(8, 12, 10, 0.7));
  z-index: -1;
}
.intro__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
.intro__title {
  margin-top: 16px;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  letter-spacing: -0.04em;
  font-family: var(--font-display);
}
.intro__role {
  margin-top: 10px;
  font-weight: 700;
  color: rgba(245, 247, 242, 0.86);
}
.intro__desc {
  margin-top: 12px;
  max-width: 52ch;
}
.intro__media {
  display: flex;
  justify-content: flex-end;
}
.intro__profile {
  width: min(320px, 82vw);
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 10, 0.25);
  box-shadow: var(--shadow);
}
.intro__profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.intro__hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.page {
  transition: clip-path 600ms ease, opacity 600ms ease, transform 600ms ease;
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateY(0);
  will-change: clip-path, opacity, transform;
}

body.intro-active {
  overflow: hidden;
}
body.intro-active .page {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transform: translateY(24px);
}
body.intro-active .header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}
.header {
  transition: opacity 400ms ease, transform 400ms ease;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.1rem;
}
.brand__dev { color: var(--accent); }
.brand__ali { color: var(--white); }
.brand__dot { color: var(--text); opacity: 0.9; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 10, 0.35);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: rgba(245, 247, 242, 0.9);
  border-radius: 999px;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 0;
  margin: 0;
  align-items: center;
}
.nav__link {
  font-size: 0.95rem;
  color: rgba(245, 247, 242, 0.78);
  padding: 8px 10px;
  border-radius: 999px;
  transition: 180ms ease;
  position: relative;
}
.nav__link:hover {
  color: var(--white);
  background: rgba(107, 142, 35, 0.16);
  border: 1px solid rgba(107, 142, 35, 0.24);
}
.nav__link.is-active {
  color: var(--white);
  background: rgba(107, 142, 35, 0.25);
  border: 1px solid rgba(107, 142, 35, 0.35);
}

.nav__icons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 10, 0.28);
  transition: 180ms ease;
}
.iconbtn svg { width: 18px; height: 18px; opacity: 0.9; }
.iconbtn:hover {
  transform: translateY(-1px);
  border-color: rgba(107, 142, 35, 0.36);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}
.langbtn {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 10, 0.28);
  color: rgba(245, 247, 242, 0.92);
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}
.langbtn:hover {
  transform: translateY(-1px);
  border-color: rgba(107, 142, 35, 0.36);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}
.langbtn--ghost {
  border-color: rgba(107, 142, 35, 0.35);
  background: rgba(107, 142, 35, 0.12);
}

/* Sections */
.section {
  padding: 66px 0;
  position: relative;
  z-index: 1;
  border-top: 0;
}
.section::before {
  content: "";
  position: absolute;
  inset: 0;
   background: radial-gradient(90px 230px at 50% 0%, rgba(169, 251, 4, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.section__head {
  text-align: center;
  margin-bottom: 22px;
  margin-top: 0;
}
.head-about { margin-top: 0; margin-bottom: 22px; }
.head-skills { margin-top: 0; margin-bottom: 22px; }
.head-contact { margin-top: 0; margin-bottom: 22px; }
.section__title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 09px;
}
.section__title::after {
  content: ":";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  opacity: 0.9;
}
.section__subtitle {
  margin-top: 6px;
  color: rgba(245, 247, 242, 0.7);
  max-width: 60ch;
  margin-inline: auto;
}

.accent { color: var(--accent); }

/* Animation */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}
.fade-up.show {
  animation: fadeUp 0.8s ease forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ahed-card-wrapper {
  border-radius: var(--radius);
  box-shadow: 0 0 0 0 rgba(107, 142, 35, 0);
  transition: box-shadow 0.3s ease;
}
/* glow on the border only */
.ahed-card-wrapper:hover {
  box-shadow:
    0 0 0 1px rgba(107, 142, 35, 0.75),
    0 0 18px rgba(107, 142, 35, 0.55);
}


@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__left,
.hero__right,
.section__head {
  opacity: 0;
  animation: rise 800ms ease forwards;
}
.hero__right { animation-delay: 120ms; }
.section__head { animation-delay: 80ms; }

@media (prefers-reduced-motion: reduce) {
  .hero__left,
  .hero__right,
  .section__head {
    opacity: 1;
    animation: none;
    transform: none;
  }
  .page { transition: none; }
}

/* Pill */
.pill {
  display: inline-flex;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(107, 142, 35, 0.3);
  background: rgba(107, 142, 35, 0.14);
  color: rgba(245, 247, 242, 0.92);
  font-weight: 600;
  font-size: 0.92rem;
}

.pill--status .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(107, 142, 35, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
  user-select: none;
}
.btn--primary {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  color: #0f1712;
  box-shadow: 0 10px 30px rgba(107, 142, 35, 0.22);
}
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border: 1px solid rgba(107, 142, 35, 0.36);
  color: rgba(245, 247, 242, 0.9);
}
.btn--ghost:hover {
  background: rgba(107, 142, 35, 0.18);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}
.btn--soft {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(245, 247, 242, 0.92);
}
.btn--soft:hover {
  transform: translateY(-1px);
  border-color: rgba(107, 142, 35, 0.24);
}
.btn--full { width: 100%; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--outline {
  border-color: rgba(107, 142, 35, 0.32);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

/* Hero */
.hero { padding-top: 46px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero__left { min-width: 0; }
.hero__title {
  margin-top: 14px;
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  letter-spacing: -0.04em;
}
.hero__subtitle {
  margin-top: 10px;
  font-size: 1.2rem;
  color: rgba(245, 247, 242, 0.86);
  font-weight: 700;
  min-height: 2.7em;
}
#heroSubtitle {
  display: block;
  width: 100%;
  max-width: 34ch;
  line-height: 1.35;
}
.hero__desc {
  margin-top: 12px;
  color: rgba(245, 247, 242, 0.72);
  max-width: 56ch;
}
.hero__cta {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.hero__stack { margin-top: 24px; }

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.chips--small .chip {
  padding: 7px 12px;
  font-size: 0.85rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 10, 0.35);
  border: 1px solid rgba(107, 142, 35, 0.22);
  color: rgba(245, 247, 242, 0.9);
  font-weight: 600;
}

/* Portrait */
.portrait {
  position: relative;
  width: min(380px, 100%);
  margin-left: auto;
  aspect-ratio: 4 / 5;
}
.portrait__blob {
  position: absolute;
  border-radius: 26px;
  background: rgba(107, 142, 35, 0.18);
  border: 1px solid rgba(107, 142, 35, 0.28);
  display: block;
}
.portrait__blob--a {
  width: 70%;
  height: 70%;
  right: -16px;
  top: -18px;
}
.portrait__blob--b {
  width: 62%;
  height: 62%;
  left: -20px;
  bottom: -18px;
  opacity: 0.10;
}
.portrait__frame {
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  opacity: 0.55;
}
.portrait__card {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 10, 0.25);
}
.portrait__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.02) saturate(1.03);
}

/* About */
.about__card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 18px;
  max-width: 920px;
  margin: 0 auto;
  align-items: center;
  min-width: 0;
}
.about__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(107, 142, 35, 0.14);
  border: 1px solid rgba(107, 142, 35, 0.26);
}
.about__icon svg { width: 28px; height: 28px; color: rgba(245, 247, 242, 0.95); }
.about__text h3 { font-size: 1.35rem; margin-bottom: 8px; }
.about__text p { overflow-wrap: anywhere; }

/* Info cards */
.info__grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  grid-auto-rows: 1fr;
}
.info {
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.info__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 10, 0.35);
  border: 1px solid rgba(107, 142, 35, 0.2);
}
.info__icon svg { width: 22px; height: 22px; color: rgba(245, 247, 242, 0.95); }
.info h4 { margin-top: 6px; font-size: 1.05rem; }
.info h4 { overflow-wrap: anywhere; }

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 16px;
}
.skill { padding: 18px; }
.skill__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.skill__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(107, 142, 35, 0.18);
  border: 1px solid rgba(107, 142, 35, 0.26);
}
.skill__icon span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skill__icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.skill h3 { font-size: 1.1rem; }

.philo { margin-top: 26px; }
.philo__title {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.philo__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.philo__card { padding: 18px; }
.philo__card h4 { font-size: 1rem; margin-bottom: 8px; }

/* Projects */
.project {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  margin-top: 22px;
  margin-bottom: 26px;
}
.project__thumb {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  background: #0f1712;
}
.project__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
  filter: saturate(0.95) brightness(0.98);
}
.project__tag {
  color: rgba(107, 142, 35, 0.92);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.project__title { margin-top: 10px; font-size: 1.55rem; }
.project__cta { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.projects__cta {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.projects__grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.projects-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}
.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.filter-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(107, 142, 35, 0.26);
  background: rgba(8, 12, 10, 0.35);
  color: rgba(245, 247, 242, 0.9);
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}
.filter-btn:hover {
  background: rgba(107, 142, 35, 0.18);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}
.filter-btn.is-active {
  background: rgba(107, 142, 35, 0.3);
  border-color: rgba(107, 142, 35, 0.55);
  color: var(--white);
}
.project-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-width: 300px;
}
.project-card__title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.project-card__text {
  margin-bottom: 12px;
}
.project-card__video,
.project-card__image {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: block;
  object-fit: cover;
  object-position: center;
}
.project-card__image--auto,
.project-card__image--native {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  margin: 0;
}
.project-card .btn {
  margin-top: auto;
}
.projects-empty {
  text-align: center;
  margin-top: 26px;
  color: rgba(245, 247, 242, 0.7);
  display: none;
}

/* Design gallery (Instagram-style) */
.design-gallery .section__subtitle { max-width: 58ch; }
.design-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.design-tile {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 10, 0.35);
}
.design-tile img {
  width: 100%;
  height: auto;
  display: block;
}
.projectcard { padding: 18px; }
.projectcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.projectcard__actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.link {
  color: rgba(245, 247, 242, 0.92);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(107, 142, 35, 0.24);
  background: rgba(107, 142, 35, 0.14);
}
.link:hover { background: rgba(107, 142, 35, 0.22); }

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
.contact__card { padding: 18px; }
.contact__items { margin-top: 14px; display: grid; gap: 12px; }
.contact__item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 12, 10, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.contact__label { display: block; color: rgba(245, 247, 242, 0.65); font-size: 0.9rem; }
.contact__value { display: inline-block; margin-top: 6px; font-weight: 700; }
.contact__value:hover { color: var(--accent); }

.contact__form { padding: 18px; }
.field { margin-top: 12px; }
label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
input, textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 10, 0.35);
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus {
  border-color: rgba(107, 142, 35, 0.45);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}

/* Contact form (ahed) */
.ahed-form {
  display: grid;
  gap: 14px;
  width: 100%;
}
.ahed-form select,
.ahed-form input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 10, 0.35);
  color: var(--text);
  outline: none;
  min-width: 0;
}
.ahed-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(245, 247, 242, 0.7) 50%),
    linear-gradient(135deg, rgba(245, 247, 242, 0.7) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1.1em + 2px), calc(100% - 13px) calc(1.1em + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.ahed-form select:focus,
.ahed-form input:focus {
  border-color: rgba(107, 142, 35, 0.45);
  box-shadow: 0 0 0 4px rgba(107, 142, 35, 0.12);
}
.ahed-form select option { color: #111; }

.ahed-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ahed-row > * { min-width: 0; }
.ahed-row--single { grid-template-columns: 1fr; }

.ahed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  color: #0f1712;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}
.ahed-btn:hover { transform: translateY(-1px); }
.ahed-btn.full { width: 100%; }

/* Footer */
.footer {
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 10, 0.28);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.backtop {
  color: rgba(245, 247, 242, 0.85);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 10, 0.24);
}
.backtop:hover { border-color: rgba(107, 142, 35, 0.26); }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { margin: 0 auto; }
  .intro__grid { grid-template-columns: 1fr; text-align: center; }
  .intro__media { justify-content: center; }
  .info__grid { grid-template-columns: repeat(2, 1fr); }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .philo__grid { grid-template-columns: repeat(2, 1fr); }
  .project { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .projects-page__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .ahed-form input,
  .ahed-form select,
  .ahed-form textarea,
  .contact__form input,
  .contact__form select,
  .contact__form textarea {
    font-size: 16px;
  }

  .section { padding: 52px 0; }
  .header__inner { padding: 10px 12px; margin-top: 8px; }
  .brand { font-size: 1rem; }
  .nav__toggle { display: inline-grid; place-items: center; }
  .nav__list { display: none; }
  .nav__list {
    position: absolute;
    right: 20px;
    top: 58px;
    flex-direction: column;
    align-items: stretch;
    width: min(260px, calc(100vw - 40px));
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 16, 12, 0.75);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__list.is-open { display: flex; }
  .nav__link { width: 100%; text-align: center; }
  .nav__icons { display: none; }
  .pill { font-size: 0.82rem; padding: 6px 10px; }
  .hero { padding-top: 28px; }
  .hero__title { font-size: clamp(1.9rem, 7vw, 2.5rem); }
  .hero__subtitle { font-size: 1rem; }
  .hero__desc { font-size: 0.95rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .portrait { width: min(300px, 100%); }
  .section__head { margin-bottom: 20px; }
  .section__subtitle { font-size: 0.95rem; }
  .chips { gap: 8px; }
  .chip { font-size: 0.85rem; padding: 7px 12px; }
  .skills__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .projects-page__grid { grid-template-columns: 1fr; }
  .info__grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .about__card { grid-template-columns: 1fr; text-align: center; }
  .about__icon { margin: 0 auto; }
  .project__cta { flex-direction: column; }
  .project__cta .btn { width: 100%; }
  .projectcard__actions { flex-direction: column; }
  .projectcard__actions .link { width: 100%; text-align: center; }
  :root { --header-offset: 78px; }
  .intro__hint { bottom: 18px; }
  .project-card { padding: 16px; }
  .project-card__image,
  .project-card__video {
    height: clamp(220px, 60vw, 300px);
  }
}

/* Mega menu (mobile) */
.mega-menu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  width: min(80%, 420px);
  height: 100%;
  background: rgba(8, 12, 10, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: transform 320ms ease, opacity 320ms ease;
}
.mega-menu.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.mega-menu__close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 12, 10, 0.4);
  color: var(--accent);
  font-size: 1.25rem;
  cursor: pointer;
}
.mega-menu__content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: center;
}
.mega-menu__link {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  transition: color 180ms ease;
}
.mega-menu__link:hover {
  color: var(--accent);
}

@media (min-width: 681px) {
  .mega-menu { display: none; }
}
