/* Landing page. Values from the Cherry Portfolio design system tokens */
:root {
  --page: #fffefc;
  --surface: #ffffff;
  --hairline: #ececf0;
  --ink: #0c0c0c;
  --ink-body: #3d3d3d;
  --ink-muted: #67676e;
  --highlight: #ffd23f;
  --highlight-deep: #f2c21d;
  --folder-pink: #f9b8d0;
  --folder-pink-deep: #f197b8;
  --tag-pink: #f9c8da;
  --ask-border: #f2c9d8;
  --ask-accent: #b8336a;
  --line-warm: #e9e4dc;
  --shadow-polaroid: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-feature: 0 10px 40px rgba(20,20,40,0.08);
  --display: Fraunces, Georgia, serif;
  --body: Manrope, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
}
html, body { margin: 0; background: var(--page); }
body { font-family: var(--body); color: var(--ink); }
a { color: var(--ink); }
a:hover { color: var(--ink-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav and the chat box itself: nav.css (shared with the case studies) */

/* ---------- hero ---------- */
.hero { position: relative; max-width: 1440px; height: clamp(620px, calc(100vh - 72px), 828px); margin: 0 auto; padding: 0 72px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; }
.intro-copy { grid-column: 1; grid-row: 1; align-self: center; margin-top: -24px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 300; font-size: clamp(52px, 5.4vw, 78px); line-height: 1.02; letter-spacing: -0.03em; }
.roles { margin: 22px 0 0; font-family: var(--display); font-weight: 300; font-size: clamp(22px, 2vw, 30px); line-height: 1.2; letter-spacing: -0.015em; }
.hl { background: linear-gradient(transparent 12%, var(--highlight) 12%, var(--highlight) 90%, transparent 90%); padding: 0 6px; color: inherit; }
.amp { color: var(--ink-muted); padding: 0 2px; }
.oneliner { margin: 22px 0 0; max-width: 560px; font-size: 17px; line-height: 1.55; color: var(--ink-body); }

/* ---------- hero text micro-animations ---------- */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero h1 .c { display: inline-block; }
.hero h1.wave .c { animation: charWave .62s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 26ms); }
@keyframes charWave { 30% { transform: translateY(-9px) rotate(-3deg); } 100% { transform: none; } }
.hl { background-repeat: no-repeat; background-size: 100% 100%; }
.hl.swipe { animation: hlSwipe .5s cubic-bezier(.6,0,.2,1) both; }
@keyframes hlSwipe { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
/* the outer span pops in on entrance, the inner one spins on hover, so the two never fight over transform */
.roles .amp, .roles .amp-in { display: inline-block; }
.roles .amp-in { transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.roles:hover .amp-in { transform: rotate(360deg) scale(1.12); }
.oneliner .ow { display: inline-block; }
@media (prefers-reduced-motion: reduce) { .hero h1.wave .c, .hl.swipe { animation: none; } .roles .amp-in { transition: none; } }

/* ---------- folders (right column): frosted glass folders, cards fly out on hover ---------- */
/* sits in the space above the chat box; the 96px top padding is room for the tools to fly into without reaching the nav */
.stack { grid-column: 2; grid-row: 1; align-self: center; display: flex; flex-direction: column; gap: 44px; padding-top: 96px; padding-right: 16px; }
.stack { position: relative; }
/* collage cut-out of Cherry, tucked behind the folders and peeking out to their left.
   On hover its bottom-left tip peels up like a sticker: everything past the fold line y = x + k is cut from the
   photo and drawn again, mirrored across that line, as the paper back. --k = 302px is just past the tip (no peel). */
@property --k { syntax: "<length>"; inherits: true; initial-value: 302px; }
.me-cut { --h: 398px; --k: 302px; position: absolute; z-index: 0; right: 140px; top: 112px; width: 340px; height: var(--h);
  transform: rotate(-4deg); filter: drop-shadow(0 10px 18px rgba(20,20,40,0.16)); transition: --k .5s cubic-bezier(.34,1.45,.64,1); }
.me-cut:hover, .me-cut.peel { --k: 250px; }
.me-front { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, calc(var(--h) - var(--k)) 100%, 0 var(--k)); }
.me-flap-wrap { position: absolute; inset: 0; pointer-events: none; filter: drop-shadow(1px 2px 2.5px rgba(40,30,20,0.28)); }
.me-flap { position: absolute; inset: 0;
  background: radial-gradient(circle at 0 100%, #fffbf3 0, #f3ede1 calc((var(--h) - var(--k)) * 0.45), #dcd2bf calc((var(--h) - var(--k)) * 0.75));
  -webkit-mask: url("assets/me-collage.png") 0 0 / 100% 100% no-repeat; mask: url("assets/me-collage.png") 0 0 / 100% 100% no-repeat;
  clip-path: polygon(0 var(--k), 0 100%, calc(var(--h) - var(--k)) 100%);
  transform-origin: 0 0; transform: translate(0, var(--k)) matrix(0, 1, 1, 0, 0, 0) translate(0, calc(-1 * var(--k))); }
.gf-item { z-index: 1; }
.gf-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; outline: none; cursor: default; }
.gf-item:hover, .gf-item:focus-visible, .gf-item.fly { z-index: 2; }
.gf { position: relative; width: 184px; height: 150px; margin-bottom: 12px; filter: drop-shadow(0 10px 18px rgba(20,20,40,0.10)); transition: transform .4s var(--ease); }
.gf-back { position: absolute; left: 6px; right: 6px; top: 4px; bottom: 6px; border-radius: 12px; background: #dedee3; }

.gf-card { position: absolute; z-index: 1; left: 50%; top: 0; transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.34,1.4,.64,1); }
.gf-card.c-left  { transform: translate(-50%, 0) translate(-44px, 10px) rotate(-12deg); }
.gf-card.c-mid   { transform: translate(-50%, 0) translate(0, -10px) rotate(3deg); }
.gf-card.c-right { transform: translate(-50%, 0) translate(44px, 8px) rotate(11deg); }
.gf-item:hover .gf, .gf-item:focus-visible .gf, .gf-item.fly .gf { transform: translateY(-4px); }
.gf-item:hover .c-left,  .gf-item:focus-visible .c-left,  .gf-item.fly .c-left  { transform: translate(-50%, 0) translate(-90px, -50px) rotate(-16deg); }
.gf-item:hover .c-mid,   .gf-item:focus-visible .c-mid,   .gf-item.fly .c-mid   { transform: translate(-50%, 0) translate(0, -64px) rotate(2deg) scale(1.06); }
.gf-item:hover .c-right, .gf-item:focus-visible .c-right, .gf-item.fly .c-right { transform: translate(-50%, 0) translate(90px, -48px) rotate(15deg); }
.gf-item:hover .c-mid { transition-delay: .04s; }
.gf-item:hover .c-right { transition-delay: .08s; }

/* experience: six cards fanned in an arc, positions set per card */
.gf-card.arc { transform: translate(-50%, 0) translate(var(--rx), var(--ry)) rotate(var(--rr)); transition-delay: 0s; }
.gf-item:hover .gf-card.arc, .gf-item:focus-visible .gf-card.arc, .gf-item.fly .gf-card.arc { transform: translate(-50%, 0) translate(var(--fx), var(--fy)) rotate(var(--fr)); transition-delay: var(--d); }
.photo.arc { width: 72px; height: 86px; padding: 3.5px; border-radius: 9px; }

/* app icons (tools) */
.app { width: 62px; height: 62px; border-radius: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(0,0,0,0.18); }
.app img, .app svg { height: 32px; width: auto; display: block; }
.app-figma { background: linear-gradient(180deg, #2f2f2f, #151515); }
.app-figma svg { height: 34px; }
.app-claude { background: #d97757; }
.app-notion { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 6px 14px rgba(0,0,0,0.18); }
/* photos (experience) */
.photo { width: 82px; height: 96px; box-sizing: border-box; padding: 4px; border-radius: 10px; background: #fff; box-shadow: 0 6px 14px rgba(0,0,0,0.16); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }

/* frosted front with the tab on the right */
.gf-front { position: absolute; z-index: 3; left: 0; bottom: 0; width: 184px; height: 134px;
  clip-path: path("M0 26Q0 14 12 14H68Q75 14 79 8Q84 0 93 0H172Q184 0 184 12V122Q184 134 172 134H12Q0 134 0 122Z");
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(243,243,246,0.8)); -webkit-backdrop-filter: blur(9px) saturate(1.4); backdrop-filter: blur(9px) saturate(1.4); }
.gf-shape { position: absolute; inset: 0; width: 100%; height: 100%; }
.gf-shape path { fill: none; stroke: rgba(255,255,255,0.95); stroke-width: 2.5; }
.gf-front::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 16px; height: 5px; border-top: 1px solid rgba(20,20,40,0.07); border-bottom: 1px solid rgba(255,255,255,0.95); }

/* stickers on the front */
.sticker { position: absolute; transform: rotate(var(--r, 0deg)); }
.sticker-tag { padding: 3px 7px; border: 2.5px solid #fff; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.14); font-family: var(--mono); font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--ink); }
.tag-y { background: var(--highlight); }
.tag-p { background: var(--tag-pink); }
.sticker-logo { height: auto; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 2px 3px rgba(0,0,0,0.18)); }

.gf-name { font-size: 16px; font-weight: 500; color: var(--ink); }
.gf-count { padding: 3px 10px; border-radius: 999px; background: #efeff2; font-size: 12.5px; color: var(--ink-muted); }

/* ---------- ask me anything: styled like the nav (pill, thin border, frosted off-white, Manrope 14) ---------- */
.chat-area { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: 660px; padding-bottom: 48px; text-align: center; }
.chat-slot { width: 560px; height: 48px; margin: 0 auto; }                      /* keeps the box's place in the layout while it is stuck under the nav */
.chat-float { position: relative; z-index: 35; width: 560px; }
.chat-float.stuck { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); }
.suggest { margin-top: 14px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; transition: opacity .2s; }
.suggest button { padding: 7px 13px; border: 1px solid rgba(12,12,12,0.14); border-radius: 999px; background: transparent; font: 500 13px var(--body); color: var(--ink-muted); cursor: pointer; transition: color .2s, border-color .2s; }
.suggest button:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- experience strip (from Landing v3) ---------- */
.exp { max-width: 1440px; margin: 0 auto; padding: 96px 72px 0; box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.exp-label { font-family: var(--display); font-weight: 300; font-size: 34px; line-height: 1.15; letter-spacing: -0.01em; }
.exp-label span { display: block; margin-top: 10px; font-family: var(--body); font-size: 15px; color: var(--ink-muted); letter-spacing: 0; }
.exp-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.exp-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.exp-yr { font-family: var(--mono); color: var(--ink-muted); }
.exp-co { color: var(--ink); text-decoration: none; }
a.exp-co:hover { color: var(--ink-muted); }
.exp-co span { font-size: 12px; color: var(--ink-muted); }
.exp-role { color: var(--ink-muted); }

/* ---------- work grid ---------- */
.work { max-width: 1440px; margin: 0 auto; padding: 72px 72px 160px; box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 56px; }
.card { display: block; text-decoration: none; color: var(--ink); }
/* rise in as they scroll into view (from Landing v3); .in is added by a scroll observer in landing.js */
.js-rise .card { opacity: 0; transform: translateY(48px); transition: opacity .8s ease-out, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js-rise .card.in { opacity: 1; transform: none; }
.card-img { border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-img img { transform: scale(1.03); }
.ph { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.t { margin-top: 16px; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.3; }
.s { margin-top: 4px; font-size: 14px; color: var(--ink-muted); }

/* ---------- contact footer (from Landing v3): dark warm dome, skill pills, buttons, link columns ---------- */
.contact { position: relative; isolation: isolate; padding: 0 0 100px; box-sizing: border-box; overflow: hidden; margin-top: 40px;
  background: linear-gradient(transparent 95px, #1b1814 95px); }
/* the dome: a broad arch, rounded in the middle and easing into the page edges, stretched to the page width */
.contact::before { content: ""; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 96px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 96' preserveAspectRatio='none'%3E%3Cpath d='M0 96C130 46 300 0 500 0S870 46 1000 96Z' fill='%231b1814'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.contact .pill { position: absolute; padding: 10px 20px; border-radius: 999px; border: 1px solid #4a433a; background: #25211c; color: #d9d1c4; font-size: 18px; white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s; }
.contact .pill:hover { background: var(--highlight); color: #1b1a17; border-color: var(--highlight); }
.contact h2 { position: relative; margin: 0; padding-top: 168px; text-align: center; font-family: var(--display); font-weight: 300; font-size: 66px; line-height: 1.04; letter-spacing: -0.02em; color: #f4efe4; pointer-events: none; }
.contact h2 em { color: var(--highlight); }
.contact-note { position: relative; max-width: 470px; margin: 44px auto 0; text-align: center; font-size: 18px; line-height: 1.6; color: #b9b1a5; pointer-events: none; }
.contact-btns { position: relative; margin-top: 30px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact-btns a { font-size: 15px; text-decoration: none; border-radius: 999px; }
.contact-btns a:hover { opacity: .85; }
.btn-primary { padding: 12px 22px; background: var(--highlight); color: #1b1a17; font-weight: 600; }
.btn-line { padding: 11px 21px; border: 1px solid #6b6358; color: #f4efe4; font-weight: 500; }
.contact-btns a.btn-primary:hover { color: #1b1a17; }
.contact-btns a.btn-line:hover { color: #f4efe4; }
.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding: 36px 72px 32px; background: #1b1814; border-top: 1px solid #2f2a24; font-size: 14px; }
.foot-left { display: flex; flex-direction: column; gap: 10px; }
.foot-cols { display: flex; gap: 72px; }
.foot-cols div { display: flex; flex-direction: column; gap: 12px; }
.foot-cols span { color: #f4efe4; font-weight: 500; }
.foot-cols a { color: #8e857a; text-decoration: none; }
.foot-cols a:hover { color: #f4efe4; }
.foot-copy { color: #8e857a; font-size: 14px; }
.foot-top { color: #8e857a; text-decoration: none; }
.foot-top:hover { color: #f4efe4; }

@media (max-width: 900px) {
  .me-cut { display: none; }                      /* phone layout for the cut-out still to be designed */
  .hero { height: auto; padding: 48px 20px 40px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 48px; }
  .hero h1 { font-size: 46px; }
  .roles { font-size: 22px; }
  .stack, .chat-area, .intro-copy { grid-column: 1; grid-row: auto; margin-top: 0; }
  .stack { flex-direction: row; justify-content: center; gap: 20px; padding: 56px 0 0; }
  .stack .gf-item { zoom: 0.72; }                /* both folders, cards and labels, scaled to fit side by side */
  .chat-area { width: 100%; }
  .chat-slot { width: 100%; }
  html, body { overflow-x: clip; }   /* the folders' fly-out cards can poke past a phone screen */
  .chat-float.stuck { position: relative; top: auto; left: auto; transform: none; }
  .chat-float { width: 100%; }
  .work { grid-template-columns: minmax(0, 1fr); padding: 56px 20px 120px; }
  .exp { grid-template-columns: minmax(0, 1fr); padding: 64px 20px 0; gap: 24px; }
  .exp-list li { grid-template-columns: 64px minmax(0, 1fr); }
  .exp-role { grid-column: 2; }
  .contact h2 { font-size: 44px; }
  .contact .pill { display: none; }
  .foot { padding: 32px 20px; flex-direction: column; align-items: flex-start; }
  .foot-cols { gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .gf, .gf-card, .chat, .card-img img { transition: none; }
  .js-rise .card { opacity: 1; transform: none; transition: none; }
}
html.shot { scrollbar-width: none; }
/* the phone-screen capture is taken at a fixed size; pin the hero to its height in a 900px window */
html.pin .hero { height: 828px; }
html.shot *, html.shot *::after { transition: none !important; }
