/* ============================================================
   main.css — all custom styles for the portfolio (index.html).
   Consolidated from the former inline <style> blocks and site-header.css.
   Loaded once in <head>.

   1. Header (desktop layout of the single mobile nav) + active nav item
   2. Motion — hero rotating words + appear animations
   3. Mobile fullscreen menu + phone / tablet hotfixes
   4. Round-2 fixes — up button, download, section title, arrows, footer
   ============================================================ */


/* ============================================================
   1. HEADER
   ONE html structure: the mobile nav (.mob-nav + .mob-menu, in index.html)
   is the single source. Its mobile look/behaviour is left exactly as it was;
   below we only add the DESKTOP layout via @media (min-width:810px).
   ============================================================ */

/* the old Framer desktop nav is not used */
nav.framer-zyure,
[data-framer-name="top-nav"],
[data-framer-name="nav-top"] { display: none !important; }

@media (min-width: 810px) {
  .mob-nav {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 99990;
    height: 64px;
    align-items: center;
    justify-content: flex-start;
    padding: 0 clamp(20px, 5vw, 64px);
    box-sizing: border-box;
    background: rgba(235, 242, 242, .82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(30, 62, 69, .10);
  }
  .mob-nav-logo {
    font-family: 'Stretch Pro Regular', 'Stretch Pro', sans-serif !important;
    font-size: clamp(20px, 2.2vw, 26px) !important;
    font-weight: 700;
    letter-spacing: .02em;
    color: rgb(30, 62, 69) !important;
    text-decoration: none !important;
  }
  .mob-burger { display: none !important; }

  /* the slide-in panel becomes an inline nav pinned to the right of the bar */
  .mob-menu {
    display: flex !important;
    position: fixed;
    top: 0; right: 0; left: auto; bottom: auto;
    z-index: 99991;
    height: 64px;
    width: auto;
    flex-direction: row;
    align-items: center;
    padding: 0 clamp(20px, 5vw, 64px) 0 0;
    box-sizing: border-box;
    background: transparent !important;
    transform: none !important;
    visibility: visible !important;
  }
  .mob-menu-top,
  .mob-menu-footer { display: none !important; }

  .mob-menu-links {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: clamp(18px, 3vw, 42px) !important;
  }
  .mob-menu-links li { list-style: none !important; }
  .mob-menu-links a {
    position: relative;
    font-family: 'Satoshi', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgb(30, 62, 69) !important;
    text-decoration: none !important;
    white-space: nowrap;
    opacity: 1 !important;
    transform: none !important;
    line-height: 1 !important;
    transition: opacity .2s ease !important;
  }
  .mob-menu-links a:hover { opacity: .55; }

  /* active nav item (the .active class is toggled on scroll by a later task) —
     a lime line that grows in from the left, behind the text */
  .mob-menu-links a::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 0;
    height: 100%;
    border-radius: 2px;
    background: #c7ef00;
    transition: width .35s ease;
    transform: translateX(10px);
  }
  .mob-menu-links a.active::before { width: 100%; }
}

/* keep page content off the screen edges between phone and desktop widths */
@media (max-width: 1279.98px) {
  section > [data-framer-name="Container"],
  section > [data-framer-name="container"] {
    padding-left: clamp(20px, 5vw, 64px) !important;
    padding-right: clamp(20px, 5vw, 64px) !important;
    box-sizing: border-box !important;
  }
}


/* ============================================================
   2. MOTION — hero rotating words + appear animations
   Framer stacked the 4 hero words with per-word top/bottom offsets and drove
   them with variant swaps. We override that: every word occupies the SAME box
   inside the clipped pill, so they overlap and slide as one clean marquee.
   ============================================================ */
html { scroll-behavior: smooth; }

