/* ============================================================
   Sara Metwally — Portfolio 2026
   Palette & type drawn from her original portfolio deck:
   blush peach, warm cream, dark olive ink, taupe doodles.
   ============================================================ */

:root {
  --cream: #FBF6EF;
  --cream-deep: #F6EEE3;
  --blush: #F9E1D4;
  --blush-soft: #FCEFE6;
  --ink: #423A22;
  --ink-soft: #6E644A;
  --taupe: #C9B7A8;
  --taupe-soft: #E2D6CB;
  --amber: #DE9A3F;
  --amber-deep: #8A5A10;
  --white: #FFFDFA;

  --font-display: "Fredoka", sans-serif;
  --font-body: "Karla", sans-serif;
  --font-serif: "Fraunces", serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 10px 30px -12px rgba(66, 58, 34, 0.18);
  --shadow-lift: 0 22px 44px -16px rgba(66, 58, 34, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

/* ---- grain overlay for warmth ---- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.26 0 0 0 0 0.23 0 0 0 0 0.13 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ doodles ============ */
.doodle {
  position: absolute;
  pointer-events: none;
  color: var(--taupe);
  z-index: 0;
}

/* ============ reveal animations ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none !important; }
  * { animation-duration: 0.001s !important; }
}

/* ============ header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(251, 246, 239, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(66, 58, 34, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark svg {
  color: var(--amber);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.site-nav a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.25s ease;
}

.site-nav a:not(.btn):hover {
  color: var(--ink);
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--amber);
  transition: right 0.3s var(--ease-out);
}

.site-nav a:not(.btn):hover::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--ink);
}

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--ink);
  color: var(--cream);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  background: #55492c;
  border-color: #55492c;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  transform: translateY(-3px);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn--small {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* ============ hero ============ */
.hero {
  position: relative;
  padding: 10.5rem 0 5.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -12vw;
  width: 52vw;
  background: var(--blush);
  border-radius: 0 0 0 340px;
  z-index: -1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.hero h1 .squiggle-word {
  position: relative;
  white-space: nowrap;
  color: var(--amber-deep);
}

.hero h1 .squiggle-word svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.28em;
  width: 100%;
  height: 0.32em;
  color: var(--amber);
  overflow: visible;
}

.hero__sub {
  max-width: 34rem;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

/* portrait */
.hero__portrait {
  position: relative;
  justify-self: center;
}

.hero__photo-wrap {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 3 / 4;
}

.hero__photo-wrap::before {
  content: "";
  position: absolute;
  inset: -14px -10px 14px 18px;
  background: var(--white);
  border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-soft);
}

.hero__photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  z-index: 1;
}

.chip-float {
  position: absolute;
  z-index: 2;
  background: var(--white);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  animation: floaty 5.5s ease-in-out infinite;
}

.chip-float strong {
  font-weight: 600;
  color: var(--amber-deep);
}

.chip-float--a { top: 8%; left: -3.2rem; animation-delay: 0s; }
.chip-float--b { bottom: 12%; right: -2.6rem; animation-delay: 1.6s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ============ marquee ============ */
.brands {
  padding: 3.2rem 0 3.8rem;
  position: relative;
}

.brands__label {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 2.1rem;
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 2.6rem;
  width: max-content;
  animation: marquee 46s linear infinite;
  padding-block: 0.6rem;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.marquee a {
  flex: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border: 3px solid var(--white);
  transition: transform 0.3s var(--ease-out);
}

.marquee a:hover {
  transform: translateY(-6px) scale(1.06);
}

.marquee img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============ section scaffolding ============ */
.section {
  position: relative;
  padding: 5.5rem 0;
}

.section--blush {
  background: var(--blush-soft);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 3.2rem;
  position: relative;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 600;
}

.section-head p {
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* ============ about ============ */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.about__copy h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.about__copy p {
  color: var(--ink-soft);
}

.about__copy p strong {
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.stat-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  box-shadow: var(--shadow-lift);
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  right: -22px;
  top: -22px;
  background: var(--blush);
  opacity: 0.8;
}

.stat-card b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
}

.stat-card span {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* ============ expertise ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.skill-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  position: relative;
}

.skill-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lift);
}

.skill-card__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.skill-card__head svg {
  flex: none;
  color: var(--amber-deep);
  transition: transform 0.35s var(--ease-out);
}

.skill-card:hover .skill-card__head svg {
  transform: rotate(-10deg) scale(1.12);
}

.skill-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.skill-card p {
  color: var(--ink-soft);
  margin: 0;
}

/* ============ work ============ */
.market-label {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 4.2rem 0 2.2rem;
}

.market-label:first-of-type {
  margin-top: 0;
}

.market-label h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  color: var(--ink);
  white-space: nowrap;
}

