/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg:        transparent;
  --bg-alt:    rgba(0,0,0,0.38);
  --bg-card:   rgba(14,14,14,0.88);
  --accent:    #00e5ff;
  --white:     #ffffff;
  --muted:     #888888;
  --border:    rgba(255,255,255,0.07);

  /* Fonts */
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Type scale — hard floor: 16px (1rem) on everything */
  --fs-label:  1rem;      /* specs, metadata — differentiated by uppercase + tracking + muted color */
  --fs-sm:     1rem;      /* secondary text — differentiated by weight + color */
  --fs-body:   1rem;      /* primary body, bios, intros, contact copy */
  --fs-card:   1rem;      /* card headings, brand names */
  --fs-title:  1.6rem;    /* project names, works category names */

  /* Letter spacing */
  --ls-tight:   -0.02em;
  --ls-normal:  0em;
  --ls-label:   0.12em;   /* small uppercase labels */
  --ls-wide:    0.18em;   /* eyebrows, category headers */

  /* Line heights */
  --lh-tight:   1;
  --lh-snug:    1.4;
  --lh-body:    1.75;
  --lh-relaxed: 1.9;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── BACKGROUND LAYERS ─────────────────────────────────────── */
/* Five cross-fading image layers — scroll-driven by JS */
#bg-layers {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: #050505;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 0;
  will-change: opacity;
}

.bg-layer:first-child { opacity: 1; } /* BG1 visible on load */

/* Readability overlay — static dark tint over background images */
#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

#color-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.grain { display: none; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

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

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 14px 36px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
  border: 2px solid var(--accent);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn--outline:hover {
  border-color: var(--white);
}

/* ─── TAG ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: 6px;
  margin: 4px 4px 0 0;
  color: var(--muted);
}

/* ─── NAV ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1440px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: rgba(8,8,8,0.42);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: padding 0.3s ease, top 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  top: 10px;
  padding: 16px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.07);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.2em;
}
.nav__logo-icon { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--white); }
.nav__cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: 8px;
}
.nav__cta:hover { background: var(--accent); color: var(--white) !important; }

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

.nav__links.nav--open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% - 1px);
  left: -1px;
  right: -1px;
  background: rgba(6,6,6,0.92);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  padding: 20px 32px 24px;
  gap: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: none;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

/* ─── DROPDOWN ───────────────────────────────────────────────── */
.nav__dropdown {
  position: relative;
}
/* Invisible bridge fills the gap between trigger and panel so :hover isn't lost */
.nav__dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -16px;
  right: -16px;
  height: 22px;
}

.nav__dropdown-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__dropdown-trigger:hover,
.nav__dropdown--open .nav__dropdown-trigger,
.nav__dropdown:hover .nav__dropdown-trigger { color: var(--white); }

.nav__chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-top: 1px;
}
.nav__dropdown--open .nav__chevron,
.nav__dropdown:hover .nav__chevron { transform: rotate(180deg); }

.nav__dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: rgba(8,8,10,0.88);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65), 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav__dropdown--open .nav__dropdown-menu,
.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__dropdown-menu li:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav__dropdown-menu a {
  display: block;
  padding: 11px 16px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}
.nav__dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 60px 80px;
  position: relative;
  overflow: hidden;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,229,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,229,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content { max-width: 900px; position: relative; z-index: 1; }

.hero__eyebrow {
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--accent);
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__title--accent {
  color: var(--accent);
}

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

.hero__sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  margin-bottom: 48px;
}


/* ─── SECTIONS ──────────────────────────────────────────────── */
.section {
  padding: 120px 60px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}
.section--dark {
  background: var(--bg-alt);
}

#social {
  background: rgba(255,255,255,0.008);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  padding-bottom: 0;
  box-shadow: 0 8px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

#publications {
  background: transparent;
}

#websites {
  background: rgba(255,255,255,0.008);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

#branding {
  background: rgba(255,255,255,0.008);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.section__header {
  margin-bottom: 64px;
}
.section__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3.5rem, 7vw, 7rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 16px;
}
.section__sub {
  color: var(--muted);
  font-size: var(--fs-body);
  letter-spacing: var(--ls-normal);
  line-height: var(--lh-body);
  max-width: 480px;
}

