/* ═══════════════════════════════════════════
   styles.css — Máximo Briso Portfolio
   Single consolidated stylesheet
═══════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── DESIGN TOKENS ─── */
:root {
  --bg:            #09090B;
  --surface:       #111113;
  --surface-2:     #18181B;
  --border:        #27272A;
  --border-subtle: #1C1C1E;

  --text:          #FAFAFA;
  --text-muted:    #A1A1AA;
  --text-dim:      #52525B;

  --accent:        #818CF8;
  --accent-light:  #A5B4FC;
  --accent-bg:     rgba(129, 140, 248, 0.08);
  --accent-border: rgba(129, 140, 248, 0.2);

  --success:       #4ADE80;
  --error:         #F87171;
  --gold:          #FBBF24;
  --silver:        #94A3B8;

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:        12px;
  --radius-sm:     8px;
  --radius-full:   999px;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --transition:    0.2s ease;

  --header-h:      64px;
  --container:     1160px;
  --section-gap:   140px;
}

/* ─── BASE ─── */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

/* Fallback: show everything if GSAP never runs */
body:not(.gsap-ready) .bento-cell,
body:not(.gsap-ready) .title-line,
body:not(.gsap-ready) .hero-badge,
body:not(.gsap-ready) .bento-role,
body:not(.gsap-ready) .bento-co,
body:not(.gsap-ready) .bento-hero-actions {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .bento-cell { opacity: 1 !important; transform: none !important; }
  .title-line { opacity: 1 !important; transform: none !important; }
  .hero-badge, .bento-role, .bento-co, .bento-hero-actions {
    opacity: 1 !important; transform: none !important;
  }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: none; font-family: var(--font); border: none; background: none; }

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #09090B;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ─── CUSTOM CURSOR ─── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* ─── UTILITIES ─── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: var(--section-gap) 0;
}

.section-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero-tag { margin-bottom: 28px; }

.section-title {
  font-size: clamp(2rem, 4vw, 2.875rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
}

/* Reveal — animated by GSAP */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #09090B;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-full { width: 100%; justify-content: center; }

/* ─── TEXT LINKS ─── */
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
  transition: text-decoration-color var(--transition);
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-bottom 0.3s ease, backdrop-filter 0.3s ease;
}

#header.scrolled {
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  transition: color var(--transition);
}
.logo:hover { color: var(--accent); }


/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 80px) 28px 100px;
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 72px;
  align-items: center;
  width: 100%;
}

.hero-inner {
  padding-left: 24px;
  border-left: 1px solid var(--accent-border);
}

.hero-photo-col {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(15%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  transition: filter 0.4s ease;
  /* initial state set by GSAP in initHero */
}
.hero-photo:hover { filter: grayscale(0%); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  /* margin-bottom controlled per context; opacity/transform owned by GSAP */
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-badge 2.2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(3.75rem, 9.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.97;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 32px;
  overflow: hidden;
}
.title-line {
  display: block;
  /* opacity/transform owned by GSAP */
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(14px);
}
.hero-role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.hero-sep {
  color: var(--text-dim);
  font-size: 0.875rem;
}
.hero-company {
  font-size: 1rem;
  color: var(--text-muted);
}
.company-link {
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition);
}
.company-link:hover { color: var(--accent-light); }

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.72;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(14px);
}

.hero-actions {
  display: flex;
  gap: 10px;
  /* opacity/transform owned by GSAP */
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 44px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
}
.scroll-track {
  width: 1px;
  height: 56px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.scroll-thumb {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
  0% { top: -50%; }
  100% { top: 150%; }
}
.scroll-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  writing-mode: vertical-rl;
}

/* ═══════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}

.about-content { display: flex; flex-direction: column; gap: 0; }

.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}
.about-body p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.78;
  max-width: 560px;
}

.skills-block {
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.skill-group { padding-right: 20px; }
.skill-group + .skill-group {
  border-left: 1px solid var(--border-subtle);
  padding: 0 20px;
}
.skill-group:last-child { padding-right: 0; }
.skill-group h4 {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.skill-group li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding: 2px 0;
}

/* About sidebar */
.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 22px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border); }

.card-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card-company {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}
.arrow-link {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--text-dim);
  display: inline-block;
  transition: color var(--transition), transform 0.2s ease;
  line-height: 1;
  margin-top: 4px;
}
.arrow-link:hover {
  color: var(--accent);
  transform: translate(2px, -2px);
}
.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin-bottom: 16px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag-row span {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 3px 9px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  border: 1px solid var(--accent-border);
}