.market-label::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--taupe) 0 10px, transparent 10px 18px);
  opacity: 0.7;
}

.market-label__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--amber-deep);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  padding: 2.6rem 0;
  align-items: start;
}

.project + .project {
  border-top: 2px dashed var(--taupe-soft);
}

.project__info {
  position: sticky;
  top: 110px;
}

.project__brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.project__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--white);
}

.project__brand h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

.project__market {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--blush);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  margin-top: 0.25rem;
}

.project__desc {
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project__tags li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid var(--taupe);
  color: var(--ink-soft);
  background: var(--white);
}

.project__tags-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

/* post gallery */
.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.posts--two {
  grid-template-columns: repeat(2, 1fr);
}

.post-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
  display: block;
  background: var(--white);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s var(--ease-out);
}

a.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

a.post-card:hover img {
  transform: scale(1.04);
}

.post-card__overlay {
  position: absolute;
  inset: auto 0.7rem 0.7rem;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
  pointer-events: none;
}

.post-card__overlay span {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

a.post-card:hover .post-card__overlay,
a.post-card:focus-visible .post-card__overlay {
  opacity: 1;
  transform: none;
}

.post-card--wide {
  aspect-ratio: 16 / 10;
  grid-column: 1 / -1;
}

/* ============ beyond ============ */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.beyond-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.beyond-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lift);
}

.beyond-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-deep);
}

.beyond-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s var(--ease-out);
}

.beyond-card:hover .beyond-card__img img {
  transform: scale(1.05);
}

.beyond-card__body {
  padding: 1.5rem 1.6rem 1.7rem;
}

.beyond-card__body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.beyond-card__body h3 svg {
  color: var(--amber);
  flex: none;
}

.beyond-card__body p {
  color: var(--ink-soft);
  margin: 0;
}

/* ============ contact ============ */
.contact {
  position: relative;
  overflow: hidden;
}

.contact__panel {
  position: relative;
  background: var(--blush);
  border-radius: 44px;
  padding: clamp(2.6rem, 6vw, 4.6rem);
  text-align: center;
  overflow: hidden;
}

.contact__panel h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 600;
  max-width: 22ch;
  margin-inline: auto;
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 1;
}

.contact__panel > p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2.2rem;
  position: relative;
  z-index: 1;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  position: relative;
  z-index: 1;
}

.contact__meta {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.6rem;
  position: relative;
  z-index: 1;
}

.contact__meta div {
  text-align: center;
}

.contact__meta dt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.contact__meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
}

.contact__meta a {
  text-decoration: none;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 1px;
  transition: color 0.25s;
}

.contact__meta a:hover {
  color: var(--amber);
}

/* ============ footer ============ */
.site-footer {
  padding: 2.4rem 0 2.8rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-footer__inner .wordmark {
  font-size: 1rem;
}

/* ============ responsive ============ */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 8.5rem;
  }

  .hero::before {
    width: 100vw;
    right: -20vw;
    top: auto;
    height: 46%;
    border-radius: 340px 0 0 0;
  }

  .hero__portrait {
    order: -1;
  }

  .hero__photo-wrap {
    width: min(300px, 70vw);
  }

  .chip-float--a { left: -1.4rem; }
  .chip-float--b { right: -1rem; }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project {
    grid-template-columns: 1fr;
  }

  .project__info {
    position: static;
  }

  .beyond-grid {
    grid-template-columns: 1fr 1fr;
  }

  .beyond-grid .beyond-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    background: var(--cream);
    padding: 1.4rem 1.5rem 2rem;
    gap: 1.3rem;
    box-shadow: var(--shadow-soft);
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease-out);
    z-index: 40;
  }

  .site-nav.is-open {
    transform: none;
  }

  .site-header {
    background: rgba(251, 246, 239, 0.92);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .posts {
    grid-template-columns: repeat(2, 1fr);
  }

  .posts--two {
    grid-template-columns: repeat(2, 1fr);
  }

  .beyond-grid {
    grid-template-columns: 1fr;
  }

  .beyond-grid .beyond-card:last-child {
    grid-column: auto;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__meta {
    gap: 1.4rem 2.2rem;
  }
}

@media (max-width: 460px) {
  .posts,
  .posts--two {
    grid-template-columns: 1fr;
  }

  .post-card {
    aspect-ratio: auto;
  }

  .post-card img {
    height: auto;
  }
}
