/* ==========================================================
   Chelomitha's portfolio · styles
   Palette (change here and the whole site follows):
   #D8A2A2 rose · #FFDCDC blush · #FFF9D6 cream · #8EA66B sage
   ========================================================== */
:root {
  --rose: #D8A2A2;
  --blush: #FFDCDC;
  --cream: #FFF9D6;
  --sage: #8EA66B;

  /* supporting tones derived from the palette, for readable text */
  --ink: #3b2f2f;
  --ink-soft: #6b5757;
  --sage-deep: #566b3a;
  --rose-deep: #9c6464;
  --card: #FFFEF4;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(216, 162, 162, 0.38) 1.3px, transparent 1.5px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; border-radius: 8px; }
.img-missing { visibility: hidden; }

.wrap {
  max-width: 1100px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.label {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose-deep);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.28rem; font-weight: 700; line-height: 1.2; }
.lede { color: var(--ink-soft); max-width: 60ch; margin-top: 14px; }
.note { color: var(--ink-soft); font-size: 0.9rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- header: floating pill ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
}
.pill-nav {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 220, 220, 0.94); backdrop-filter: blur(8px);
  border: 2px solid var(--rose); border-radius: 999px; padding: 7px 8px 7px 10px;
  box-shadow: 0 10px 24px -16px rgba(59, 47, 47, 0.5);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; flex: none; }
.logo { width: 34px; height: 34px; border-radius: 50% 50% 50% 12px; background: var(--sage); display: grid; place-items: center; font-weight: 800; transform: rotate(-6deg); }
nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
.nav-link { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; font-weight: 500; white-space: nowrap; transition: background 0.2s, transform 0.2s; }
.nav-link:hover { background: var(--cream); transform: translateY(-1px) rotate(-1.5deg); }
.nav-link[aria-current="page"] { background: var(--sage); font-weight: 600; }
@media (max-width: 760px) { .brand span:last-child { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  padding: 12px 24px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font-weight: 600; font-size: 0.98rem;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--sage); }
.btn-sm { padding: 7px 16px; font-size: 0.9rem; box-shadow: 2px 2px 0 var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---------- views ---------- */
.view { padding-block: clamp(36px, 6vw, 72px) 20px; }
.view-head { margin-bottom: clamp(24px, 4vw, 40px); max-width: 62ch; }
.view-head h2 { margin-top: 10px; }

.seg { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.seg-btn {
  cursor: pointer; padding: 9px 18px; border-radius: 999px; border: 2px solid var(--rose); background: var(--card);
  font-weight: 500; transition: transform 0.15s, background 0.15s;
}
.seg-btn:nth-child(odd):hover { transform: rotate(-2deg); }
.seg-btn:nth-child(even):hover { transform: rotate(2deg); }
.seg-btn[aria-selected="true"] { background: var(--sage); border-color: var(--ink); font-weight: 600; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(40px, 8vw, 96px); align-items: center; padding-top: clamp(20px, 4vw, 48px); }
.photo-wrap { position: relative; width: 100%; max-width: 340px; margin-inline: auto; }
.photo-wrap::before {
  content: ""; position: absolute; left: -30px; bottom: -26px; width: 82%; height: 80%; background: var(--rose);
  border-radius: 46% 54% 40% 60% / 56% 44% 56% 44%; animation: sway 9s ease-in-out infinite;
}
.photo-wrap::after { content: ""; position: absolute; right: -20px; top: 22px; width: 78px; height: 78px; border-radius: 50%; background: var(--sage); }
.photo {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; background: #fff;
  border: 6px solid var(--card); border-radius: 50% 50% 30px 30px / 38% 38% 30px 30px;
  box-shadow: 0 22px 40px -24px rgba(59, 47, 47, 0.6);
}
.sticker {
  position: absolute; z-index: 2; padding: 6px 16px; border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 600; font-size: 0.88rem; background: var(--blush); box-shadow: 2px 2px 0 var(--ink); white-space: nowrap;
}
.s1 { top: 9%; left: -38px; transform: rotate(-8deg); }
.s2 { bottom: 20%; right: -34px; transform: rotate(6deg); background: var(--sage); }
.s3 { bottom: -10px; left: 26px; transform: rotate(-3deg); background: var(--cream); }
@keyframes sway { 50% { transform: rotate(5deg) translate(6px, -4px); } }

.hero h1 { font-size: clamp(2.7rem, 6.6vw, 4.8rem); font-weight: 800; margin: 12px 0 20px; }
.hand {
  display: inline-block; padding-bottom: 0.12em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 50 2, 90 13, 140 7 S 240 2, 297 8' fill='none' stroke='%238EA66B' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom / 100% 0.28em;
}
.about { color: var(--ink-soft); font-size: 1.1rem; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .photo-wrap { max-width: 290px; }
  .s1 { left: -14px; } .s2 { right: -14px; }
}

/* contact band with wavy edges */
.band { position: relative; background: var(--blush); margin-top: clamp(90px, 12vw, 140px); padding-block: clamp(36px, 6vw, 64px) clamp(56px, 8vw, 90px); scroll-margin-top: 64px; }
.band::before, .band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 60px; background-repeat: repeat-x; background-size: 720px 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C 90 66, 180 -6, 270 30 S 450 66, 540 30 S 650 4, 720 30 V60 H0 Z' fill='%23FFDCDC'/%3E%3C/svg%3E") repeat-x 0 0 / 720px 60px;
}
.band::before { top: -59px; }
.band::after { bottom: -59px; transform: scaleY(-1); }
.cta-title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin-top: 10px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 34px; }
.choice {
  text-align: left; cursor: pointer; display: grid; gap: 8px; padding: 26px; background: var(--card);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.c-left { border-radius: 34px 34px 34px 10px; transform: rotate(-1.2deg); }
.c-right { border-radius: 34px 34px 10px 34px; transform: rotate(1.2deg); }
.choice:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 7px 8px 0 var(--ink); }
.choice[aria-expanded="true"] { background: var(--sage); transform: rotate(0deg); }
.choice strong { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.15; }
.choice span { color: var(--ink-soft); }
.choice[aria-expanded="true"] span { color: var(--ink); }
@media (max-width: 680px) { .choices { grid-template-columns: 1fr; } }