/* ═══════════════════════════════════════════
   ACHIEVEMENTS MOSAIC
═══════════════════════════════════════════ */
.ach-mosaic-header { margin-bottom: 48px; }

.ach-mosaic {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 310px 220px;
  gap: 3px;
}

/* ─── Cell base ─── */
.ach-cell {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.35s ease;
}
.ach-cell:hover { border-color: var(--accent-border); }

/* Main cell spans both rows */
.ach-cell--main { grid-row: 1 / span 2; }

/* ─── Photo background ─── */
.ach-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.3;
  transition: transform 0.8s var(--ease-out), opacity 0.5s ease;
  z-index: 0;
}
.ach-cell:hover .ach-bg {
  transform: scale(1.06);
  opacity: 0.46;
}

/* Gradient overlay on photo cells */
.ach-cell--has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(9,9,11,0.90) 25%, rgba(9,9,11,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Minor cell (no photo) — subtle accent left-border */
.ach-cell--minor {
  border-left: 2px solid rgba(129, 140, 248, 0.28);
}

/* ─── Inner layout ─── */
.ach-cell-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Index — editorial corner tag */
.ach-idx {
  display: block;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* Body group */
.ach-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Year */
.ach-year-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Position — the hero element */
.ach-pos {
  display: block;
  font-size: clamp(4.5rem, 7.5vw, 6.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.048em;
  color: var(--gold);
  margin: 4px 0 2px;
}
.ach-cell--main .ach-pos {
  font-size: clamp(5.5rem, 10vw, 8.5rem);
}
.ach-cell--minor .ach-pos {
  color: var(--silver);
  font-size: clamp(4rem, 6.5vw, 5.5rem);
}
.ach-pos sup {
  font-size: 0.3em;
  vertical-align: 0.6em;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Competition level */
.ach-level {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Event name */
.ach-ev {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 220px;
}

/* Footer org label */
.ach-footer-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Profile image in about */
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(20%);
  transition: filter 0.4s ease;
}
.about-photo:hover { filter: grayscale(0%); }

/* ═══════════════════════════════════════════
   WORK
═══════════════════════════════════════════ */
.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}
.filter-btn {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: var(--accent);
  color: #09090B;
  font-weight: 600;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

/* Project Card */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.project-card:hover {
  border-color: var(--accent-border);
}

/* Featured card — first in grid, spans 2 columns */
.project-card--featured { grid-column: 1 / span 2; }
.project-card--featured .p-img-wrap { height: 260px; }

/* Ghost project number — subtle editorial depth */
.p-num-ghost {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 4rem;
  font-weight: 800;
  color: var(--text);
  opacity: 0.05;
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.p-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.p-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--surface-2);
}
.p-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out);
}
.project-card:hover .p-img-wrap img { transform: scale(1.05); }

.p-img-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(9, 9, 11, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover .p-img-overlay { opacity: 1; }

.p-visit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: translateY(6px);
  transition: transform 0.3s var(--ease-out);
}
.project-card:hover .p-visit { transform: translateY(0); }

.p-body { padding: 18px 20px 20px; }

.p-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.p-num {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
}
.p-cat {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.p-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.p-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.p-tags span {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 2px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left { padding-top: 8px; }

.contact-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin-top: 20px;
  max-width: 400px;
}

.contact-info-block {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-info-link {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color var(--transition);
  display: inline-block;
}
.contact-info-link:hover { color: var(--accent); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 0;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  resize: none;
  width: 100%;
  transition: border-color var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group textarea:focus { border-bottom-color: var(--accent); }

#submit-btn { margin-top: 6px; }
#submit-btn .btn-loading { display: none; }
#submit-btn.loading .btn-text { display: none; }
#submit-btn.loading .btn-loading { display: inline; }
#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  font-size: 0.875rem;
  text-align: center;
  min-height: 18px;
  transition: all var(--transition);
  padding-top: 4px;
}
.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-muted); }

/* ═══════════════════════════════════════════
   BENTO GRID — Single-screen layout
═══════════════════════════════════════════ */

/* ─── Grid container ─── */
.bento {
  display: grid;
  /* hero | work+about | awards | contact */
  grid-template-columns: 1fr 1.15fr 0.85fr 0.95fr;
  /* work taller than about (work needs space for cards) */
  grid-template-rows: 56% 44%;
  gap: 3px;
  height: calc(100dvh - var(--header-h));
  margin-top: var(--header-h);
  background: var(--bg); /* gap fill color */
  overflow: hidden;
}

/* ─── Cell base ─── */
.bento-cell {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}

/* Grid placement */
.bento-hero    { grid-column: 1; grid-row: 1 / span 2; background: var(--bg); }
.bento-work    { grid-column: 2; grid-row: 1; }
.bento-about   { grid-column: 2; grid-row: 2; }
.bento-awards  { grid-column: 3; grid-row: 1 / span 2; }
.bento-contact { grid-column: 4; grid-row: 1; }
.bento-wg      { grid-column: 4; grid-row: 2; }

/* ─── Inner wrapper ─── */
.bento-cell-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

/* Consistent section-tag spacing in bento */
.bento-cell .section-tag { margin-bottom: 0; flex-shrink: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO CELL — 3-zone layout
   Top: header  |  Mid: stats+WG  |  Bottom: name+CTAs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bento-hero .ach-bg { opacity: 0.28; }

/* Gradient: photo at top, name readable in center, solid at bottom */
.bento-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(9, 9, 11, 0.98) 0%,
    rgba(9, 9, 11, 0.80) 30%,
    rgba(9, 9, 11, 0.55) 58%,
    rgba(9, 9, 11, 0.15) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ─ ZONE TOP ─ */
.bento-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.bento-hero-header .section-tag { margin-bottom: 0; }

.bento-hero-location {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ─ ZONE MIDDLE: name is the hero element ─ */
.bento-hero-mid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  margin-bottom: 14px;
}

/* Info rows */
.bento-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-subtle);
}

