/* ============================================================
   Somrat Babor — Portfolio (static build)
   Light / iOS Floral edition. Optimized for lag-free scroll.
   ============================================================ */

:root {
  --bg: #faf7f5;
  --surface: #ffffff;
  --glass: rgb(255 255 255 / 0.6);
  --glass-strong: rgb(255 255 255 / 0.78);
  --glass-border: rgb(255 255 255 / 0.8);
  --accent-crimson: #d6303f;
  --accent-blush: #ffb9c6;
  --accent-gold: #e3a857;
  --accent-sage: #8ca98d;
  --text-primary: #2a2624;
  --text-muted: #8a817c;
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; touch-action: pan-y pinch-zoom; }
html, body { overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ol, ul { list-style: none; }

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

/* ---------- glass materials ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 50px -20px rgb(214 48 63 / 0.16), inset 0 1px 0 0 rgb(255 255 255 / 0.9);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow: 0 26px 70px -24px rgb(214 48 63 / 0.22), inset 0 1px 0 0 rgb(255 255 255 / 0.95);
}

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- text sheen ---------- */
.text-sheen {
  background: linear-gradient(100deg, var(--text-primary) 0%, var(--accent-crimson) 45%, var(--accent-gold) 75%, var(--text-primary) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s var(--ease-expo) infinite;
}
@keyframes sheen { 0%,100% { background-position: 200% 0; } 50% { background-position: 0% 0; } }

/* ---------- grain overlay ---------- */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- petal glyph ---------- */
.petal-glyph {
  display: inline-block; width: 12px; height: 12px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.pg-crimson { color: var(--accent-crimson); }

/* ============================================================
   Loading screen
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); overflow: hidden;
  transition: opacity 0.8s var(--ease-expo), visibility 0.8s;
  animation: loader-failsafe 0s 6s forwards; /* if JS ever stalls, stop blocking touches after 6s no matter what */
}
@keyframes loader-failsafe { to { visibility: hidden; pointer-events: none; opacity: 0; } }
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-sweep {
  position: absolute; inset: 0 auto 0 0; width: 50%;
  transform: translateX(-120%);
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.9), transparent);
}
.loader.bloom .loader-sweep { animation: sweep 1.1s var(--ease-expo) forwards; }
@keyframes sweep { to { transform: translateX(340%); } }
.loader-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.loader-ring { position: relative; width: 8rem; height: 8rem; }
.loader-ring-svg { position: absolute; inset: 0; transform: rotate(-90deg); width: 100%; height: 100%; }
#loaderProgress { stroke-dasharray: 339.292; stroke-dashoffset: 339.292; }
.loader-flower {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-crimson);
  animation: spin 2.2s linear infinite;
}
.loader.bloom .loader-flower { animation: bloom 0.9s var(--ease-expo) forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bloom { to { transform: rotate(0deg) scale(1.25); } }
.loader-flower::before {
  content: ""; width: 4rem; height: 4rem; background-color: currentColor;
  -webkit-mask: var(--flower-mask) center/contain no-repeat; mask: var(--flower-mask) center/contain no-repeat;
}
.loader-text { text-align: center; }
.loader-name { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary); letter-spacing: -0.01em; }
.loader-pct { margin-top: 0.25rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.32em; color: var(--text-muted); }

:root {
  --flower-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='%23000'%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11'/%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11' transform='rotate(60 24 24)'/%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11' transform='rotate(120 24 24)'/%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11' transform='rotate(180 24 24)'/%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11' transform='rotate(240 24 24)'/%3E%3Cellipse cx='24' cy='13' rx='6.4' ry='11' transform='rotate(300 24 24)'/%3E%3Ccircle cx='24' cy='24' r='5'/%3E%3C/g%3E%3C/svg%3E");
}
.flower-glyph { width: 100%; height: 100%; background-color: currentColor; -webkit-mask: var(--flower-mask) center/contain no-repeat; mask: var(--flower-mask) center/contain no-repeat; }

/* ============================================================
   Scroll progress
   ============================================================ */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 80;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-crimson), var(--accent-gold));
  will-change: transform;
}

/* ============================================================
   Background
   ============================================================ */
.background { position: fixed; inset: 0; z-index: -10; overflow: hidden; pointer-events: none; }
.bg-base { position: absolute; inset: 0; background: var(--bg); }
.bg-orb { position: absolute; border-radius: 50%; will-change: transform; }
.bg-orb-1 { left: -20%; top: -20%; width: 80%; height: 80vh; opacity: 0.7; filter: blur(90px);
  background: radial-gradient(circle, rgb(255 185 198 / 0.55), transparent 65%); animation: mesh 26s ease-in-out infinite; }