/* ─── HERO TOOLS ────────────────────────────────────────────── */
.hero__tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.hero__tools img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0.7);
  transition: filter 0.2s;
}
.hero__tools img:hover { filter: brightness(1); }

/* ─── WORKS OVERVIEW ────────────────────────────────────────── */
.works__heading {
  font-size: clamp(3.5rem, 7.5vw, 8rem);
  margin-bottom: 80px;
  line-height: 0.9;
  white-space: nowrap;
}

.works-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 40px;
}

.works-overview__item {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 20px;
  row-gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.25s;
}
.works-overview__item:hover { opacity: 0.65; }

.works-overview__num {
  grid-row: 1 / 3;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: auto;
  min-height: 52px;
  background: var(--accent);
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #000;
}

.works-overview__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-title);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  color: var(--white);
  line-height: var(--lh-snug);
}

.works-overview__clients {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-body);
}

/* ─── BRAND SECTION (SOCIAL MEDIA) ─────────────────────────── */
.sm-brand {
  margin-bottom: 80px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
}
.sm-brand:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.sm-brand__header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.sm-brand__logo-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-brand__logo-box img {
  max-height: 72px;
  max-width: 160px;
  width: 100%;
  object-fit: contain;
}

.sm-brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-card);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}
.sm-brand__desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-relaxed);
  max-width: 560px;
}

.sm-category { margin-bottom: 40px; }
.sm-category:last-of-type { margin-bottom: 0; }

.sm-category__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sm-category__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--white);
}
.sm-category__spec {
  font-size: var(--fs-label);
  color: var(--muted);
  letter-spacing: var(--ls-normal);
}

.sm-feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sm-feed-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.sm-feed-grid img:hover { opacity: 0.82; }

.sm-story-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sm-story-grid img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.sm-story-grid img:hover { opacity: 0.82; }

.sm-banner {
  margin-top: 48px;
  margin-left: -60px;
  margin-right: -60px;
  overflow: hidden;
}
.sm-banner--tinseltown { background: #c9657e; }
.sm-banner--kow { background: #e8ddd0; }
.sm-banner--rh { background: #c8a87e; }
.sm-banner img {
  display: block;
  width: 100%;
  height: 720px;
  object-fit: cover;
  object-position: center top;
}

/* ─── WEBSITE PROJECTS ──────────────────────────────────────── */
.web-project {
  margin-bottom: 80px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 80px;
}
.web-project:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.web-project.web-project--featured { border-bottom: none; padding-bottom: 0; }

.web-project__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}
.web-project__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: var(--fs-title);
  letter-spacing: var(--ls-tight);
  margin-bottom: 8px;
}
.web-project__desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-body);
}
.web-project__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }


.web-project--featured {
  background: rgba(255,255,255,0.008);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.web-project__banner {
  margin: 24px -28px 28px;
}

.web-project__banner img {
  display: block;
  width: 100%;
  height: auto;
}

.web-project__screens {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
}

.screens-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.screens-col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.screens-col img:hover { opacity: 0.82; }

/* ─── GLG MOSAIC ────────────────────────────────────────────── */
.glg-screens {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.glg-top {
  display: flex;
  gap: 6px;
}

.glg-top img {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.glg-top img:hover { opacity: 0.82; }

.glg-bottom {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.glg-col-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.glg-col-right {
  flex: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.glg-col-left img,
.glg-col-right > img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* img3 — grows to fill left column above img6, aligning both columns at bottom */
.glg-col-left > img:first-child {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}

/* img6 — natural height, anchored at bottom of left column */
.glg-col-left > img:last-child {
  flex: 0 0 auto;
  height: auto;
}

.glg-col-left img:hover,
.glg-col-right > img:hover { opacity: 0.82; }

.glg-pair {
  display: flex;
  gap: 6px;
}

.glg-pair img {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.glg-pair img:hover { opacity: 0.82; }

/* ─── PUBLICATIONS ──────────────────────────────────────────── */
.pub-project {
  margin-bottom: 72px;
}
.pub-project:last-child { margin-bottom: 0; }

.pub-project__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}


/* ─── PUBLICATIONS — vertical stack variant ─────────────────── */
.pub-project--stack .pub-project__header {
  margin-bottom: 20px;
}

.pub-project__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.65;
  max-width: 520px;
  margin-top: 8px;
}

.pub-project--stack .pub-project__stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pub-project--stack .pub-project__stack img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.pub-project--stack .pub-project__stack img:hover { opacity: 0.88; }

/* ─── LOGOFOLIO ─────────────────────────────────────────────── */
.logofolio-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logofolio-pair {
  display: flex;
  gap: 16px;
}

.logofolio-item {
  background: transparent;
  border-radius: 12px;
  padding: 32px 40px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}
.logofolio-pair .logofolio-item { flex: 1; }
.logofolio-item:hover { opacity: 0.78; }

.logofolio-item--bordered {
  border: 2px solid rgba(255,255,255,0.35);
}

.logofolio-item img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ─── BRANDING — Moroccan Teahouse case study ───────────────── */
.mt-case {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-info {
  display: flex;
  gap: 12px;
}

.mt-info__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-logo-card {
  background: #0d0d0d;
  border-radius: 10px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mt-logo-card img {
  max-height: 90px;
  width: auto;
  display: block;
}

.mt-desc-card {
  background: #111;
  border-radius: 10px;
  padding: 28px 32px;
  flex: 1;
}
.mt-desc-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.mt-desc-card__body {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

.mt-info__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-swatch {
  flex: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mt-swatch span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
}

.mt-photos {
  display: flex;
  gap: 12px;
}
.mt-photos img {
  flex: 1;
  min-width: 0;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.mt-photo-full {
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 10px;
}

/* ─── BACK TO TOP ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 229, 255, 0.5);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, background 0.3s ease;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  transform: scale(1.18);
}

/* ─── SIDE NAV ──────────────────────────────────────────────── */
#side-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.side-nav__track {
  position: absolute;
  right: 2px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.10);
}

.side-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 18px 8px 0;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  white-space: nowrap;
  transform-origin: right center;
  pointer-events: auto;
  transition:
    color      0.30s ease,
    transform  0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    font-weight 0.30s ease;
}

/* Dot on the track line */
.side-nav__item::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  translate: 0 -50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition:
    background  0.30s ease,
    box-shadow  0.30s ease,
    scale       0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.side-nav__item.active {
  color: var(--accent);
  font-weight: 700;
  transform: scale(1.28);
}

.side-nav__item.active::after {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.65);
  scale: 1.5;
}

.side-nav__item:hover:not(.active) {
  color: rgba(255, 255, 255, 0.65);
}

/* ─── LAPTOP (1280px) ───────────────────────────────────────── */
@media (max-width: 1280px) {
  /* Reduce title sizes — at 1280px, 12vw = 154px which is too tall for a laptop viewport */
  .hero__title  { font-size: clamp(3.5rem, 7.5vw, 6.5rem); }
  .about__title { font-size: clamp(3.5rem, 7.5vw, 6.5rem); }
  .section__title { font-size: clamp(2.8rem, 5.5vw, 5rem); }
  .contact__title { font-size: clamp(2.5rem, 5vw, 4.5rem); }

  /* Reduce vertical padding so sections breathe without wasting height */
  .hero    { padding: 110px 48px 64px; }
  .section { padding: 90px 48px; }
  .about   { padding: 90px 48px; }
  .contact { padding: 110px 48px; }

  /* Tighten works overview gap */
  .works-overview { gap: 40px 24px; }
}

@media (max-width: 1200px) {
  #side-nav { display: none; }
}

/* ─── CONTACT ───────────────────────────────────────────────── */
.contact {
  padding: 140px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,229,255,0.05) 0%, transparent 70%);
}

.contact__content { position: relative; z-index: 1; max-width: 900px; }

.contact__eyebrow {
  font-family: var(--font-head);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.contact__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 24px;
  white-space: nowrap;
}

.contact__body {
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  margin-bottom: 48px;
}

.contact__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}


.contact__deco {
  position: absolute;
  font-size: 20rem;
  color: rgba(255,255,255,0.015);
  user-select: none;
  pointer-events: none;
  right: -60px;
  bottom: -60px;
  line-height: 1;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  position: relative;
  padding: 52px 60px 32px;
  background: rgba(4, 4, 6, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 229, 255, 0.18);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.footer__logo {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.footer__tagline {
  font-size: var(--fs-label);
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: flex-end;
  align-items: center;
}

.footer__nav a {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--accent);
}

.footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  font-size: var(--fs-label);
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.05em;
}

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

/* ─── SCROLL ANIMATIONS ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── ABOUT ─────────────────────────────────────────────────── */
.about {
  padding: 120px 60px;
  background: var(--bg);
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.about__intro {
  margin-bottom: 56px;
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: var(--ls-normal);
}

.about__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(5rem, 12vw, 10rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.about__title span {
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.about__bio {
  margin-bottom: 48px;
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.7);
}

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

.about__card--wide { grid-column: span 2; }

.about__contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-normal);
  color: var(--muted);
}
.about__contact-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.about__card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.about__edu-list { display: flex; flex-direction: column; gap: 24px; }
.about__edu-item { display: flex; flex-direction: column; gap: 4px; }
.about__edu-item strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: block;
}
.about__edu-item > span { font-size: var(--fs-sm); color: var(--muted); }