.bhm-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.bhm-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  width: 72px;
  flex-shrink: 0;
}

.bhm-val {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─ ZONE MIDDLE: name fills the center, vertically centered ─ */
.bento-hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 0;
}

.bento-hero-body .hero-badge {
  margin-bottom: 18px;
  font-size: 0.73rem;
  padding: 5px 12px;
}

.bento-name {
  font-size: clamp(2.8rem, 5.2vw, 5.2rem);
  font-weight: 800;
  line-height: 0.90;
  letter-spacing: -0.048em;
  color: var(--text);
  margin-bottom: 14px;
  overflow: hidden;
}

.bento-role {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.bento-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 6px;
  margin-bottom: 2px;
  max-width: 240px;
}

.bento-co {
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ABOUT CELL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* About cell: bio+skills cluster at top, wg-card anchors the bottom */
.bento-about .bento-cell-inner {
  justify-content: flex-start;
}

.bento-bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-top: 12px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-skills {
  display: flex;
  flex-direction: column;
}

.bsk {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--border-subtle);
  align-items: baseline;
}
.bsk:last-child { border-bottom: 1px solid var(--border-subtle); }

.bsk-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  width: 38px;
  flex-shrink: 0;
}

.bsk-items {
  font-size: 0.79rem;
  color: var(--text-muted);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WORK CELL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bento-work-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.bento-work-hd .section-tag { margin-bottom: 2px; }
.bento-work-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.4;
}

/* Compact filter pills in bento */
.bento-work .filter-group { padding: 3px; }
.bento-work .filter-btn { padding: 5px 13px; font-size: 0.74rem; }

