/* founder.sciensify.com: bold & playful, light, fast. No frameworks. */

:root {
  --paper: #fff6e9;
  --ink: #17131f;
  --ink-soft: #4a4458;
  --line: #17131f;
  --tomato: #ff5a36;
  --sun: #ffc530;
  --blue: #3d5afe;
  --mint: #2ed3a2;
  --lilac: #b98cff;
  --radius: 22px;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-big: 10px 10px 0 var(--ink);
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* The tilted ticker pokes past the edges on purpose; clip (not hidden) keeps the nav sticky. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
}
.skip:focus {
  left: 8px;
}

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

/* Placeholders: loud on purpose so none slip through to the live site. */
.ph {
  background: repeating-linear-gradient(-45deg, #fff1a8, #fff1a8 6px, #ffe36b 6px, #ffe36b 12px);
  outline: 2px dashed var(--tomato);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0 4px;
  color: var(--ink);
}

/* ---------- Background blobs ---------- */
.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  filter: blur(2px);
  opacity: 0.55;
  animation: morph 16s ease-in-out infinite alternate;
  will-change: transform;
}
.b1 { width: 38vmax; height: 38vmax; background: var(--sun); top: -12vmax; right: -10vmax; }
.b2 { width: 28vmax; height: 28vmax; background: var(--lilac); bottom: -8vmax; left: -10vmax; animation-delay: -4s; }
.b3 { width: 18vmax; height: 18vmax; background: var(--mint); top: 45%; right: 8%; animation-delay: -8s; opacity: 0.35; }
.b4 { width: 14vmax; height: 14vmax; background: var(--tomato); top: 18%; left: 6%; animation-delay: -12s; opacity: 0.25; }

