:root {
  --turquoise: #00bcd4;
  --turquoise-dark: #00838f;
  --turquoise-light: #c9f1f6;
  --coral: #ff6b6b;
  --sun: #ffc93c;
  --violet: #8e7dff;
  --mint: #3ddc97;
  --ink: #1d2b36;
  --muted: #4f6270;
  --paper: #ffffff;
  --bg: #f2fcfd;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 131, 143, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--turquoise-dark); }
a:hover { color: var(--coral); }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Floating background blobs */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite alternate;
}
.blob-1 { width: 380px; height: 380px; background: var(--turquoise); top: 40%; left: -140px; }
.blob-2 { width: 300px; height: 300px; background: var(--sun); top: 65%; right: -120px; animation-delay: -6s; }
.blob-3 { width: 260px; height: 260px; background: var(--coral); bottom: -120px; left: 35%; animation-delay: -12s; opacity: 0.2; }

@keyframes float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -60px) scale(1.15); }
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, var(--sun) 0 70px, transparent 71px),
    radial-gradient(circle at 95% 70%, var(--coral) 0 34px, transparent 35px),
    radial-gradient(circle at 78% 85%, rgba(255, 255, 255, 0.35) 0 16px, transparent 17px),
    linear-gradient(135deg, var(--turquoise) 0%, #00a5c0 60%, var(--turquoise-dark) 100%);
  padding: 3.5rem 1.25rem 4.5rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
}
.hero-inner { max-width: 960px; margin: 0 auto; }

.greeting {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-weight: 600;
  animation: pop-in 0.7s cubic-bezier(.34, 1.56, .64, 1) both;
}
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 0.8s infinite; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.name {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  animation: pop-in 0.7s cubic-bezier(.34, 1.56, .64, 1) 0.1s both;
}
.title {
  margin: 0.5rem 0 1.5rem;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 500;
  opacity: 0.95;
  animation: pop-in 0.7s cubic-bezier(.34, 1.56, .64, 1) 0.2s both;
}

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  animation: pop-in 0.7s cubic-bezier(.34, 1.56, .64, 1) 0.3s both;
}
.contact a, .contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: var(--turquoise-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.2s cubic-bezier(.34, 1.56, .64, 1), background 0.2s;
}
.contact a:hover { transform: translateY(-3px) rotate(-2deg); background: var(--sun); color: var(--ink); }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* Surprise button: floats so it is always at hand */
.surprise {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 6px 0 #d84b4b, 0 12px 24px rgba(216, 75, 75, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.surprise:hover { transform: translateY(-2px); }
.surprise:active { transform: translateY(4px); box-shadow: 0 2px 0 #d84b4b, 0 6px 12px rgba(216, 75, 75, 0.35); }
.surprise .dice { display: inline-block; font-size: 1.3rem; }
.surprise.rolling .dice { animation: roll 0.6s ease-out; }
@keyframes roll {
  from { transform: rotate(0) scale(1); }
  50% { transform: rotate(360deg) scale(1.4); }
  to { transform: rotate(720deg) scale(1); }
}

/* Layout */
main {
  max-width: 960px;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem 2rem;
  position: relative;
}
.section { margin: 3rem 0; }

h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--turquoise-dark);
}
.h-emoji { display: inline-block; transition: transform 0.3s; }
h2:hover .h-emoji { transform: rotate(-15deg) scale(1.2); }

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

#summary { border-left: 8px solid var(--sun); }
.summary-text { margin: 0; font-size: 1.15rem; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--turquoise), var(--mint), var(--sun), var(--coral));
}
.exp { position: relative; margin-bottom: 1rem; }
.exp::before {
  content: "";
  position: absolute;
  left: -1.95rem;
  top: 1.15rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--turquoise);
  transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1), background 0.3s;
}
.exp:nth-child(4n+2)::before { border-color: var(--coral); }
.exp:nth-child(4n+3)::before { border-color: var(--sun); }
.exp:nth-child(4n+4)::before { border-color: var(--violet); }
.exp.open::before { transform: scale(1.3); background: var(--sun); }

.exp-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "company toggle"
    "role toggle"
    "period toggle";
  align-items: center;
  column-gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.2s;
}
.exp-head:hover { transform: translateX(6px) rotate(-0.4deg); box-shadow: 0 14px 34px rgba(0, 131, 143, 0.2); }
.exp.open .exp-head { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.exp-company { grid-area: company; font-weight: 800; font-size: 1.15rem; }
.exp-role { grid-area: role; color: var(--muted); }
.exp-period {
  grid-area: period;
  justify-self: start;
  margin-top: 0.35rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--turquoise-light);
  color: var(--turquoise-dark);
  font-size: 0.85rem;
  font-weight: 700;
}
.exp-toggle {
  grid-area: toggle;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--turquoise);
  position: relative;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), background 0.2s;
}
.exp-toggle::before, .exp-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.exp-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.exp.open .exp-toggle { transform: rotate(135deg); background: var(--coral); }

