/* ============================================================
   Saad Khan — Portfolio
   Design language inspired by units.gr
   ============================================================ */

:root {
  /* palette */
  --cream: #f4e9e1;
  --cream-2: #fbf5ef;
  --black: #101010;
  --ink: #141210;
  --red: #ea3737;
  --blue: #0072e3;
  --orange: #ff5c38;
  --yellow: #ffcf2d;
  --purple: #c4a1f0;
  --green: #37c86b;
  --white: #ffffff;

  /* type */
  --font-display: "Space Grotesk", "Arial Black", sans-serif;
  --font-body: "Inter", Arial, sans-serif;

  /* shape */
  --radius: clamp(22px, 2.6vw, 34px);
  --radius-sm: 16px;
  --pill: 100px;
  --gap: clamp(14px, 1.6vw, 26px);
  --pad: clamp(22px, 3.2vw, 48px);

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Dark Mode ---------- */
body.dark-mode {
  --cream: #0c0b0a;
  --cream-2: #141312;
  --ink: #f5f5f7;
  --white: #1c1a19;
  --black: #f5f5f7;
  
  --blue: #228be6;
  --red: #ff6b6b;
  --orange: #fd7e14;
  --green: #40c057;
  --purple: #ae3ec9;
}
body.dark-mode .grid-overlay {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
}
body.dark-mode .sidebar-link {
  color: #101010; /* Keep numbers/text dark inside colored cards */
}
body.dark-mode .pcard {
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .exp {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--cream-2);
}
body.dark-mode .about-card {
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .arrows-header {
  border-color: var(--black);
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--blue); color: #fff; }

/* ---------- helpers / color classes ---------- */
.background-blue   { background: var(--blue); }
.background-red    { background: var(--red); }
.background-orange { background: var(--orange); }
.card--cream  { background: var(--cream-2); }
.card--blue   { background: var(--blue);  color: #fff; }
.card--red    { background: var(--red);   color: #101010; }
.card--orange { background: var(--orange);color: #101010; }
.card--yellow { background: var(--yellow);color: #101010; }
.card--purple { background: var(--purple);color: #101010; }
.card--green  { background: var(--green); color: #08160d; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1.5px solid currentColor;
  border-radius: var(--pill);
  margin-bottom: 22px;
  opacity: 0.85;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--black);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 26px;
  border-radius: var(--pill);
  border: 1.6px solid var(--black);
  cursor: pointer;
  transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover { transform: translateY(-3px); }
.btn:hover .arr { transform: translateX(5px); }
.btn-dark { --btn-bg: var(--black); --btn-fg: var(--white); }
.btn-dark:hover { background: var(--blue); border-color: var(--blue); }
.btn-ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-ghost:hover { background: var(--black); color: var(--white); }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border: 2px solid var(--black);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease), border-color .25s;
  mix-blend-mode: difference;
  background: transparent;
}
.cursor.is-hover { width: 54px; height: 54px; background: #fff; border-color: #fff; }
@media (hover: none) { .cursor { display: none; } }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(18px, 3vw, 46px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.topbar.scrolled {
  background: rgba(244, 233, 225, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.03em;
  color: var(--black);
}
.brand span { color: var(--red); }
.topnav { display: flex; gap: 30px; }
.topnav a {
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 4px 0;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.topnav a:hover::after { transform: scaleX(1); }
.topbar-cta { padding: 12px 22px; font-size: 14px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--black);
  border: none;
  border-radius: 12px;
  padding: 13px 12px;
  cursor: pointer;
}
.menu-toggle span {
  width: 22px; height: 2px; background: #fff; display: block;
  transition: transform .3s var(--ease), opacity .3s;
}
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- overlay menu ---------- */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(70px, 12vw, 140px) clamp(24px, 6vw, 90px);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease);
  pointer-events: none;
}
body.menu-open .overlay-menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
.overlay-links { list-style: none; }
.overlay-links li { overflow: hidden; }
.overlay-links a {
  display: flex;
  align-items: baseline;
  gap: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 9vw, 96px);
  letter-spacing: -0.03em;
  line-height: 1.14;
  color: var(--black);
  transform: translateY(110%);
  transition: transform .6s var(--ease), color .3s;
}
body.menu-open .overlay-links li:nth-child(1) a { transition-delay: .08s; }
body.menu-open .overlay-links li:nth-child(2) a { transition-delay: .14s; }
body.menu-open .overlay-links li:nth-child(3) a { transition-delay: .20s; }
body.menu-open .overlay-links li:nth-child(4) a { transition-delay: .26s; }
body.menu-open .overlay-links li:nth-child(5) a { transition-delay: .32s; }
body.menu-open .overlay-links a { transform: translateY(0); }
.overlay-links a:hover { color: var(--c); }
.overlay-links .num { font-size: .3em; font-weight: 600; opacity: .5; font-family: var(--font-body); }
.overlay-socials { display: flex; gap: 26px; margin-top: 44px; font-weight: 600; }
.overlay-socials a { position: relative; }
.overlay-socials a:hover { color: var(--red); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px clamp(20px, 5vw, 90px) 80px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .82;
  animation: float 16s ease-in-out infinite;
}
.blob-1 { width: 46vw; height: 46vw; background: var(--blue);   top: -8vw; right: 4vw; }
.blob-2 { width: 34vw; height: 34vw; background: var(--red);    bottom: -6vw; right: 26vw; animation-delay: -5s; }
.blob-3 { width: 30vw; height: 30vw; background: var(--yellow); top: 20vh; right: 34vw; animation-delay: -9s; opacity:.7; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(-3vw, 4vh) scale(1.08); }
  66%     { transform: translate(2vw, -3vh) scale(.95); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 60% 40%, transparent 20%, #000 75%);
          mask-image: radial-gradient(circle at 60% 40%, transparent 20%, #000 75%);
}

.hero-inner { position: relative; z-index: 3; max-width: 760px; }
.hero-tag {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 9px 18px;
  border-radius: var(--pill);
  margin-bottom: 26px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 130px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--black);
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--red); }
.hero-sub {
  margin: 30px 0 36px;
  font-size: clamp(16px, 1.5vw, 21px);
  max-width: 560px;
  color: var(--ink);
  opacity: 0.8;
  font-weight: 400;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
}
.scroll-line { width: 2px; height: 46px; background: rgba(0,0,0,.2); overflow: hidden; }
.scroll-line i { display: block; width: 100%; height: 40%; background: var(--black); animation: scrolldown 1.8s var(--ease) infinite; }
@keyframes scrolldown { 0% { transform: translateY(-120%);} 100%{ transform: translateY(260%);} }

/* ---------- Left Sidebar (Desktop Only - units.gr style) ---------- */
.sidebar-aside {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--cream);
  display: grid;
  grid-template-rows: 80px repeat(4, 1fr) 1fr 56px 56px; /* logo, 4 links, CTA, toggle, socials */
  gap: 12px;
  padding: 30px 16px;
  z-index: 200;
  height: 100vh;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 4px;
}
.sidebar-logo .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.sidebar-links {
  display: contents;
}
.sidebar-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: var(--c);
  color: #101010;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.25s var(--ease), filter 0.25s;
}
.sidebar-link:hover {
  transform: scale(1.03);
  filter: brightness(1.06);
}
.sidebar-link.active {
  box-shadow: 0 0 0 3px var(--ink);
}
.sidebar-link .link-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.sidebar-link .num {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.6;
}
.sidebar-link .arr {
  font-size: 20px;
  transition: transform 0.25s var(--ease);
}
.sidebar-link:hover .arr {
  transform: translate(2px, -2px);
}
.sidebar-link .link-bottom {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
  text-align: left;
}
.sidebar-footer {
  display: contents;
}
.sidebar-cta {
  /* height determined by grid row */
}
.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #101010;
  color: #ffffff;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.sidebar-theme-toggle:hover {
  transform: scale(1.03);
}
.sun-icon { font-size: 18px; color: #ffd60a; }
.moon-icon { font-size: 18px; color: #c4a1f0; }

body.dark-mode .sun-icon { display: block; }
body.dark-mode .moon-icon { display: none; }
body:not(.dark-mode) .sun-icon { display: none; }
body:not(.dark-mode) .moon-icon { display: block; }

.sidebar-socials-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #101010;
  color: #ffffff;
  border-radius: 12px;
  border: 1px solid transparent;
}
.sidebar-socials-card a {
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.2s;
  flex: 1;
  height: 100%;
  display: grid;
  place-items: center;
}
.sidebar-socials-card a:hover {
  opacity: 0.7;
}

body.dark-mode .sidebar-theme-toggle,
body.dark-mode .sidebar-socials-card {
  background: #1c1a19;
  color: #f5f5f7;
  border-color: rgba(255,255,255,0.08);
}
body.dark-mode .sidebar-socials-card a {
  color: #f5f5f7;
}

@media (max-height: 750px) {
  .sidebar-aside {
    gap: 6px;
    padding: 16px 12px;
    grid-template-rows: 60px repeat(4, 1fr) 1fr 44px 44px;
  }
  .sidebar-logo .brand {
    font-size: 20px;
  }
  .sidebar-link {
    padding: 10px 12px;
  }
  .sidebar-link .link-bottom {
    font-size: 14px;
  }
  .sidebar-link .arr {
    font-size: 16px;
  }
  .sidebar-theme-toggle, .sidebar-socials-card {
    padding: 8px 12px;
    font-size: 13px;
  }
  .sidebar-theme-toggle span {
    font-size: 13px;
  }
  .sun-icon, .moon-icon {
    font-size: 14px;
  }
}

/* ---------- Main Content Wrapper ---------- */
.main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  position: relative;
}
.side-block .n { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.side-block .l {
  font-weight: 600; font-size: 14px;
  max-width: 0; opacity: 0; white-space: nowrap;
  transition: max-width .4s var(--ease), opacity .3s var(--ease);
}
.side-block:hover { transform: translateX(8px); box-shadow: 8px 8px 0 rgba(0,0,0,.14); }
.side-block:hover .l { max-width: 160px; opacity: 1; }
@media (max-width: 1024px) { .side-nav { display: none; } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 20px 0;
  border-radius: var(--radius);
  margin: 26px clamp(14px, 2vw, 30px);
}
.marquee--red   { background: var(--red);   color: #101010; }
.marquee--blue  { background: var(--blue);  color: #fff; }
.marquee--black { background: var(--black); color: #fff; border-radius: 0; margin: 0; }
.marquee-track {
  display: inline-flex; align-items: center; gap: 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -0.02em;
  animation: scrollx 26s linear infinite;
}
.marquee-track--rev { animation-direction: reverse; animation-duration: 30s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .dot { font-size: .4em; opacity: .7; }
.marquee .star { font-size: .7em; color: var(--red); }
@keyframes scrollx { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: clamp(60px, 8vw, 120px) clamp(14px, 3vw, 40px); }
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--gap);
}
.card { border-radius: var(--radius); padding: var(--pad); }
.about-card { display: flex; flex-direction: column; align-items: flex-start; }
.about-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.about-card p {
  font-size: clamp(15px, 1.15vw, 18px);
  margin-bottom: 16px;
  max-width: 60ch;
  color: var(--ink);
  opacity: 0.8;
}
.about-card .btn { margin-top: 14px; }
.about-side { display: grid; gap: var(--gap); }
.stat { display: flex; flex-direction: column; justify-content: center; min-height: 150px; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label { font-weight: 500; font-size: 15px; margin-top: 8px; opacity: .92; }

/* ============================================================
   EXPERTISE
   ============================================================ */
.expertise { padding: clamp(50px, 6vw, 90px) clamp(14px, 3vw, 40px); }
.section-head { margin-bottom: clamp(30px, 4vw, 54px); max-width: 700px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.exp {
  border: 1.5px solid rgba(0,0,0,.08);
  transition: transform .45s var(--ease), background .45s var(--ease), color .4s, box-shadow .45s var(--ease);
}
.exp .exp-icon {
  font-size: 34px;
  width: 66px; height: 66px;
  display: grid; place-items: center;
  background: var(--cream);
  border-radius: 18px;
  margin-bottom: 22px;
  transition: background .4s var(--ease), transform .5s var(--ease);
}
.exp h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 27px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.exp p {
  font-size: 15.5px;
  color: var(--ink);
  opacity: 0.8;
}
.exp:hover {
  transform: translateY(-8px);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 24px 50px -22px rgba(0,114,227,.6);
}
.exp:hover p { color: rgba(255,255,255,.9); }
.exp:hover .exp-icon { background: rgba(255,255,255,.16); transform: rotate(-8deg) scale(1.06); }

/* ============================================================
   ARROWS HEADER
   ============================================================ */
.arrows-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 5vw, 90px);
  margin: 0;
  border-radius: 0;
  color: #fff;
  height: 120px;
  border-bottom: 1.5px solid var(--black);
}
.background-orange.arrows-header { color: #101010; }
.arrows-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 56px);
  letter-spacing: -0.03em;
  text-align: center;
}
.arrow-set { font-size: clamp(20px, 3vw, 38px); font-weight: 700; letter-spacing: 4px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ============================================================
   PORTFOLIO (Horizontal Scroll on Desktop)
   ============================================================ */
.portfolio {
  overflow: hidden;
  position: relative;
  background: var(--cream);
  height: 100vh;
}
.portfolio-container {
  display: flex;
  align-items: center;
  height: calc(100vh - 120px);
  width: 100%;
}
.portfolio-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--gap);
  padding: 0 max(6vw, 180px);
  will-change: transform;
}
.pcard {
  --c: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--c);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 36px);
  height: clamp(450px, 62vh, 680px);
  width: clamp(350px, 35vw, 550px);
  flex-shrink: 0;
  overflow: hidden;
  color: #101010;
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pcard--wide {
  width: clamp(550px, 50vw, 850px);
}
.pcard::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.06);
  opacity: 0; transition: opacity .5s var(--ease);
  z-index: -1;
}
.pcard:hover { transform: translateY(-10px); box-shadow: 0 40px 70px -30px rgba(0,0,0,.5); }
.pcard:hover::before { opacity: 1; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pcard-tag {
  font-weight: 600; font-size: 13px; letter-spacing: .04em;
  background: rgba(0,0,0,.14); color: inherit;
  padding: 8px 15px; border-radius: var(--pill);
}
.pcard-go {
  font-size: 24px; font-weight: 700;
  width: 44px; height: 44px; border-radius: 50%;
  background: #101010; color: #fff;
  display: grid; place-items: center;
  transition: transform .45s var(--ease), background .3s;
}
.pcard:hover .pcard-go { transform: rotate(45deg) scale(1.08); background: #fff; color: #101010; }
.pcard-visual {
  flex: 1;
  display: grid; place-items: center;
  min-height: 120px;
  margin: 8px 0;
}
.pcard-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 38px);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.pcard-body p { font-size: 14.5px; max-width: 54ch; color: rgba(16,16,16,.82); line-height: 1.4; }
.pcard[style*="--purple"] .pcard-body p,
.pcard[style*="--purple"] .pcard-body,
.pcard--wide[style*="--purple"] p { color: rgba(16,16,16,.82); }
.pcard-url {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px;
  padding-bottom: 3px;
  border-bottom: 2px solid currentColor;
  opacity: .9;
}

/* card visuals (abstract, on-brand) */
.viz-supplytech { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; width: min(340px, 70%); }
.viz-supplytech span {
  aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,.85);
  animation: pulsev 2.6s var(--ease) infinite;
}
.viz-supplytech span:nth-child(2){ animation-delay:.2s;} .viz-supplytech span:nth-child(3){ animation-delay:.4s;}
.viz-supplytech span:nth-child(4){ animation-delay:.6s;} .viz-supplytech span:nth-child(5){ animation-delay:.8s;background:#101010;}
.viz-supplytech span:nth-child(6){ animation-delay:1s;}
@keyframes pulsev { 0%,100%{ transform: scale(1); opacity:.85;} 50%{ transform: scale(.86); opacity:1;} }

.viz-alpha { position: relative; width: 150px; height: 150px; }
.viz-alpha i {
  position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 44px solid transparent; border-right: 44px solid transparent;
  border-bottom: 76px solid rgba(255,255,255,.9);
  transform-origin: center;
}
.viz-alpha i:nth-child(1){ transform: scale(1); opacity:.35;}
.viz-alpha i:nth-child(2){ transform: scale(.72); opacity:.55;}
.viz-alpha i:nth-child(3){ transform: scale(.46); opacity:.8;}
.viz-alpha i:nth-child(4){ transform: scale(.24); border-bottom-color:#101010;}
.pcard:hover .viz-alpha i { animation: alphaSpin 4s linear infinite; }
@keyframes alphaSpin { to { transform: rotate(360deg);} }

.viz-earth { width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.85); display: grid; place-items: center; position: relative; }
.viz-earth .leaf {
  width: 60px; height: 60px; background: #08160d;
  border-radius: 0 60px 0 60px; transform: rotate(45deg);
  animation: sway 3s ease-in-out infinite;
}
@keyframes sway { 0%,100%{ transform: rotate(40deg);} 50%{ transform: rotate(52deg);} }

.viz-aqua { display: flex; gap: 14px; align-items: flex-end; height: 120px; }
.viz-aqua b { width: 34px; background: rgba(255,255,255,.9); border-radius: var(--pill); animation: wave 1.8s var(--ease) infinite; }
.viz-aqua b:nth-child(1){ height: 60%; } .viz-aqua b:nth-child(2){ height: 100%; animation-delay:.2s; background:#101010;} .viz-aqua b:nth-child(3){ height: 78%; animation-delay:.4s;}
@keyframes wave { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

.viz-byond em {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(40px, 8vw, 96px);
  letter-spacing: -0.05em;
  color: rgba(255,255,255,.9);
  -webkit-text-stroke: 2px #101010;
  paint-order: stroke fill;
}
.pcard:hover .viz-byond em { animation: skew 2.4s var(--ease) infinite; }
@keyframes skew { 0%,100%{ transform: skewX(0);} 50%{ transform: skewX(-8deg);} }

/* ============================================================
   STAND FOR (pixel cards)
   ============================================================ */
.stand-for { padding: clamp(30px, 4vw, 60px) clamp(14px, 3vw, 40px) clamp(50px,6vw,90px); }
.stand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.scard {
  border-radius: var(--radius);
  padding: var(--pad);
  min-height: 340px;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.scard:hover { transform: translateY(-8px); box-shadow: 0 34px 60px -30px rgba(0,0,0,.45); }
.scard h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  margin: 22px 0 12px;
}
.scard p { font-size: 15.5px; opacity: .92; }
.card--blue.scard p { color: rgba(255,255,255,.9); }

/* pixel art via box-shadow grids */
.pixel-art {
  width: 96px; height: 96px;
  background:
    linear-gradient(rgba(0,0,0,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.10) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 10px;
  position: relative;
}
.pixel-art::after {
  content: "";
  position: absolute; left: 8px; top: 8px;
  width: 16px; height: 16px;
}
.pixel-smile::after {
  box-shadow:
    16px 0 0 0 #101010, 48px 0 0 0 #101010,
    0 48px 0 0 #101010, 64px 48px 0 0 #101010,
    16px 64px 0 0 #101010, 32px 64px 0 0 #101010, 48px 64px 0 0 #101010;
  background: transparent;
}
.pixel-pencil::after {
  background: #101010;
  box-shadow:
    16px 16px 0 0 #101010, 32px 32px 0 0 #101010,
    48px 48px 0 0 #101010, 64px 64px 0 0 #101010, 0 0 0 0 #101010;
}
.pixel-heart::after {
  box-shadow:
    32px 0 0 0 #101010,
    -8px 16px 0 0 #101010, 16px 16px 0 0 #101010, 40px 16px 0 0 #101010, 64px 16px 0 0 #101010,
    0 32px 0 0 #101010, 24px 32px 0 0 #101010, 48px 32px 0 0 #101010,
    16px 48px 0 0 #101010, 40px 48px 0 0 #101010,
    32px 64px 0 0 #101010;
}
.scard:hover .pixel-art { animation: pixelPop .6s var(--ease); }
@keyframes pixelPop { 0%{ transform: scale(1);} 40%{ transform: scale(1.12) rotate(-3deg);} 100%{ transform: scale(1);} }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: clamp(30px, 4vw, 60px) clamp(14px, 3vw, 40px) clamp(50px,6vw,80px); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gap); }
.contact-cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 320px; }
.contact-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.contact-cta p { font-size: 17px; margin-bottom: 26px; max-width: 40ch; }
.contact-side { display: grid; gap: var(--gap); }
.newsletter h3, .socials span {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  margin-bottom: 8px; display: block;
}
.newsletter p { font-size: 14.5px; color: #2b2622; margin-bottom: 18px; }
.field { display: flex; gap: 10px; }
.field input {
  flex: 1;
  border: 1.6px solid var(--black);
  border-radius: var(--pill);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  background: transparent;
  outline: none;
}
.field input:focus { border-color: var(--blue); }
.field button {
  width: 52px; flex: 0 0 52px; height: 52px;
  border-radius: 50%;
  background: var(--black); color: #fff;
  border: none; font-size: 22px; cursor: pointer;
  transition: transform .35s var(--ease), background .3s;
}
.field button:hover { transform: rotate(45deg); background: var(--blue); }
.form-msg { display: block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--blue); min-height: 18px; }
.socials .social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.socials .social-row a {
  font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: var(--pill);
  background: rgba(0,0,0,.12);
  transition: background .3s, transform .3s var(--ease);
}
.socials .social-row a:hover { background: #101010; color: #fff; transform: translateY(-3px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { position: relative; background: var(--cream); padding: clamp(40px,5vw,70px) clamp(20px,4vw,60px) 40px; overflow: hidden; }
.footer-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 80%);
          mask-image: linear-gradient(to top, #000, transparent 80%);
}
/* scattered color squares */
.footer-grid-bg::before, .footer-grid-bg::after {
  content: "";
  position: absolute;
  width: 46px; height: 46px;
}
.footer-grid-bg::before { background: var(--blue);   left: 12%; bottom: 30%; box-shadow: 40vw 8vh 0 0 var(--red), 68vw -6vh 0 0 var(--yellow); }
.footer-grid-bg::after  { background: var(--orange); left: 30%; bottom: 55%; box-shadow: 30vw -3vh 0 0 var(--purple), -6vw 6vh 0 0 var(--green); }
.footer-inner { position: relative; z-index: 2; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 30px; border-bottom: 1.5px solid rgba(0,0,0,.14);
  flex-wrap: wrap; gap: 16px;
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-weight: 600; font-size: 15px; }
.footer-nav a:hover { color: var(--red); }
.footer-back { font-weight: 600; }
.footer-back:hover { color: var(--blue); }
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 16vw, 260px);
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-align: center;
  color: var(--black);
  margin: clamp(20px,4vw,50px) 0;
  user-select: none;
}
.footer-wordmark span { color: var(--red); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: #4a433d; padding-top: 20px;
  border-top: 1.5px solid rgba(0,0,0,.14);
}