.bg-orb-2 { right: -15%; top: 10%; width: 70%; height: 70vh; opacity: 0.6; filter: blur(100px);
  background: radial-gradient(circle, rgb(227 168 87 / 0.4), transparent 65%); animation: mesh 34s ease-in-out infinite reverse; }
.bg-orb-3 { left: 10%; bottom: -10%; width: 70%; height: 60vh; opacity: 0.5; filter: blur(110px);
  background: radial-gradient(circle, rgb(140 169 141 / 0.35), transparent 65%); animation: mesh 40s ease-in-out infinite; }
@keyframes mesh { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-2%,2%,0) scale(1.08); } }
.bg-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgb(42 38 36 / 0.07) 100%); }

/* petals */
.petal-field { position: absolute; inset: 0; overflow: hidden; }
.petal {
  position: absolute; top: 0; background-color: currentColor; will-change: transform;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 40px), 112vh, 0) rotate(720deg); }
}
.petals-paused .petal { animation-play-state: paused; }

/* ============================================================
   Custom cursor
   ============================================================ */
.cursor { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
.cursor-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-crimson); transform: translate(-50%,-50%); }
.cursor-ring {
  position: absolute; width: 28px; height: 28px; color: var(--accent-crimson);
  transform: translate(-50%,-50%); opacity: 0.3; transition: opacity 0.25s, transform 0.25s var(--ease-expo);
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1c5 5.5 8 10 8 14.5C24 21.9 20.4 26 16 31c-4.4-5-8-9.1-8-15.5C8 11 11 6.5 16 1Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cursor.active .cursor-ring { opacity: 0.55; transform: translate(-50%,-50%) scale(1.7) rotate(25deg); }

/* ============================================================
   Nav
   ============================================================ */
.nav-wrap { position: fixed; inset: 12px 0 auto 0; z-index: 70; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.nav { max-width: 100%; min-width: 0; border-radius: 999px; padding: 6px; opacity: 0; transform: translateY(-40px); transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo); pointer-events: auto; touch-action: pan-x; }
.nav.in { opacity: 1; transform: translateY(0); }
.nav-rail { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.nav-link {
  position: relative; flex-shrink: 0; border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em; color: var(--text-muted);
  transition: color 0.3s; white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--accent-crimson); }
.nav-link .nav-pill { position: absolute; inset: 0; border-radius: 999px; background: rgb(214 48 63 / 0.1); opacity: 0; transform: scale(0.9); transition: opacity 0.35s var(--ease-expo), transform 0.35s var(--ease-expo); }
.nav-link.active .nav-pill { opacity: 1; transform: scale(1); }
.nav-link span.label { position: relative; z-index: 1; }
.nav-link .nav-dot { position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-crimson); transform: translateX(-50%) scale(0); transition: transform 0.35s var(--ease-expo); }
.nav-link.active .nav-dot { transform: translateX(-50%) scale(1); }

/* ============================================================
   Reveal / split animation states
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo), filter 0.9s var(--ease-expo); }
[data-reveal].in { opacity: 1; transform: translateY(0); filter: blur(0); }

.split-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split-word > span { display: inline-block; transform: translateY(110%); opacity: 0; transition: transform 0.85s var(--ease-expo), opacity 0.85s var(--ease-expo); }
.split-word.in > span { transform: translateY(0); opacity: 1; }

/* ============================================================
   Layout helpers
   ============================================================ */