.exp-body {
  padding: 0 1.25rem 1.1rem;
  background: var(--paper);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  animation: unfold 0.35s ease-out;
}
.exp-body p { margin: 0; border-top: 2px dashed var(--turquoise-light); padding-top: 0.8rem; }
@keyframes unfold {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Skills */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.25rem;
}
.skill-group { --accent: var(--turquoise); --accent-soft: var(--turquoise-light); border-top: 8px solid var(--accent); }
.skill-group[data-color="coral"] { --accent: var(--coral); --accent-soft: #ffe1e1; }
.skill-group[data-color="sun"] { --accent: var(--sun); --accent-soft: #fff1c9; }
.skill-group[data-color="violet"] { --accent: var(--violet); --accent-soft: #e7e3ff; }
.skill-group h3 { margin: 0 0 0.8rem; font-size: 1.2rem; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.2s cubic-bezier(.34, 1.56, .64, 1);
}
.tag:hover { transform: translateY(-3px) rotate(-3deg); }

/* Education + volunteer */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}
.duo .card p { margin: 0 0 0.4rem; }
.item-title { font-weight: 800; font-size: 1.1rem; }
.item-period {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--turquoise-light);
  color: var(--turquoise-dark);
  font-size: 0.85rem;
  font-weight: 700;
}
#volunteer { border-left: 8px solid var(--mint); }
#education { border-left: 8px solid var(--violet); }

.footer { text-align: center; padding: 1rem 1rem 6rem; }

/* Scroll reveal: only hidden when JavaScript is running */
.js .reveal {
  opacity: 0;
  transform: translateY(40px) rotate(-2deg) scale(0.95);
  transition: opacity 0.6s ease-out, transform 0.7s cubic-bezier(.34, 1.56, .64, 1);
}
.js .reveal:nth-child(even) { transform: translateY(40px) rotate(2deg) scale(0.95); }
.js .reveal.visible { opacity: 1; transform: none; }

/* Surprise highlight */
.spotlight {
  position: relative;
  z-index: 2;
  animation: wiggle 0.8s ease-in-out 2;
}
.exp.spotlight .exp-head,
.exp.spotlight .exp-body,
.card.spotlight {
  box-shadow: 0 0 0 4px var(--sun), 0 0 0 10px rgba(255, 201, 60, 0.35), 0 16px 40px rgba(255, 107, 107, 0.3);
}
.tag.spotlight {
  background: var(--sun);
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.3);
  animation: boing 0.6s cubic-bezier(.34, 1.56, .64, 1) 3;
}
@keyframes wiggle {
  0%, 100% { transform: none; }
  20% { transform: rotate(-1.5deg) scale(1.02); }
  40% { transform: rotate(1.5deg) scale(1.02); }
  60% { transform: rotate(-1deg); }
  80% { transform: rotate(1deg); }
}
@keyframes boing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(-4deg); }
}

.confetti {
  position: fixed;
  z-index: 20;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti 0.9s ease-out forwards;
}
@keyframes confetti {
  from { opacity: 1; transform: translate(0, 0) rotate(0); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(540deg); }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hero {
    padding: 2.5rem 1rem 3.5rem;
    background:
      radial-gradient(circle at 100% 0, var(--sun) 0 44px, transparent 45px),
      radial-gradient(circle at 100% 82%, var(--coral) 0 22px, transparent 23px),
      linear-gradient(135deg, var(--turquoise) 0%, #00a5c0 60%, var(--turquoise-dark) 100%);
  }
  main { padding: 0 1rem 2rem; }
  .card { padding: 1.2rem; }
  .timeline { padding-left: 1.6rem; }
  .timeline::before { left: 0.35rem; }
  .exp::before { left: -1.6rem; }
  .exp-head { padding: 0.9rem 1rem; }
  .exp-body { padding: 0 1rem 1rem; }
  .contact a, .contact-item { font-size: 0.88rem; padding: 0.4rem 0.8rem; }
  .greeting { background: rgba(0, 0, 0, 0.12); }
  .surprise { right: 0.75rem; bottom: 0.75rem; min-height: 48px; padding: 0.6rem 1.1rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal, .js .reveal:nth-child(even) { opacity: 1; transform: none; }
  .spotlight { outline: 4px solid var(--sun); }
}