.framer-1flt0sx-container .framer-zkx2ec { position: relative; overflow: hidden; }
.framer-1flt0sx-container [data-framer-component-type="RichTextContainer"] {
  position: absolute !important;
  top: 0 !important;
  bottom: auto !important;
  left: auto !important;
  right: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  transform: translateY(120%);
  opacity: 0;
  will-change: transform, opacity;
}
.framer-1flt0sx-container [data-framer-component-type="RichTextContainer"].rw-current {
  transform: translateY(0);
  opacity: 1;
}
.framer-1flt0sx-container [data-framer-component-type="RichTextContainer"].rw-exit {
  transform: translateY(-120%);
  opacity: 0;
}
/* parked below with no transition, so re-entry never animates the wrap-around */
.framer-1flt0sx-container [data-framer-component-type="RichTextContainer"].rw-below {
  transform: translateY(120%);
  opacity: 0;
  transition: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  [data-framer-appear-id] {
    opacity: 0.001;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  }
  [data-framer-appear-id].has-appeared {
    opacity: 1 !important;
    transform: none !important;
  }
  /* hover feedback (Framer used JS variant swaps; plain CSS is enough) */
  a.framer-qkgUv, .framer-vWohA { transition: transform .25s ease; }
  a.framer-qkgUv:hover, .framer-vWohA:hover { transform: translateY(-2px); }
  nav.framer-zyure a { transition: opacity .2s ease; }
  nav.framer-zyure a:hover { opacity: .65; }
  a[href$=".html"] img { transition: transform .45s cubic-bezier(.22,1,.36,1); }
  a[href$=".html"]:hover img { transform: scale(1.03); }
  /* rotating words animate only when motion is allowed */
  .framer-1flt0sx-container [data-framer-component-type="RichTextContainer"] {
    transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .4s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-framer-appear-id] { opacity: 1 !important; transform: none !important; }
  /* rotating words: hold the first word, no motion */
  .framer-1flt0sx-container [data-framer-component-type="RichTextContainer"] { transition: none !important; }
  .framer-1flt0sx-container [data-framer-component-type="RichTextContainer"].rw-current { transform: none; opacity: 1; }
}


/* ============================================================
   3. MOBILE fullscreen menu + phone / tablet hotfixes
   ============================================================ */
.mob-nav, .mob-menu { display: none; }

@media (max-width: 809.98px) {
  /* the saved snapshot only has the Desktop nav variant – hide it on phone */
  nav.framer-zyure { display: none !important; }

  /* the rotated "Up" side button overlaps content on phone (hidden on the live site too) */
  .framer-xq9ps4-container { display: none !important; }

  /* rotating hero words ("Product / UI Motion / UX/UI"): the desktop variant
     is a fixed 345px-wide component with 58px type inside a 328px column,
     which clipped the first letter. Fit it to the column and scale the type. */
  .framer-1flt0sx-container { width: 100% !important; max-width: 100% !important; }
  .framer-1flt0sx-container .framer-zkx2ec { width: 100% !important; }
  .framer-1flt0sx-container .framer-text { font-size: 52px !important; }
  /* words now share one box and right-align inside the slot (see section 2). */
  .framer-1flt0sx-container [data-framer-component-type="RichTextContainer"] {
    left: auto !important;
    right: 0 !important;
  }

  /* the floating "Experience" label sat at its desktop x-position (~518px),
     fully off-screen on a 360px viewport */
  .framer-ty4ekh {
    left: 16px !important;
    right: auto !important;
  }

  /* top bar: logo + burger */
  .mob-nav {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 99990;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(235, 242, 242, .88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30, 62, 69, .12);
  }
  .mob-nav-logo {
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .02em;
    color: rgb(30, 62, 69);
    text-decoration: none;
  }
  .mob-burger {
    width: 44px; height: 44px;
    margin: -8px -8px -8px 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 6px;
    background: none; border: 0; padding: 0;
    cursor: pointer;
  }
  .mob-burger span {
    display: block;
    width: 26px; height: 2px;
    background: rgb(30, 62, 69);
    border-radius: 2px;
  }

  /* fullscreen panel, slides in from the right */
  .mob-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99991;
    flex-direction: column;
    justify-content: space-between;
    padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
    background: rgb(30, 62, 69);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .38s cubic-bezier(.32,.72,.28,1), visibility 0s linear .38s;
  }
  .mob-menu.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .38s cubic-bezier(.32,.72,.28,1);
  }

  .mob-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mob-menu-logo {
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: rgb(235, 242, 242);
    text-decoration: none;
  }
  .mob-close {
    width: 44px; height: 44px;
    margin: -8px -8px -8px 0;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; padding: 0;
    cursor: pointer;
    color: rgb(235, 242, 242);
    font-size: 30px; line-height: 1;
  }

  .mob-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0; padding: 0;
  }
  .mob-menu-links a {
    display: block;
    font-family: 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: clamp(34px, 9vw, 44px);
    line-height: 1.35;
    color: rgb(235, 242, 242);
    text-decoration: none;
    opacity: 0;
    transform: translateX(32px);
    transition: opacity .35s ease, transform .35s ease;
  }
  .mob-menu.open .mob-menu-links a { opacity: 1; transform: translateX(0); }
  .mob-menu.open .mob-menu-links li:nth-child(1) a { transition-delay: .10s; }
  .mob-menu.open .mob-menu-links li:nth-child(2) a { transition-delay: .16s; }
  .mob-menu.open .mob-menu-links li:nth-child(3) a { transition-delay: .22s; }
  .mob-menu.open .mob-menu-links li:nth-child(4) a { transition-delay: .28s; }
  .mob-menu-links a:active { color: rgb(227, 236, 7); }

  .mob-menu-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mob-menu-footer a {
    font-family: 'Satoshi', sans-serif;
    font-size: 15px;
    color: rgba(235, 242, 242, .72);
    text-decoration: none;
  }
  .mob-menu-footer .mob-cta {
    display: inline-block;
    align-self: flex-start;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgb(227, 236, 7);
    color: rgb(30, 62, 69);
    font-weight: 700;
    font-size: 15px;
  }
}