.about__exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 16px;
}
.about__exp-item { display: flex; flex-direction: column; gap: 4px; }
.about__exp-item strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: block;
}
.about__exp-item > span { font-size: var(--fs-label); color: var(--muted); }

.about__year {
  font-size: var(--fs-label);
  color: var(--muted);
  font-family: var(--font-head);
  letter-spacing: var(--ls-normal);
  margin-bottom: 2px;
}

.about__software-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about__software-item { display: flex; align-items: center; gap: 20px; }
.about__sw-badge {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.about__software-item strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: block;
}
.about__software-item > div > span { font-size: var(--fs-label); color: var(--muted); }

.about__platform-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about__platform-item { display: flex; align-items: center; gap: 20px; }
.about__platform-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.about__platform-item strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: block;
}
.about__platform-item > div > span { font-size: var(--fs-label); color: var(--muted); }

.about__tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about__tech-item { display: flex; align-items: center; gap: 20px; }
.about__tech-icon {
  font-size: 2.4rem;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}
.about__tech-item strong {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-sm);
  display: block;
}
.about__tech-item > div > span { font-size: var(--fs-label); color: var(--muted); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav { padding: 18px 24px; width: calc(100% - 32px); top: 12px; border-radius: 16px; }
  .nav.scrolled { padding: 13px 24px; top: 8px; }
  .nav__links.nav--open { border-radius: 0 0 16px 16px; }
  .hero { padding: 120px 32px 60px; }
  .section { padding: 80px 32px; }
  .about { padding: 80px 32px; }
  .works-overview { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .works__heading { margin-bottom: 56px; }
  .sm-brand__header { grid-template-columns: 160px 1fr; gap: 24px; }
  .sm-banner { margin-left: -32px; margin-right: -32px; }
  .mt-info { flex-direction: column; }
  .about__grid { grid-template-columns: 1fr 1fr; }
  .about__card--wide { grid-column: span 2; }
  .about__exp-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: block; }
  .nav { padding: 16px 20px; width: calc(100% - 24px); top: 10px; border-radius: 14px; }
  .nav.scrolled { padding: 11px 20px; top: 6px; }
  .nav__links.nav--open { border-radius: 0 0 14px 14px; padding: 16px 20px 20px; }
  /* Mobile dropdown — static, inline */
  .nav__dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px 8px;
    box-shadow: none;
    display: none;
    width: 100%;
    margin-top: 8px;
    transition: none;
  }
  .nav__dropdown--open .nav__dropdown-menu { display: flex; flex-direction: column; }
  .nav__dropdown-menu li:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav__dropdown-trigger { width: 100%; justify-content: space-between; }
  .hero { padding: 100px 24px 60px; flex-direction: column; min-height: auto; }
  .section { padding: 60px 24px; }
  .works-overview { grid-template-columns: 1fr; gap: 32px; }
  .works__heading { margin-bottom: 40px; white-space: normal; }
  .sm-brand__header { grid-template-columns: 1fr; }
  .sm-feed-grid { grid-template-columns: repeat(2, 1fr); }
  .sm-story-grid { grid-template-columns: repeat(2, 1fr); }
  .sm-banner { margin-left: -24px; margin-right: -24px; }
  .sm-banner img { height: 480px; }
  .web-project--featured { padding: 20px; }
  .web-project__banner { margin: 20px -20px 20px; }
  .glg-bottom { flex-direction: column; }
  .logofolio-pair { flex-direction: column; }
  .mt-photos { flex-direction: column; }
  .web-project__header { flex-direction: column; }
  .contact { padding: 80px 24px; }
  .footer { padding: 40px 24px 24px; }
  .footer__inner { flex-direction: column; gap: 32px; text-align: center; margin-bottom: 28px; padding-bottom: 28px; }
  .footer__nav { justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
  .footer__bar { flex-direction: column; gap: 6px; text-align: center; }
  .about { padding: 60px 24px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__card--wide { grid-column: span 1; }
  .about__exp-grid { grid-template-columns: 1fr 1fr; }
  .about__software-grid { grid-template-columns: 1fr; }
  .about__tech-grid { grid-template-columns: 1fr; }
  .pub-project__grid img { height: 240px; }
}

/* ─── EXTRA SMALL (< 480px) ──────────────────────────────────── */
@media (max-width: 480px) {
  .nav { padding: 14px 14px; width: calc(100% - 16px); top: 8px; border-radius: 12px; }
  .nav.scrolled { padding: 10px 14px; top: 5px; }
  .nav__links.nav--open { border-radius: 0 0 12px 12px; padding: 14px 16px 18px; }

  .hero { padding: 80px 24px 48px; }
  .hero__title { font-size: clamp(2rem, 11vw, 4rem); }

  .section { padding: 48px 24px; }
  .section__title { font-size: clamp(1.8rem, 9vw, 3.5rem); }
  .section__header { margin-bottom: 40px; }

  .about { padding: 48px 24px; }
  .about__title { font-size: clamp(2rem, 11vw, 4rem); }
  .about__grid { grid-template-columns: 1fr; }
  .about__card--wide { grid-column: span 1; }
  .about__exp-grid { grid-template-columns: 1fr; }
  .about__platform-list { grid-template-columns: 1fr; }

  .works__heading {
    font-size: clamp(2rem, 11vw, 4rem);
    white-space: normal;
    margin-bottom: 32px;
  }
  .works-overview { gap: 20px; }

  .sm-banner { margin-left: -24px; margin-right: -24px; }
  .sm-banner img { height: 280px; }

  #social, #websites, #branding { border-radius: 12px; }

  .pub-project__grid img { height: 180px; }

  .web-project--featured { padding: 16px; }
  .web-project__banner { margin: 16px -16px 16px; }
  .web-project__screens { flex-direction: column; }
  .glg-top { flex-direction: column; }
  .glg-pair { flex-direction: column; }

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

  .contact { padding: 60px 24px; }
  .contact__title { white-space: normal; }
  .contact__body br { display: none; }

  .footer { padding: 32px 16px 20px; }
}

/* ─── MOBILE PERFORMANCE: disable GPU-heavy backdrop-filter ────── */
@media (max-width: 768px) {
  .nav {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(8, 8, 12, 0.97);
  }
  .nav__dropdown-menu {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(6, 6, 8, 0.98);
  }
  .hero__content {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(4, 4, 8, 0.78);
  }
  #social, #websites, #branding {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(14, 14, 18, 1);
  }
  .web-project--featured {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(14, 14, 18, 1);
  }
  #backToTop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(10, 10, 10, 0.97);
  }
  .footer {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(4, 4, 6, 0.99);
  }
}
