/* ===== Colours (matched to the reference site) ===== */
:root {
  --bg: #ffffff;
  --text: #09090b;          /* zinc-950 */
  --text-2: #374151;        /* gray-700 */
  --muted: #71717a;         /* zinc-500 */
  --border: #e4e4e7;        /* zinc-200 */
  --chip: #f4f4f5;          /* zinc-100 */
  --glass: rgba(255, 255, 255, 0.3);
  --glass-strong: rgba(255, 255, 255, 0.55);
  --blue: #3b82f6;

  --c-me: #0f766e;
  --c-projects: #16a34a;
  --c-skills: #7c3aed;
  --c-fun: #c026d3;
  --c-contact: #d97706;

  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Fluid canvas: fixed behind the page, never steals clicks */
#fluid {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
main, footer, .dock { position: relative; z-index: 1; }

/* ===== Glass ===== */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* Shared line-icon style (lucide-like) */
.ic, .chev, .go svg {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic { width: 20px; height: 20px; flex: none; }
.c-me { color: var(--c-me); }
.c-projects { color: var(--c-projects); }
.c-skills { color: var(--c-skills); }
.c-fun { color: var(--c-fun); }
.c-contact { color: var(--c-contact); }
.c-blue { color: var(--blue); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 16px 64px;
  text-align: center;
  overflow: hidden;
}
.hey { font-size: 24px; font-weight: 600; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 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); }
}
.title {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 2px;
  min-height: 1.1em;
}
.typed { white-space: pre-wrap; }
.caret {
  display: inline-block;
  width: 0.07em; height: 0.9em;
  margin-left: 0.06em;
  vertical-align: -0.08em;
  border-radius: 2px;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}