.panel { margin-top: 28px; background: var(--card); border: 2px solid var(--ink); border-radius: 30px; padding: clamp(20px, 3.4vw, 36px); box-shadow: 5px 5px 0 var(--ink); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field select, .field textarea { width: 100%; background: var(--cream); border: 2px solid var(--rose); border-radius: 16px; padding: 11px 14px; }
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sage-deep); background: #fff; }
.err { color: #a3321f; font-size: 0.86rem; min-height: 1.2em; }
@media (max-width: 680px) { .form { grid-template-columns: 1fr; } }
.result { margin-top: 26px; padding-top: 26px; border-top: 2px dashed var(--rose); display: grid; gap: 14px; }
.result textarea { width: 100%; min-height: 150px; background: var(--cream); border: 2px solid var(--rose); border-radius: 16px; padding: 12px 14px; line-height: 1.5; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.c-card { background: var(--cream); border: 2px solid var(--rose); border-radius: 26px; padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.c-card:nth-child(1) { border-radius: 30px 30px 30px 8px; }
.c-card:nth-child(2) { border-radius: 30px 8px 30px 30px; }
.c-card:nth-child(3) { border-radius: 8px 30px 30px 30px; }
.c-head { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ico { width: 36px; height: 36px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; flex: none; }
.c-val { overflow-wrap: anywhere; font-weight: 500; user-select: all; }
.c-val.unset { color: var(--ink-soft); font-weight: 400; user-select: none; }

/* ---------- experience: wobbly timeline ---------- */
.timeline { position: relative; padding-left: 38px; display: grid; gap: 26px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; border-left: 4px dotted var(--rose); }
.t-item { position: relative; }
.t-item::before { content: ""; position: absolute; left: -36px; top: 22px; width: 20px; height: 20px; border-radius: 50%; background: var(--sage); border: 4px solid var(--cream); box-shadow: 0 0 0 2px var(--ink); }
.t-card { background: var(--card); border: 2px solid var(--rose); border-radius: 30px 30px 30px 8px; padding: 22px 26px 24px; transition: transform 0.2s, border-color 0.2s; }
.t-item:nth-child(even) .t-card { border-radius: 8px 30px 30px 30px; }
.t-card:hover { transform: translateX(4px) rotate(-0.4deg); border-color: var(--ink); }
.when { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--blush); border: 1.5px solid var(--rose); font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; }
.now { margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--sage); border: 1.5px solid var(--ink); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.t-card .role { color: var(--sage-deep); font-weight: 600; margin: 2px 0 8px; }
.t-card p { color: var(--ink-soft); max-width: 66ch; }
.more { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--sage-deep); }

.polaroids { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 56px; }
.polaroids img { width: min(100%, 250px); height: 230px; object-fit: cover; background: #fff; padding: 9px 9px 28px; border-radius: 6px; border: 1px solid var(--rose); box-shadow: 0 14px 24px -16px rgba(59, 47, 47, 0.6); }
.polaroids img:nth-child(1) { transform: rotate(-4deg); }
.polaroids img:nth-child(2) { transform: rotate(3deg) translateY(10px); object-position: top; }
.polaroids img:nth-child(3) { transform: rotate(-2deg); }

/* ---------- education ---------- */
.edu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.edu-list { display: grid; gap: 22px; }
.edu-item { background: var(--card); border: 2px solid var(--rose); border-radius: 34px 34px 34px 10px; padding: 26px 28px; }
.edu-item:nth-child(2) { border-radius: 10px 34px 34px 34px; margin-left: clamp(0px, 3vw, 30px); background: var(--blush); }
.edu-item h3 { font-size: 1.6rem; }
.edu-item .prog { margin-top: 6px; font-weight: 500; }
.edu-item .per { margin-top: 10px; color: var(--ink-soft); font-size: 0.92rem; font-weight: 600; }
.collage { position: relative; min-height: 420px; }
.collage img { position: absolute; background: #fff; padding: 8px 8px 24px; border-radius: 6px; border: 1px solid var(--rose); object-fit: cover; box-shadow: 0 14px 24px -16px rgba(59, 47, 47, 0.6); }
.collage img:nth-child(1) { left: 0; top: 0; width: 46%; height: 330px; transform: rotate(-4deg); object-position: top; }
.collage img:nth-child(2) { right: 0; top: 8px; width: 50%; height: 190px; transform: rotate(4deg); }
.collage img:nth-child(3) { right: 6%; bottom: 0; width: 48%; height: 210px; transform: rotate(-2deg); object-position: top; }
@media (max-width: 760px) {
  .edu { grid-template-columns: 1fr; }
  .collage { min-height: 380px; }
}

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 26px; align-items: start; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card { background: var(--card); border: 2px solid var(--rose); border-radius: 30px 30px 30px 10px; padding: 12px 12px 22px; display: flex; flex-direction: column; min-width: 0; transition: transform 0.2s, border-color 0.2s; }
.card:nth-child(3n+2) { border-radius: 30px 30px 10px 30px; }
.card:nth-child(3n) { border-radius: 10px 30px 30px 30px; }
.card:hover { transform: translateY(-5px) rotate(-0.6deg); border-color: var(--ink); }
.card:nth-child(even):hover { transform: translateY(-5px) rotate(0.6deg); }
.thumb { display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 20px 20px 20px 6px; overflow: hidden; cursor: zoom-in; background: var(--blush); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb.doc { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--rose); }
.thumb.doc img { object-fit: contain; }
.card .body { padding: 18px 12px 0; display: grid; gap: 8px; align-content: start; }
.card .body p { color: var(--ink-soft); font-size: 0.96rem; }
.card .meta { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--rose-deep); }
.card .foot { padding-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tags li { font-size: 0.78rem; font-weight: 500; padding: 2px 11px; border-radius: 999px; background: var(--blush); border: 1.5px solid var(--rose); }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 24px; border: 3px dashed var(--rose); border-radius: 36px; color: var(--ink-soft); background: var(--card); }
.empty strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin-bottom: 6px; }

/* ---------- modal ---------- */
.modal { background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-radius: 32px; padding: 0; width: min(900px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; margin: auto; box-shadow: 8px 8px 0 var(--ink); }
.modal::backdrop { background: rgba(59, 47, 47, 0.55); }
.close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: var(--blush); cursor: pointer; display: grid; place-items: center; }
.close:hover { background: var(--sage); }
.m-media { background: var(--blush); padding: 18px; }
.m-media img { margin: 0 auto; max-height: 50vh; object-fit: contain; border-radius: 16px; }
.m-media.paper { background: #fff; }
.m-body { padding: 24px clamp(20px, 4vw, 36px) 32px; display: grid; gap: 12px; }
.m-body p { color: var(--ink-soft); max-width: 66ch; }
.m-body h3 { font-size: 1.8rem; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--cream); padding: 10px 20px; border-radius: 999px; z-index: 60; max-width: calc(100% - 32px); font-size: 0.92rem; }

/* ---------- footer ---------- */
.site-footer { margin-top: 110px; padding-block: 24px calc(30px + env(safe-area-inset-bottom, 0px)); color: var(--ink-soft); font-size: 0.92rem; }
.site-footer .wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