/* Experience (#about) and Contact ("Let's Stay Connected") sections only
   survived as desktop variants with fixed 1180px/1080px/917px inner blocks.
   They clip on BOTH phone and tablet, so reflow them below the desktop
   breakpoint (<1280px) rather than only on phone. */
@media (max-width: 1279.98px) {
  .framer-1ptuqqo, .framer-1y6mhfd {
    width: 100% !important;
    min-width: 0 !important;
  }
  .framer-1ptuqqo *, .framer-1y6mhfd * {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .framer-1ptuqqo [data-framer-component-type="RichTextContainer"],
  .framer-1y6mhfd [data-framer-component-type="RichTextContainer"] {
    width: auto !important;
    white-space: normal !important;
  }
  /* section heading kept its fixed 917px desktop width – let it wrap */
  .framer-wp4dkt { width: 100% !important; }

  /* The email is a Framer "fit-text" SVG (<svg viewBox="0 0 308.15 20">):
     it is DESIGNED to scale itself to its container width. Do NOT inject a
     px/vw font-size into the SVG's unit space — that overflowed the 20-unit
     viewBox and clipped the text as the viewport grew. Instead let the SVG
     scale naturally so the whole address shrinks to fit the card. */
  .framer-9btkoi {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 308.15 / 20;
    overflow: visible !important;
  }
  .framer-9btkoi .framer-text { white-space: nowrap !important; }

  /* "Let's Stay Connected": 44px type can't fit "Connected" in the 280px
     card column ("CONNECTE / D") – scale it to the column */
  .framer-1fk1jxv .framer-text { font-size: clamp(26px, 9.4vw, 34px) !important; }

  /* social icons row is a fixed 293px desktop block that clipped its first
     and last icon – let it fit and center inside the card */
  .framer-1rzd4oq {
    width: auto !important;
    max-width: 100% !important;
    justify-content: center !important;
    gap: clamp(12px, 5vw, 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
  }
  /* undo the blanket min-width:0 inside the icon row – it collapsed the
     intrinsic width of the LinkedIn/Dribbble icon graphics to half size */
  .framer-1rzd4oq * {
    min-width: initial !important;
    max-width: none !important;
  }
  /* footer icon rows: LinkedIn/Dribbble graphics kept their natural desktop
     width and were sliced by the 33px overflow-hidden box – fit them */
  .framer-1j0fqk1 a > div,
  .framer-1564w5w a > div,
  .framer-1rzd4oq a > div {
    width: 100% !important;
    height: 100% !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  /* contact-card icon row: its overflow-hidden wrapper (.framer-1c64zq3)
     is 248px while the row spans ~293px, slicing the first and last icon.
     Let the wrapper breathe and pack the row tighter, centered. */
  .framer-1c64zq3 {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .framer-1564w5w, .framer-1j0fqk1 {
    width: auto !important;
    max-width: 100% !important;
    gap: 16px !important;
    justify-content: center !important;
    margin: 0 auto !important;
  }

  /* exceptions to the reflow above: short labels/buttons must stay on one
     line instead of wrapping word-per-word inside their fixed-width boxes */
  .framer-1degmhn { width: max-content !important; }
  .framer-1hk6mja,
  .framer-1hk6mja .framer-text,
  .framer-10umkwd,
  .framer-10umkwd .framer-text {
    width: max-content !important;
    white-space: nowrap !important;
  }
}

/* "Book Meeting" button: drop the inline backdrop blur (design decision) */
a.framer-qkgUv {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mob-menu, .mob-menu-links a { transition: none !important; }
}


/* ============================================================
   4. ROUND-2 FIXES — up button, download, section title, arrows, footer
   ============================================================ */

/* shrink the floating "Up" side button (desktop only; hidden on phone) */
.framer-xq9ps4-container {
  transform: translateY(-50%) rotate(-90deg) scale(0.7) !important;
  transform-origin: center center !important;
}

/* Download Resume: clip the teal accent circle to the pill so it
   no longer bleeds off the left edge (applies at all widths) */
.framer-ztiw04 { overflow: hidden !important; }

@media (max-width: 1279.98px) {
  /* section-title pill ("Design Process") must fit the viewport */
  .framer-92nrob {
    max-width: calc(100vw - 32px) !important;
    overflow: hidden !important;
  }
  .framer-92nrob .framer-text {
    font-size: clamp(13px, 3.4vw, 21px) !important;
    white-space: nowrap !important;
  }

  /* connector arrows point DOWN once the cards stack vertically */
  [data-framer-name="arrow"],
  [data-framer-name="arrow wrap"] {
    transform: rotate(90deg) !important;
    transform-origin: center center !important;
  }

  /* the FOOTER email is plain text (per-letter spans), not the hero fit-text
     SVG. Give it a responsive size so the whole address fits the card. */
  #footer a[href^="mailto:"],
  #footer a[href^="mailto:"] span {
    font-size: clamp(13px, 4.2vw, 21px) !important;
    letter-spacing: 0 !important;
  }
  #footer a[href^="mailto:"] {
    display: inline-block !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  /* never touch a fit-text SVG email if one exists in the footer */
  #footer .framer-9btkoi a[href^="mailto:"],
  #footer .framer-9btkoi a[href^="mailto:"] span {
    font-size: inherit !important;
    letter-spacing: normal !important;
  }

  /* footer social icons are oversized; cap them and tighten the row */
  #footer .framer-1rzd4oq { gap: clamp(14px, 5vw, 24px) !important; }
  #footer .framer-1rzd4oq > a {
    width: 34px !important;
    height: 34px !important;
    flex: none !important;
  }

  /* keep the "Download Resume" icon inside its pill */
  .framer-oesjeo {
    width: auto !important;
    max-width: 100% !important;
  }
  .framer-ztiw04 { max-width: 100% !important; overflow: hidden !important; }
}


/* ============================================================
   5. BASE PAGE FIXES (moved from the index.html <head>)
   ============================================================ */
body {
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}
/* desktop only: on phone this -48px shifted the rotating-words row left and
   clipped the first letter ("UI Motion" -> "I Motion") */
@media (min-width: 810px) {
  div[data-framer-name="wing-left"] { margin-right: -48px; }
}

/* project modal (clicking a project opens it fullscreen in an iframe) */
html { scrollbar-gutter: stable; }
.project-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.project-modal.open { opacity: 1; pointer-events: auto; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 21, 26, .72); backdrop-filter: blur(4px); }
.project-modal-panel { position: relative; width: 100%; height: 100%; background: #ebf2f2; border-radius: 0; overflow: hidden; box-shadow: none; transform: none; }
#projectModalFrame { width: 100%; height: 100%; border: none; display: block; }