.caret.typing { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

/* Your picture in the centre */
.avatar {
  position: relative;
  margin: 28px 0 28px;
  height: clamp(190px, 34vh, 290px);
  display: flex; justify-content: center;
}
.avatar img {
  height: clamp(190px, 34vh, 290px); width: auto;
  object-fit: contain;
  /* soft fade at the bottom so the cut-off shoulders melt into the page */
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 75%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.avatar:hover img { transform: scale(1.04) rotate(-1.5deg); }
.avatar-fallback { display: none; }
.no-photo img { display: none; }
.no-photo .avatar-fallback {
  display: grid; place-items: center;
  width: auto; height: 100%; aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed #d4d4d8; color: var(--muted);
  font-size: 15px; font-weight: 500; line-height: 1.4;
  background: rgba(255, 255, 255, .4);
}
.no-photo .avatar-fallback small { font-size: 12px; opacity: .8; }

/* Pill under the picture (stands in for the "Ask me anything" bar) */
.hero-pill {
  display: flex; align-items: center; justify-content: space-between;
  width: min(512px, 100%); height: 62px;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  color: var(--muted); font-size: 16px;
  transition: background .2s;
}
.hero-pill:hover { background: var(--glass-strong); }
.go {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; flex: none;
  transition: transform .2s;
}
.go svg { width: 20px; height: 20px; }
.hero-pill:hover .go { transform: translateY(2px); }

.hero-cards {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 16px;
  width: min(680px, 100%);
}
.hero-card {
  width: 125px; height: 82px;
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.hero-card:hover {
  background: var(--glass-strong);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
}

/* Giant faded name */
.big-name {
  position: absolute; left: 50%; bottom: 0;
  transform: translate(-50%, 6%);
  z-index: -1;
  font-size: clamp(56px, 13.5vw, 210px);
  font-weight: 900; line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(to bottom, rgba(115, 115, 115, .13), rgba(115, 115, 115, .02));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  pointer-events: none; user-select: none;
}

/* Hero entrance animation */
.reveal-hero {
  opacity: 0; transform: translateY(16px); filter: blur(6px);
  animation: in .8s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes in { to { opacity: 1; transform: none; filter: none; } }

/* ===== Floating dock (shows after the hero) ===== */
.dock {
  position: fixed; left: 50%; bottom: 20px; z-index: 40;
  display: flex; gap: 6px; padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.dock.show { transform: translate(-50%, 0); opacity: 1; }
.dock a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: background .2s;
}
.dock a .ic { width: 16px; height: 16px; }
.dock a:hover, .dock a.active { background: rgba(244, 244, 245, .9); }

/* ===== Sections ===== */
.section {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 72px 16px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.section-title .ic { width: 28px; height: 28px; }

.box {
  border-radius: 24px;
  padding: 24px;
  transition: transform .25s, background .25s, box-shadow .25s;
}
.box:hover {
  background: var(--glass-strong);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .06);
}
.box h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.box p { color: var(--text-2); line-height: 1.6; }

.grid { display: grid; gap: 16px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  background: rgba(244, 244, 245, .85);
  font-size: 14px; color: var(--text);
}
.chips.small .chip { font-size: 12px; padding: 4px 10px; }

/* About */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center; }
.about-photo {
  aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #fff, #dbeafe);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about-photo.no-photo .avatar-fallback { border: 0; border-radius: 0; background: none; }
.about-text h3 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.meta { color: var(--muted) !important; margin-bottom: 20px; }
.meta .dot { margin: 0 10px; opacity: .6; }
.lead { font-size: 17px; margin-bottom: 20px; color: var(--text) !important; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 14px; }

/* Projects */
.projects { grid-template-columns: repeat(2, 1fr); }
.project { display: flex; flex-direction: column; gap: 12px; }
.project h3 { margin: 4px 0 0; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: rgba(0, 0, 0, .35);
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t1 { background: linear-gradient(135deg, #ccfbf1, #e0e7ff); }
.t2 { background: linear-gradient(135deg, #dcfce7, #fef9c3); }
.t3 { background: linear-gradient(135deg, #ede9fe, #fce7f3); }
.t4 { background: linear-gradient(135deg, #ffedd5, #fae8ff); }
.links { display: flex; gap: 16px; margin-top: auto; font-size: 14px; font-weight: 600; }
.links a { color: var(--blue); }
.links a:hover { text-decoration: underline; }

/* Logo thumbnail */
.thumb-logo { background: #fff; border: 1px solid var(--border); }
.thumb-logo img { position: static; width: 46%; height: auto; object-fit: contain; transition: transform .4s; }
.project:hover .thumb-logo img { transform: scale(1.06); }
.thumb-badge { position: absolute; top: 12px; left: 12px; }

.thumb-shot { background: #fff; border: 1px solid var(--border); }
.thumb-shot img { object-position: left center; transition: transform .5s; }
.thumb-shot .thumb-badge { left: auto; right: 12px; top: auto; bottom: 12px; }
.project:hover .thumb-shot img { transform: scale(1.04); }
.modal-shot { width: 100%; border-radius: 14px; border: 1px solid var(--border); margin-top: 16px; }
.thumb-hero img { transition: transform .5s; }
.project:hover .thumb-hero img { transform: scale(1.04); }
.thumb-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 60%);
  color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; text-align: left;
}
.thumb-overlay small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fde68a; }
.thumb-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: rgba(0, 0, 0, .55); }
.thumb-emoji { font-size: 52px; line-height: 1; transition: transform .4s; }
.project:hover .thumb-emoji { transform: scale(1.12) rotate(-6deg); }

.links button {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--blue);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.links button:hover { text-decoration: underline; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(244, 244, 245, .9); color: var(--text-2);
}
.badge.live { background: rgba(220, 252, 231, .95); color: #15803d; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }

/* ===== Popups ===== */
.modal {
  margin: auto;
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .18);
}
.modal-sm { width: min(440px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(9, 9, 11, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .7);
  font-size: 14px; color: var(--text-2); cursor: pointer;
}
.modal-close:hover { background: #fff; }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-right: 36px; }
.modal-logo { width: 56px; height: 56px; border-radius: 14px; background: #fff; border: 1px solid var(--border); padding: 6px; }
.modal-emoji { display: grid; place-items: center; font-size: 30px; }
.cta.small { display: inline-flex; align-items: center; }
.modal h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.modal h4 { font-size: 15px; font-weight: 600; margin: 20px 0 10px; }
.modal p { color: var(--text-2); line-height: 1.6; margin-top: 14px; }
.modal .badge:not(.live) { background: rgba(228, 228, 231, .8); }
.subtitle { color: var(--muted) !important; margin-top: 2px !important; font-size: 14px; }
.highlights { list-style: none; display: grid; gap: 10px; }
.highlights li { position: relative; padding-left: 18px; color: var(--text-2); line-height: 1.55; font-size: 15px; }
.highlights li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #9333ea);
}
.highlights b { color: var(--text); font-weight: 600; }
.modal-actions { margin-top: 24px; display: flex; justify-content: flex-end; }
.cta.small { height: 44px; padding: 0 20px; border: 0; font: inherit; font-weight: 500; cursor: pointer; }

.choices { display: grid; gap: 12px; margin-top: 6px; }
.choice {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 18px;
  transition: background .2s, transform .2s;
}
.choice:hover { background: rgba(255, 255, 255, .95); transform: translateY(-2px); }
.choice b { display: block; font-size: 16px; }
.choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.choice-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #fff7ed, #faf5ff);
}
.choice-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }

/* Skills: tech logos (no boxes) */
.tech-groups { display: flex; flex-direction: column; }
.tech-group {
  display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 24px;
  padding: 26px 0;
  border-top: 1px solid rgba(228, 228, 231, .7);
}
.tech-group:first-child { border-top: 0; padding-top: 8px; }
.tech-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.tech-label .ic { width: 20px; height: 20px; }
.tech-row { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.tech {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 76px;
  animation: float 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.6s);
}
.tech img {
  width: 48px; height: 48px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .08));
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), filter .3s;
}
.tech span { font-size: 13px; font-weight: 500; color: var(--text-2); text-align: center; white-space: nowrap; transition: color .2s; }
.tech:hover img { transform: translateY(-6px) scale(1.15); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .16)); }
.tech:hover span { color: var(--text); }
@keyframes float { 50% { transform: translateY(-5px); } }
.tech-words { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 16px; font-weight: 500; color: var(--text); }
.tech-words span:not(:last-child)::after { content: "·"; margin: 0 14px; color: #a1a1aa; }

/* Fun */
.fun { grid-template-columns: repeat(3, 1fr); }
.fun-card { text-align: center; }
.fun-icon {
  width: 60px; height: 60px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--border);
  transition: transform .3s;
}
.fun-icon .ic { width: 28px; height: 28px; }
.fun-card:hover .fun-icon { transform: scale(1.1) rotate(-6deg); }

/* Contact */
.contact { text-align: center; padding: 48px 24px; }
.contact h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.contact p { max-width: 460px; margin: 0 auto 24px; }
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 8px 0 24px; border-radius: 999px;
  background: var(--text); color: #fff; font-weight: 500;
  transition: transform .2s;
}
.cta:hover { transform: translateY(-2px); }
.cta:hover .go { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; color: var(--text);
  background: rgba(255, 255, 255, .6);
  transition: background .2s, transform .2s;
}
.cv-btn .ic { width: 18px; height: 18px; }
.cv-btn:hover { background: #fff; transform: translateY(-2px); }
.about-cv { height: 44px; padding: 0 18px; margin-top: 20px; font-size: 14px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: background .2s, transform .2s;
}
.socials .ic { width: 17px; height: 17px; }
.socials a:hover { background: var(--glass-strong); transform: translateY(-2px); }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 110px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { max-width: 320px; }
  .tech-group { grid-template-columns: 1fr; gap: 16px; }
  .fun { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding-top: 72px; }
  .hey { font-size: 20px; }
  .title { min-height: 2.2em; } /* room for the longest title on two lines */
  .hero-pill { height: 54px; font-size: 14px; }
  .hero-card { width: calc(33.333% - 8px); height: 76px; }
  .projects { grid-template-columns: 1fr; }
  .tech-row { gap: 14px 12px; }
  .tech { width: 68px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat b { font-size: 26px; }
  .box { padding: 18px; }
  .modal { padding: 22px; }
  .dock { width: calc(100% - 24px); justify-content: space-between; bottom: 12px; }
  .dock a { flex-direction: column; gap: 3px; padding: 8px 6px; font-size: 11px; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-hero { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .wave, .tech { animation: none; }
}