.section { position: relative; margin: 0 auto; width: 100%; max-width: 72rem; scroll-margin-top: 7rem; padding: 5rem 1.25rem; }
@media (min-width: 640px) { .section { padding: 5rem 2rem; } }
@media (min-width: 768px) { .section { padding: 7rem 2rem; } }
.section-head { margin-bottom: 3rem; max-width: 42rem; }
.eyebrow { margin-bottom: 0.75rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.32em; color: var(--accent-crimson); }
.section-title { font-family: var(--font-display); font-size: clamp(2.25rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--text-primary); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; margin: 0 auto; width: 100%; max-width: 72rem; scroll-margin-top: 7rem; padding: 8rem 1.25rem 4rem; }
@media (min-width: 640px) { .hero { padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 768px) { .hero { padding: 10rem 2rem 6rem; } }
.hero-grid { display: grid; align-items: center; gap: 3rem; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; } }
.hero-copy { min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 16px; font-size: 12px; letter-spacing: -0.01em; color: var(--text-muted); }
.hero-name { margin-top: 1.5rem; font-family: var(--font-display); font-size: clamp(3rem, 12vw, 6.5rem); line-height: 0.95; letter-spacing: -0.02em; }
/* sheen must live on the nested split spans, else background-clip:text hits empty parent */
.hero-name.text-sheen { -webkit-background-clip: initial; background-clip: initial; color: var(--text-primary); background: none; animation: none; }
.hero-name.text-sheen .split-word > span {
  background: linear-gradient(100deg, var(--text-primary) 0%, var(--accent-crimson) 45%, var(--accent-gold) 75%, var(--text-primary) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 9s var(--ease-expo) infinite;
}
.hero-roles { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.375rem; }
.hero-roles p { font-size: 1rem; letter-spacing: -0.01em; color: var(--text-primary); }
@media (min-width: 640px) { .hero-roles p { font-size: 1.125rem; } }
.slash { margin-right: 0.5rem; color: var(--accent-crimson); }
.hero-intro { margin-top: 1.75rem; max-width: 36rem; font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.hero-cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-socials { margin-top: 2rem; display: flex; gap: 0.5rem; }
.social { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--text-muted); transition: transform 0.5s var(--ease-expo), color 0.5s; }
.social:hover { transform: translateY(-4px); color: var(--accent-crimson); }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0.85rem 1.75rem; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; transition: transform 0.3s var(--ease-expo), box-shadow 0.5s var(--ease-expo); will-change: transform; }
.btn-solid { background: var(--accent-crimson); color: #fff; box-shadow: 0 14px 34px -12px rgb(214 48 63 / 0.6); }
.btn-solid:hover { box-shadow: 0 20px 44px -12px rgb(214 48 63 / 0.7); }
.btn-ghost { background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-primary); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn:active { transform: scale(0.96); }

.hero-photo-wrap { position: relative; min-width: 0; }
.hero-glow { position: absolute; inset: -2.5rem; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero-glow::before { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0.7; background: radial-gradient(circle at 40% 35%, rgb(255 185 198 / 0.75), rgb(227 168 87 / 0.3) 55%, transparent 75%); }
.hero-photo { position: relative; overflow: hidden; border-radius: 2rem; padding: 0.5rem; will-change: transform; transform-style: preserve-3d; }
.hero-photo img { aspect-ratio: 4/5; width: 100%; border-radius: 1.6rem; object-fit: cover; }
.hero-photo-sheen { position: absolute; inset: 0.5rem; border-radius: 1.6rem; pointer-events: none; background: linear-gradient(120deg, rgb(255 255 255 / 0.35) 0%, transparent 35%, transparent 65%, rgb(227 168 87 / 0.18) 100%); }
.hero-petals { position: absolute; left: -1.5rem; top: 2rem; z-index: 10; pointer-events: none; }
.hero-petals .petal-glyph { position: absolute; }

/* ============================================================
   About
   ============================================================ */
.about-wrap { position: relative; }
.about-bloom { position: absolute; right: -2.5rem; top: -4rem; width: 10rem; height: 10rem; color: var(--accent-blush); opacity: 0.55; filter: blur(1px); pointer-events: none; will-change: transform; }
.about-bloom::before { content: ""; display: block; width: 100%; height: 100%; background-color: currentColor; -webkit-mask: var(--flower-mask) center/contain no-repeat; mask: var(--flower-mask) center/contain no-repeat; }
.about-card { position: relative; border-radius: 1.5rem; padding: 1.5rem; }
@media (min-width: 640px) { .about-card { padding: 2.5rem; } }
.about-list { position: relative; display: flex; flex-direction: column; gap: 2rem; border-left: 1px solid rgb(214 48 63 / 0.15); padding-left: 1.75rem; }
.about-item { position: relative; min-width: 0; }
.about-icon { position: absolute; left: -3.15rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; color: var(--accent-crimson); }
.about-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent-crimson); }
.about-line { margin-top: 0.5rem; font-size: 15px; line-height: 1.7; color: var(--text-primary); }