#projects-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  align-content: start;
}
#projects-grid::-webkit-scrollbar { width: 3px; }
#projects-grid::-webkit-scrollbar-track { background: transparent; }
#projects-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Compact project cards inside bento */
.bento-work .project-card--featured { grid-column: 1 / span 2; }
.bento-work .p-img-wrap { height: 88px; }
.bento-work .project-card--featured .p-img-wrap { height: 110px; }
.bento-work .p-body { padding: 9px 12px 11px; }
.bento-work .p-title { font-size: 0.82rem; margin-bottom: 2px; }
.bento-work .p-desc { display: none; }
.bento-work .p-tags { gap: 3px; }
.bento-work .p-tags span { font-size: 0.56rem; }
.bento-work .p-num-ghost { font-size: 2rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AWARDS CELL
   Section tag in its own header bar → ach-cells fill the rest
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bento-awards-inner {
  padding: 0;
  /* inherits display:flex; flex-direction:column; height:100% from .bento-cell-inner */
}

/* Tag + context line sit in a thin dedicated header row */
.bento-awards-hd {
  padding: 16px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.bento-awards-tag {
  display: block;
  margin-bottom: 4px;
}
.bento-awards-sub {
  font-size: 0.62rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

/* 3 ach-cells share the remaining height equally */
.bento-ach {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
}

/* Scaled-down achievement numbers for bento height */
.bento-ach .ach-pos {
  font-size: clamp(2.4rem, 3.2vw, 4rem);
}
.bento-ach .ach-cell--minor .ach-pos {
  font-size: clamp(2rem, 2.8vw, 3.4rem);
  color: var(--silver);
}
.bento-ach .ach-cell-inner { padding: 14px 18px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTACT CELL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bento-contact .bento-cell-inner {
  overflow-y: auto;
}
.bento-contact .bento-cell-inner::-webkit-scrollbar { width: 3px; }
.bento-contact .bento-cell-inner::-webkit-scrollbar-track { background: transparent; }
.bento-contact .bento-cell-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.bento-contact-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 4px 0 0;
  line-height: 1.4;
}

.bento-contact-title {
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-top: 14px;
  margin-bottom: 16px;
  color: var(--text);
}

.bento-contact-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}
.bento-contact-meta span {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 500;
}

.bento-contact-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.bento-contact .contact-form {
  flex: 1;
  gap: 14px;
}
.bento-contact .form-group { gap: 5px; }
.bento-contact .form-group input,
.bento-contact .form-group textarea { padding: 9px 0; font-size: 0.85rem; }

.bento-footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.bento-footer-links a {
  color: var(--text-dim);
  transition: color var(--transition);
}
.bento-footer-links a:hover { color: var(--text-muted); }
.bento-footer-copy { font-size: 0.66rem; color: var(--text-dim); }

/* ─── Fallbacks (no GSAP / prefers-reduced-motion) ─── */
body:not(.gsap-ready) .bento-cell,
body:not(.gsap-ready) .bento-hero-mid,
body:not(.gsap-ready) .hero-badge,
body:not(.gsap-ready) .hero-actions,
body:not(.gsap-ready) .title-line,
body:not(.gsap-ready) .bento-role,
body:not(.gsap-ready) .bento-co,
body:not(.gsap-ready) .bento-hero-actions {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .bento-cell, .bento-hero-mid { opacity: 1 !important; transform: none !important; }
  .title-line { opacity: 1 !important; transform: none !important; }
  .hero-badge, .hero-actions, .bento-role, .bento-co,
  .bento-hero-actions { opacity: 1 !important; transform: none !important; }
  .bento-ach .ach-cell { clip-path: none !important; }
}

/* ─── BENTO RESPONSIVE ─── */
@media (max-width: 1100px) {
  .bento { grid-template-columns: 1fr 1.1fr 0.82fr 0.9fr; }
}

@media (max-width: 900px) {
  /* Force all animated elements visible — overrides any GSAP inline styles */
  .bento-cell,
  .title-line,
  .hero-badge,
  .bento-role,
  .bento-co,
  .bhm-row,
  .bento-ach .ach-cell {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    height: auto;
    overflow: visible;
  }
  body { overflow-y: auto; }

  /* height:100% collapses in auto-height grid rows — let content determine height */
  .bento-cell-inner {
    height: auto;
    min-height: 0;
  }
  /* flex:1 children also collapse without a definite container height */
  .bento-hero-body,
  .bento-about .bento-cell-inner > *,
  .bento-contact .bento-cell-inner > * {
    flex: 0 0 auto;
  }
  .bento-hero    { grid-column: 1 / span 2; grid-row: 1; min-height: 58vh; }
  .bento-about   { grid-column: 1;          grid-row: 2; min-height: 300px; }
  .bento-awards  { grid-column: 2;          grid-row: 2; min-height: 300px; }
  .bento-work    { grid-column: 1 / span 2; grid-row: 3; min-height: 400px; }
  .bento-contact { grid-column: 1;          grid-row: 4; min-height: 400px; }
  .bento-wg      { grid-column: 2;          grid-row: 4; min-height: 300px; }

  #projects-grid { grid-template-columns: repeat(3, 1fr); }
  .bento-work .project-card--featured { grid-column: 1 / span 3; }
  .bento-work .p-img-wrap { height: 110px; }
  .bento-work .project-card--featured .p-img-wrap { height: 150px; }
  .bento-work .p-desc { display: -webkit-box; }

  .bento-ach {
    display: grid;
    grid-template-rows: none;
    grid-template-columns: repeat(3, 1fr);
    min-height: 280px;
  }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bento-hero, .bento-work, .bento-about,
  .bento-awards, .bento-contact, .bento-wg {
    grid-column: 1;
  }
  /* Explicit rows so order matches section numbers (01→02→03→04→05→06) */
  .bento-hero    { grid-row: 1; min-height: 55vh; }
  .bento-about   { grid-row: 2; min-height: 280px; }
  .bento-awards  { grid-row: 3; min-height: 440px; }
  .bento-work    { grid-row: 4; min-height: 380px; }
  .bento-contact { grid-row: 5; min-height: 520px; }
  .bento-wg      { grid-row: 6; min-height: 260px; }

  #projects-grid { grid-template-columns: 1fr; }
  .bento-work .project-card--featured { grid-column: 1; }
  .bento-ach {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    min-height: 440px;
  }
  .bento-name { font-size: clamp(2.6rem, 12vw, 3.8rem); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-layout { grid-template-columns: 1fr 260px; gap: 48px; }
  .about-grid { grid-template-columns: 1fr 320px; gap: 56px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  /* featured spans both cols = full width at this bp */
  .project-card--featured { grid-column: 1 / span 2; }
}

@media (max-width: 900px) {
  :root { --section-gap: 100px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .about-sidebar > * { flex: 1 1 280px; }

  .ach-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 270px 210px;
  }

  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .contact-desc { max-width: 100%; }
}

@media (max-width: 768px) {
  :root { --section-gap: 80px; --header-h: 56px; }

  body { cursor: auto; }
  button { cursor: pointer; }
  .cursor, .cursor-ring { display: none; }

  .nav { display: none; }
  .menu-btn { display: flex; }

  .hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 80px; }
  .hero-layout { display: block; }
  .hero-photo-col { display: none; }
  .hero-inner { padding-left: 16px; }

  .ach-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .ach-cell--main { grid-row: auto; min-height: 280px; }
  .ach-cell { min-height: 200px; }
  .ach-cell--main .ach-pos { font-size: clamp(4.5rem, 18vw, 7rem); }
  .hero-title { font-size: clamp(3rem, 14vw, 5.5rem); }
  .hero-meta { flex-wrap: wrap; gap: 4px; }
  .hero-sep { display: none; }
  .hero-company { width: 100%; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-scroll { display: none; }

  .skills-block { grid-template-columns: 1fr; }
  .skill-group { padding-right: 0; padding-bottom: 20px; }
  .skill-group + .skill-group {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding: 20px 0 0;
  }
  .about-sidebar { flex-direction: column; }

  .work-header { flex-direction: column; align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero-scroll { left: 16px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WEBGRAPHIX BENTO CELL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bento-wg {
  background: linear-gradient(145deg, var(--surface) 0%, rgba(129, 140, 248, 0.06) 100%);
  border-top: 2px solid var(--accent) !important;
}

.bento-wg .bento-cell-inner {
  justify-content: space-between;
  gap: 10px;
}

/* ─ Top row ─ */
.bwg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.bwg-badge {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 3px 9px;
  border-radius: 99px;
}

/* ─ Brand ─ */
.bwg-brand {
  flex-shrink: 0;
}

.bwg-sub {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.bwg-name {
  font-size: clamp(1.6rem, 2.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  background: linear-gradient(120deg, var(--text) 20%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

/* ─ Geo indicator ─ */
.bwg-geo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bwg-geo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
  flex-shrink: 0;
}

.bwg-geo-tag {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.bwg-geo-sep {
  font-size: 0.58rem;
  color: var(--accent);
  font-weight: 700;
}

/* ─ Origin story ─ */
.bwg-story {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 2px solid var(--accent-border);
  padding-left: 10px;
  flex-shrink: 0;
}

/* ─ Service pills ─ */
.bwg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.bwg-pills span {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 99px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.bwg-pills span:hover {
  color: var(--accent-light);
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

/* ─ CTA ─ */
.bwg-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}
.bwg-cta:hover {
  border-color: var(--accent);
  background: rgba(129, 140, 248, 0.13);
}

.bwg-cta-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bwg-cta-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.bwg-cta-url {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.bwg-cta-arrow {
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.bwg-cta:hover .bwg-cta-arrow { transform: translate(2px, -2px); }