@keyframes morph {
  0% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 63% 37% 44% 56% / 55% 62% 38% 45%; }
  100% { border-radius: 37% 63% 51% 49% / 37% 35% 65% 63%; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin: 12px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 10px 14px;
  background: rgba(255, 246, 233, 0.85);
  backdrop-filter: blur(10px);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
}
.logo {
  text-decoration: none;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--tomato);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  border: 2px solid var(--ink);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .logo-mark {
  transform: rotate(-14deg) scale(1.08);
}
.nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav ul a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}
.nav ul a:hover,
.nav ul a.is-active {
  background: var(--sun);
}
@media (max-width: 720px) {
  .nav nav {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--tomato);
  transition: box-shadow 0.2s, background 0.2s, color 0.2s;
  will-change: transform;
}
.btn:hover {
  box-shadow: 7px 7px 0 var(--tomato);
}
.btn:active {
  box-shadow: 1px 1px 0 var(--tomato);
}
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-ghost:hover {
  background: var(--sun);
  box-shadow: 7px 7px 0 var(--ink);
}
.btn-small {
  padding: 10px 18px;
  font-size: 15px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 12vh, 120px) var(--gutter) clamp(48px, 10vh, 96px);
  max-width: 1200px;
  margin: 0 auto;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
}
.tag a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(46, 211, 162, 0.6);
  animation: ping 2s infinite;
}
@keyframes ping {
  70% { box-shadow: 0 0 0 10px rgba(46, 211, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 211, 162, 0); }
}
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(52px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero-title .line {
  display: block;
}
.flip {
  display: inline-block;
  position: relative;
  padding: 0 0.12em;
  margin-left: -0.12em;
  background: var(--tomato);
  color: var(--paper);
  border-radius: 0.18em;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-big);
  border: 3px solid var(--ink);
}
.flip-word {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
.flip-word.is-out {
  transform: translateY(-60%) rotateX(80deg);
  opacity: 0;
}
.flip-word.is-in {
  transform: translateY(60%) rotateX(-80deg);
  opacity: 0;
}
.hero-sub {
  max-width: 560px;
  margin: 34px 0 30px;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-soft);
}
.hero-sub strong {
  color: var(--ink);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.sticker {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}
.sticker svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}
.sticker text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--ink);
}
.sticker-core {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--paper);
  font-size: 26px;
  border: 2px solid var(--ink);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 860px) {
  .sticker {
    display: none;
  }
}

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-block: 3px solid var(--ink);
  transform: rotate(-2deg);
  margin: 0 -20px;
  padding: 16px 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: slide 32s linear infinite;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 30px);
  padding: 0 28px;
  white-space: nowrap;
}
.ticker span::after {
  content: "✦";
  margin-left: 56px;
  color: var(--sun);
}
@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(72px, 12vh, 128px) var(--gutter) 0;
}
.section-title {
  margin: 0 0 40px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.squiggle {
  position: relative;
  white-space: nowrap;
}
.squiggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  height: 0.22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q5 0 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%23ff5a36' stroke-width='3'/%3E%3C/svg%3E") repeat-x;
  background-size: 0.9em 100%;
  animation: wave 1.2s linear infinite;
  animation-play-state: paused;
}
.section-title:hover .squiggle::after,
.section-title.is-visible .squiggle::after {
  animation-play-state: running;
}
@keyframes wave {
  to { background-position-x: 0.9em; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-text p {
  margin: 0 0 18px;
  font-size: clamp(18px, 2vw, 20px);
}
.stats {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 600;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat:nth-child(odd) { transform: rotate(-1.5deg); }
.stat:nth-child(even) { transform: rotate(1.5deg); }
.stat:hover { transform: rotate(0) scale(1.03); }
.stat b {
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
}
.c-tomato { background: var(--tomato); }
.c-sun { background: var(--sun); }
.c-blue { background: var(--blue); color: var(--paper); }
.c-mint { background: var(--mint); }
.c-lilac { background: var(--lilac); }

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.skill-group {
  padding: 22px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}
.skill-group h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 26px;
}
.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-group li {
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.skill-group li:hover {
  transform: translateY(-4px) rotate(-4deg);
  background: var(--sun);
}
@media (max-width: 860px) {
  .about-grid,
  .skills {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.card {
  position: relative;
  padding: 30px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-big);
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.2s;
  will-change: transform;
}
.card:hover {
  box-shadow: 14px 14px 0 var(--ink);
}
.card-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 2px solid var(--ink);
}
.card h3 {
  margin: 18px 0 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.5vw, 50px);
  letter-spacing: -0.03em;
  line-height: 1;
  transform: translateZ(30px);
}
.card p {
  margin: 0 0 18px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pills li {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
}
.card.c-blue .pills li {
  background: var(--paper);
  color: var(--ink);
}
.card-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
@media (max-width: 760px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 44px;
  list-style: none;
  --progress: 0;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px;
  width: 6px;
  border-radius: 3px;
}
.timeline::before {
  bottom: 6px;
  background: rgba(23, 19, 31, 0.12);
}
.timeline::after {
  height: calc(var(--progress) * (100% - 12px));
  background: linear-gradient(var(--tomato), var(--sun), var(--mint));
}
.timeline li {
  position: relative;
  margin-bottom: 26px;
  padding: 20px 24px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 26px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
  transition: background 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.timeline li.is-visible::before {
  background: var(--sun);
  transform: scale(1.15);
}
.when {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
}
.timeline h3 {
  margin: 4px 0 6px;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.15;
}
.timeline p {
  margin: 0;
}

/* ---------- Writing ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.post {
  position: relative;
  display: block;
  padding: 26px 26px 54px;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.25s;
}
.post:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: var(--shadow);
  background: var(--lilac);
}
.post-meta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.post h3 {
  margin: 10px 0 8px;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.15;
}
.post p {
  margin: 0;
  color: var(--ink-soft);
}
.post-arrow {
  position: absolute;
  right: 22px;
  bottom: 16px;
  font-size: 26px;
  font-weight: 700;
  transition: transform 0.3s;
}
.post:hover .post-arrow {
  transform: translate(4px, -4px) rotate(10deg);
}
@media (max-width: 900px) {
  .posts {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
.contact {
  text-align: left;
  padding-bottom: clamp(72px, 12vh, 128px);
}
.contact-title {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 10vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.contact-title span {
  display: block;
}
.contact-title em {
  font-style: normal;
  color: var(--blue);
  -webkit-text-stroke: 0;
}
.contact > p {
  max-width: 520px;
  font-size: 20px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px var(--gutter);
  border-top: 2px solid var(--ink);
  font-size: 15px;
}
.footer p {
  margin: 0;
}
.footer a {
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(32px) rotate(1deg);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Cards keep their own tilt transform once visible. */
.js .card.reveal.is-visible {
  transition: opacity 0.7s ease, transform 0.15s ease-out, box-shadow 0.2s;
}

/* ---------- Less motion when asked ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- About quote ---------- */
.quote {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 24px);
  background: var(--lilac);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1.5deg);
}

/* ---------- Certifications ---------- */
.certs {
  margin-top: 16px;
  padding: 26px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--tomato);
}
.certs h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 30px;
}
.certs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.certs li {
  padding: 8px 14px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, color 0.2s;
}
.certs li:hover {
  transform: translateY(-3px) rotate(-2deg);
  background: var(--sun);
  color: var(--ink);
  border-color: var(--sun);
}
.certs li.in-progress {
  border-style: dashed;
}
.c-ink { background: var(--ink); color: var(--paper); }
.card.c-ink .pills li { background: var(--paper); color: var(--ink); }
.card.c-ink { box-shadow: 10px 10px 0 var(--tomato); }
.card.c-ink:hover { box-shadow: 14px 14px 0 var(--tomato); }