/* ============================================================
   Skills
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .skills-grid { grid-template-columns: repeat(4, 1fr); } }
.tilt-card {
  position: relative; border-radius: 1.25rem; padding: 1.25rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: 0 18px 50px -20px rgb(214 48 63 / 0.16), inset 0 1px 0 0 rgb(255 255 255 / 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease-expo), transform 0.4s var(--ease-expo), box-shadow 0.5s var(--ease-expo);
  will-change: transform;
}
.tilt-card.in { opacity: 1; transform: translateY(0); }
.tilt-card:hover { box-shadow: 0 30px 60px -24px var(--glow, rgb(214 48 63 / 0.4)); }
.skill-petal { margin-bottom: 0.75rem; width: 16px; height: 16px; transition: transform 0.5s var(--ease-expo); }
.tilt-card:hover .skill-petal { transform: rotate(45deg); }
.skill-name { font-size: 13px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--text-primary); }
@media (min-width: 640px) { .skill-name { font-size: 14px; } }

/* ============================================================
   Projects
   ============================================================ */
.projects-rail { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -1.25rem; padding: 0 1.25rem 1rem; }
@media (min-width: 640px) { .projects-rail { margin: 0 -2rem; padding: 0 2rem 1rem; } }
.project-card {
  position: relative; flex-shrink: 0; width: 85vw; max-width: 420px; scroll-snap-align: center;
  overflow: hidden; border-radius: 1.5rem; padding: 0.75rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: 0 18px 50px -20px rgb(214 48 63 / 0.16), inset 0 1px 0 0 rgb(255 255 255 / 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1);
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.9s var(--ease-expo), transform 0.4s var(--ease-expo), box-shadow 0.5s var(--ease-expo);
  will-change: transform;
}
@media (min-width: 640px) { .project-card { width: 440px; max-width: none; } }
.project-card.in { opacity: 1; transform: translateY(0); }
.project-card:hover { box-shadow: 0 40px 80px -34px var(--glow); transform: translateY(-2px) scale(1.01); }
.project-card:active { transform: scale(0.985); }
.project-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from 180deg, var(--accent-crimson), var(--accent-gold), var(--accent-blush), var(--accent-crimson));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity 0.6s var(--ease-expo);
}
.project-card:hover::before { opacity: 1; }
.project-img { overflow: hidden; border-radius: 1rem; }
.project-img img { aspect-ratio: 16/10; width: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease-expo); }
.project-card:hover .project-img img { transform: scale(1.04); }
.project-body { padding: 1rem; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent-crimson); }
.project-title { margin-top: 0.375rem; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.01em; color: var(--text-primary); }
.project-arrow { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; color: var(--accent-crimson); background: var(--glass); border: 1px solid var(--glass-border); }
.project-arrow svg { transition: transform 0.5s var(--ease-expo); }
.project-card:hover .project-arrow svg { transform: translate(3px,-3px); }
.project-line { margin-top: 0.75rem; font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.project-chips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.chip { border-radius: 999px; background: rgb(214 48 63 / 0.08); padding: 4px 10px; font-size: 11px; letter-spacing: -0.01em; color: var(--text-muted); }
.projects-hint { margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   Services
   ============================================================ */
.services-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-icon { margin-bottom: 1rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 1rem; background: rgb(214 48 63 / 0.08); }
.service-title { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.01em; color: var(--text-primary); }
.service-line { margin-top: 0.5rem; font-size: 14px; line-height: 1.7; color: var(--text-muted); }
@media (min-width: 1024px) { .service-wide { grid-column: span 2; } }

/* ============================================================
   Experience
   ============================================================ */
.exp-wrap { position: relative; padding-left: 2.5rem; }
.exp-line-base { position: absolute; left: 0.75rem; top: 0; bottom: 0; width: 1px; background: rgb(214 48 63 / 0.12); }
.exp-line-fill { position: absolute; left: 0.75rem; top: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: top; background: linear-gradient(180deg, var(--accent-crimson), var(--accent-gold)); will-change: transform; }
.exp-bud { position: absolute; left: 0.75rem; top: 0; width: 1.75rem; height: 1.75rem; color: var(--accent-crimson); transform: translate(-50%, 0); filter: drop-shadow(0 4px 14px rgb(214 48 63 / 0.4)); will-change: transform, top; }
.exp-bud .flower-glyph { display: block; }
.exp-list { display: flex; flex-direction: column; gap: 2.5rem; }
.exp-item { border-radius: 1.5rem; padding: 1.5rem; min-width: 0;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: 0 18px 50px -20px rgb(214 48 63 / 0.16), inset 0 1px 0 0 rgb(255 255 255 / 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(1.1); backdrop-filter: blur(20px) saturate(1.1); }
.exp-year { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent-crimson); }
.exp-title { margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.01em; color: var(--text-primary); }
.exp-line-txt { margin-top: 0.5rem; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

/* ============================================================
   Contact
   ============================================================ */
.contact-intro { margin: -1.5rem 0 2.5rem; max-width: 42rem; font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.contact-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-card a { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; min-width: 0; }
.contact-ic { display: grid; place-items: center; width: 3rem; height: 3rem; flex-shrink: 0; border-radius: 1rem; background: rgb(214 48 63 / 0.08); }
.contact-meta { min-width: 0; }
.contact-cl { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--accent-crimson); }
.contact-cv { margin-top: 0.25rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--text-primary); }
.contact-send { margin-top: 2.5rem; }

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; margin-top: 2.5rem; overflow: hidden; }
.footer-line { height: 1px; width: 100%; background: linear-gradient(90deg, transparent, var(--accent-crimson), var(--accent-gold), transparent); }
.footer-inner { position: relative; margin: 0 auto; max-width: 72rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; padding: 3rem 1.25rem 7rem; text-align: center; font-size: 13px; color: var(--text-muted); }
.footer-petal { width: 12px; height: 12px; }
.footer-made { display: inline-flex; align-items: center; gap: 0.25rem; }
.heart { cursor: pointer; display: inline-block; }
.heart.pop { animation: heartpop 0.7s var(--ease-expo); }
@keyframes heartpop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* ============================================================
   Floating WhatsApp
   ============================================================ */
.wa-btn { position: fixed; bottom: 6rem; right: 1rem; z-index: 75; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 999px; color: var(--accent-crimson); animation: glow-pulse 2.8s ease-out infinite; transition: transform 0.3s var(--ease-expo); will-change: transform; }
@media (min-width: 640px) { .wa-btn { right: 1.5rem; } }
.wa-btn:active { transform: scale(0.94); }
@keyframes glow-pulse { 0%,100% { box-shadow: 0 0 0 0 rgb(214 48 63 / 0.35); } 60% { box-shadow: 0 0 0 18px rgb(214 48 63 / 0); } }

/* ============================================================
   Dock
   ============================================================ */
.dock { position: fixed; inset: auto 0 1.25rem 0; z-index: 70; display: flex; justify-content: center; padding: 0 1rem; transition: transform 0.5s var(--ease-expo), opacity 0.5s var(--ease-expo); pointer-events: none; }
.dock.hidden { transform: translateY(80px); opacity: 0; }
.dock-inner { display: flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px; pointer-events: auto; }
.dock-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--text-muted); transition: transform 0.4s var(--ease-expo), background 0.4s, color 0.4s; }
.dock-item:hover { transform: scale(1.1); background: rgb(214 48 63 / 0.1); color: var(--accent-crimson); }
.dock-item::after { content: attr(data-tip); position: absolute; top: -2.75rem; white-space: nowrap; border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--text-primary); opacity: 0; transition: opacity 0.3s; background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.dock-item:hover::after { opacity: 1; }