/* ============================================================
   REVEAL ANIMATION & SCROLLYTELLING UTILS
   ============================================================ */
/* Elements are visible by default for progressive enhancement */
.line { overflow: hidden; }
.char { display: inline-block; }

/* Pinning Helpers */
.pin-wrap { width: 100%; position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1025px) {
  .topbar { display: none !important; }
}
@media (max-width: 1024px) {
  .topnav { display: none; }
  .topbar-cta { display: none; }
  .menu-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  
  /* Fallback layout for portfolio on tablet/mobile */
  .portfolio { padding: 40px clamp(14px, 3vw, 40px); }
  .portfolio-container { height: auto; display: block; }
  .portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    padding: 0;
    transform: none !important;
  }
  .pcard {
    width: 100%;
    height: auto;
    min-height: 380px;
  }
  .pcard--wide {
    width: 100%;
  }

  .sidebar-aside { display: none !important; }
  .main-content { margin-left: 0; width: 100%; }
}
@media (max-width: 720px) {
  .hero { padding-top: 120px; }
  .hero-title { font-size: clamp(46px, 15vw, 90px); }
  .expertise-grid { grid-template-columns: 1fr; }
  .stand-grid { grid-template-columns: 1fr; }
  .arrows-header { flex-direction: column; gap: 8px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cursor { display: none; }
}
