/* Theme: Bento Studio (premium, animated) — playful light bento: pastel tiles, soft depth, springy hovers. Mobile-first. */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --bg: #f3f1ec; --tile: #ffffff; --text: #18181b; --muted: #6b6b73; --line: rgba(24, 24, 27, .08);
    --yellow: #ffe58a; --lilac: #ddd1ff; --mint: #c9f2dc; --sky: #cfe8ff; --peach: #ffd9c7; --orange: #ff6b3d;
    --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --spring: cubic-bezier(.34, 1.56, .64, 1); --ease: cubic-bezier(.2, .8, .2, 1);
    --r: 26px; --gap: 12px;
}
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
img { max-width: 100%; }
.prewrap { white-space: pre-line; }
::selection { background: var(--yellow); }

.bx { width: min(1240px, 100%); margin: 0 auto; padding: 12px 12px 40px; }
.bx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: dense; }
.bx-tile { position: relative; background: var(--tile); border-radius: var(--r); padding: 20px; overflow: hidden; min-width: 0;
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(0,0,0,.04), 0 12px 30px -18px rgba(0,0,0,.18);
    transition: transform .45s var(--spring), box-shadow .3s; }
.bx-tile:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 40px -22px rgba(0,0,0,.28); }
.bx-label { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

/* Spans (mobile: 2 columns) */
.bx-intro, .bx-bio, .bx-skills, .bx-services, .bx-quote, .bx-project, .bx-exp, .bx-stack, .bx-certs, .bx-contact { grid-column: span 2; }

/* Intro */
.bx-intro { display: grid; gap: 12px; align-content: start; padding: 24px; background: linear-gradient(160deg, #fff, #fffaf0); }
.bx-name { font-size: clamp(2.1rem, 9vw, 3.6rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.bx-headline { font-size: 1.08rem; color: #3f3f46; max-width: 36ch; }
.bx-tagline { font-size: clamp(1.15rem, 4.4vw, 1.45rem); line-height: 1.3; font-weight: 600; max-width: 30ch; padding: 10px 14px; border-radius: 16px; background: var(--yellow); justify-self: start; transform: rotate(-1deg); }
.bx-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.bx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--text); color: #fff; text-decoration: none; font-weight: 600;
    transition: transform .35s var(--spring), background .2s; will-change: transform; }
.bx-btn:hover { background: var(--orange); }
.bx-btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.bx-btn-ghost:hover { background: var(--text); color: #fff; }
.bx-btn-lg { min-height: 58px; font-size: clamp(1rem, 4vw, 1.2rem); max-width: 100%; overflow-wrap: anywhere; background: #fff; color: var(--text); }
.bx-btn-lg:hover { background: var(--text); color: #fff; }
.bx .pm-avail { margin: 0; justify-self: start; background: var(--mint); border-color: transparent; }

/* Photo */
.bx-photo { padding: 0; aspect-ratio: 1; background: var(--lilac); }
.bx-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.bx-photo:hover img { transform: scale(1.06); }
.bx-initials { display: grid; place-items: center; width: 100%; height: 100%; font-size: clamp(3rem, 14vw, 5rem); font-weight: 800; letter-spacing: -.04em; }
.bx-photo-tag { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: .8rem; font-weight: 600; }

/* Location */
.bx-loc { background: var(--sky); display: grid; align-content: end; min-height: 150px; }
.bx-loc strong { font-size: 1.25rem; line-height: 1.15; position: relative; z-index: 1; }
.bx-radar { position: absolute; right: 16px; top: 16px; width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid rgba(24,24,27,.15); }
.bx-radar::before, .bx-radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(24,24,27,.2); animation: bx-ripple 2.6s var(--ease) infinite; }
.bx-radar::after { animation-delay: 1.3s; }
.bx-radar i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #fff; }
@keyframes bx-ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* Stats */
.bx-stat { display: grid; align-content: space-between; min-height: 150px; }
.bx-stat strong { font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.bx-stat .bx-label { margin: 8px 0 0; color: #3f3f46; }
.bx-stat-a { background: var(--yellow); } .bx-stat-b { background: var(--peach); } .bx-stat-c { background: var(--mint); }

/* Bio, social */
.bx-bio p { font-size: 1.05rem; color: #27272a; }
.bx-social .social { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bx-social .social a { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-weight: 600; background: #f4f4f5; transition: background .2s, transform .3s var(--spring); }
.bx-social .social a::after { content: "↗"; color: var(--muted); }
.bx-social .social a:hover { background: var(--lilac); transform: translateX(3px); }

/* Skills marquee */
.bx-skills { padding: 20px 0; display: grid; align-content: center; }
.bx-skills .bx-label { padding: 0 20px; }
.bx-marquee { display: grid; gap: 8px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.bx-row { display: flex; gap: 8px; width: max-content; animation: bx-marq 30s linear infinite; }
.bx-row-rev { animation-direction: reverse; animation-duration: 36s; }
.bx-row span { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; background: #f4f4f5; white-space: nowrap; }
.bx-row span:nth-child(3n+1) { background: var(--lilac); } .bx-row span:nth-child(3n+2) { background: var(--mint); }
@keyframes bx-marq { to { transform: translateX(-50%); } }

/* Services */
.bx-services ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bx-services li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: #fafaf9; border: 1px solid var(--line); }
.bx-services strong { font-size: 1.02rem; }
.bx-services span { color: var(--muted); font-size: .92rem; }

/* Quote */
.bx-quote { background: var(--text); color: #fafafa; display: grid; align-content: center; gap: 14px; padding: 26px; }
.bx-quote p { font-size: clamp(1.2rem, 4.6vw, 1.6rem); line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.bx-quote p::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--yellow); margin-bottom: 8px; }
.bx-quote figcaption { color: #a1a1aa; font-size: .9rem; }

/* Projects */
.bx-project { padding: 8px; display: flex; flex-direction: column; }
.bx-project .pm-cover { margin: 0; border-radius: 20px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--lilac); }
.bx-project .pm-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.bx-project:hover .pm-cover img { transform: scale(1.05); }
.pm-cover-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--lilac), var(--sky)); }
.pm-cover-ph span { font-size: 4rem; font-weight: 800; }
.bx-project-body { padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bx-project-body .bx-label { margin: 0; }
.bx-project h3 { font-size: 1.35rem; letter-spacing: -.02em; }
.bx-project p { color: #3f3f46; font-size: .97rem; }
.bx-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bx-tags li { font-size: .78rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: #f4f4f5; }
.bx-project .pm-meta { color: var(--muted); }
.bx-links { margin-top: auto; display: flex; gap: 8px; padding-top: 4px; }
.bx-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #f4f4f5; text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .2s; }
.bx-links a:hover { background: var(--yellow); }

/* Experience */
.bx-exp ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bx-exp li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.bx-exp li:first-child { border-top: 0; padding-top: 0; }
.bx-exp li div { display: grid; }
.bx-exp li div span { color: var(--muted); font-size: .92rem; }
.bx-exp time { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.bx-exp p { grid-column: 1 / -1; color: #3f3f46; font-size: .94rem; margin-top: 4px; }

/* Stack + certs */
.bx-group { display: grid; gap: 8px; margin-bottom: 14px; }
.bx-group:last-child { margin-bottom: 0; }
.bx-group > span { font-weight: 600; font-size: .92rem; }
.bx-certs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bx-certs li { display: flex; gap: 12px; align-items: flex-start; }
.bx-certs li div { display: grid; }
.bx-certs li div span { color: var(--muted); font-size: .88rem; }
.bx-badge { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--mint); font-weight: 800; flex-shrink: 0; }

/* Contact */
.bx-contact { display: grid; justify-items: center; gap: 18px; text-align: center; padding: clamp(32px, 8vw, 56px) 20px; background: var(--orange); color: #fff; }
.bx-contact h2 { font-size: clamp(1.8rem, 7vw, 3rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }

/* Shared blocks */
.bx > .pm-section { margin-top: 12px; background: var(--tile); border-radius: var(--r); padding: 22px; box-shadow: 0 12px 30px -18px rgba(0,0,0,.18); }
.bx .pm-h2 { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bx .pm-gallery-item { border-radius: 18px; }

.owner-bar { background: var(--text); color: #fff; text-align: center; padding: 8px 16px; font-size: .86rem; }
.owner-bar a { color: var(--yellow); margin-left: 8px; font-weight: 600; }
.pm-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 10px 16px calc(28px + env(safe-area-inset-bottom)); }

@media (min-width: 640px) {
    .bx { padding: 20px 20px 50px; }
    :root { --gap: 16px; }
    .bx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bx-intro { grid-column: span 4; }
    .bx-photo { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 300px; }
    .bx-project.is-featured, .bx-contact { grid-column: span 4; }
}
@media (min-width: 1024px) {
    .bx-intro { grid-column: span 2; grid-row: span 2; padding: 34px; align-content: center; }
    .bx-photo { grid-column: span 1; grid-row: span 2; }
    /* Keep the reading order on desktop; spans below are chosen so rows close neatly. */
    .bx-grid { grid-auto-flow: row; }
    .bx-skills { grid-column: span 3; }
    .bx-certs { grid-column: span 4; }
    .bx-certs ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bx-project.is-featured { flex-direction: row; gap: 10px; }
    .bx-project.is-featured .pm-cover { flex: 1.4; aspect-ratio: auto; min-height: 320px; }
    .bx-project.is-featured .bx-project-body { flex: 1; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .bx-row, .bx-radar::before, .bx-radar::after { animation: none; }
    .bx-tile, .bx-btn, .bx-photo img, .bx-project .pm-cover img { transition: none; }
}
/* After the reveal, hovers use the springy timing again */
.js .bx-tile[data-reveal].is-visible { transition: opacity .9s var(--ease), transform .45s var(--spring), box-shadow .3s; }