/* ============================================================
   Icons (inline mask)
   ============================================================ */
[data-icon]::before { content: ""; width: 18px; height: 18px; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.social[data-icon]::before, .wa-btn[data-icon]::before { width: 20px; height: 20px; }
[data-icon="mail"]::before { -webkit-mask-image: var(--i-mail); mask-image: var(--i-mail); }
[data-icon="chat"]::before { -webkit-mask-image: var(--i-chat); mask-image: var(--i-chat); }
[data-icon="share"]::before { -webkit-mask-image: var(--i-share); mask-image: var(--i-share); }
[data-icon="phone"]::before { -webkit-mask-image: var(--i-phone); mask-image: var(--i-phone); }
:root {
  --i-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E");
  --i-share: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E");
  --i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}
.arrow-ic { width: 16px; height: 16px; display: block; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .petal { display: none; }
  html { scroll-behavior: auto; }
}

/* Low-power: mobile drops heavy blur to stay smooth */
@media (pointer: coarse) {
  .glass, .glass-strong, .tilt-card, .project-card, .exp-item, .btn-ghost, .dock-item::after {
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .glass { background: rgb(255 255 255 / 0.82); }
  .glass-strong { background: rgb(255 255 255 / 0.9); }
  .tilt-card, .project-card, .exp-item { background: rgb(255 255 255 / 0.82); }
}


