:root {
  --bg: #0a0d12;
  --surface: #11141a;
  --border: #1c2029;
  --border-strong: #2a2f3a;
  --text: #ecedf0;
  --text-2: #9ea3ad;
  --text-3: #666c78;
  --accent: #1a73ff;
  --accent-soft: rgba(26, 115, 255, 0.10);
  --accent-line: rgba(26, 115, 255, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.container { max-width: 880px; margin: 0 auto; padding: 0 28px; }

.slash { color: var(--text-3); user-select: none; }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.nav-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.nav nav { display: flex; gap: 22px; }
.nav nav a {
  color: var(--text-2);
  transition: color 0.15s ease;
}
.nav nav a:hover { color: var(--text); }

/* ============ HERO ============ */
.hero { padding: 72px 0 110px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.name {
  margin: 0 0 26px;
  font-family: var(--font);
  font-size: clamp(56px, 12vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 700;
  font-variation-settings: "wdth" 95;
}

.bio {
  margin: 0 0 26px;
  max-width: 580px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
}

.links {
  margin: 0;
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.links a {
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============ SECTIONS ============ */
.section { padding: 72px 0; }

.label {
  margin: 0 0 22px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
  font-weight: 500;
}

.prose {
  margin: 0;
  max-width: 620px;
  color: var(--text);
}
.prose p {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.55;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--accent); font-weight: 500; }

/* ============ TABS ============ */
.tab-list {
  position: relative;
  display: inline-flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  --indicator-x: 0px;
  --indicator-w: 0px;
}
.tab-list::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: var(--indicator-w);
  transform: translateX(var(--indicator-x));
  background: var(--accent);
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
  border-radius: 1px;
}
.tab {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 0;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.15s ease;
  letter-spacing: 0.005em;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--text); }

.tab-panels { position: relative; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-panel.active .work-item,
.tab-panel.active .toolkit > * {
  animation: rise 0.55s var(--ease) backwards;
}
.tab-panel.active .work-item:nth-child(1),
.tab-panel.active .toolkit > *:nth-child(1) { animation-delay: 0.05s; }
.tab-panel.active .work-item:nth-child(2),
.tab-panel.active .toolkit > *:nth-child(2) { animation-delay: 0.11s; }
.tab-panel.active .work-item:nth-child(3),
.tab-panel.active .toolkit > *:nth-child(3) { animation-delay: 0.17s; }
.tab-panel.active .work-item:nth-child(4),
.tab-panel.active .toolkit > *:nth-child(4) { animation-delay: 0.23s; }
.tab-panel.active .toolkit > *:nth-child(5) { animation-delay: 0.29s; }
.tab-panel.active .toolkit > *:nth-child(6) { animation-delay: 0.35s; }
.tab-panel.active .toolkit > *:nth-child(7) { animation-delay: 0.41s; }
.tab-panel.active .toolkit > *:nth-child(8) { animation-delay: 0.47s; }
.tab-panel.active .toolkit > *:nth-child(9) { animation-delay: 0.53s; }
.tab-panel.active .toolkit > *:nth-child(10) { animation-delay: 0.59s; }
.tab-panel.active .toolkit > *:nth-child(11) { animation-delay: 0.65s; }
.tab-panel.active .toolkit > *:nth-child(12) { animation-delay: 0.71s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ PROJECT ITEMS (list with media on the right) ============ */
.project-item {
  --brand: var(--accent);
  --brand-soft: var(--accent-soft);
  --brand-line: var(--accent-line);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}
.project-item[data-brand="deckira"] {
  --brand: #4a6cf7;
  --brand-soft: rgba(74, 108, 247, 0.10);
  --brand-line: rgba(74, 108, 247, 0.24);
}
.project-item[data-brand="culinara"] {
  --brand: #ff6b35;
  --brand-soft: rgba(255, 107, 53, 0.10);
  --brand-line: rgba(255, 107, 53, 0.24);
}
.project-item[data-brand="melo"] {
  --brand: #c4a584;
  --brand-soft: rgba(196, 165, 132, 0.10);
  --brand-line: rgba(196, 165, 132, 0.26);
}
.project-item[data-brand="plop"] {
  --brand: #b8854f;
  --brand-soft: rgba(184, 133, 79, 0.10);
  --brand-line: rgba(184, 133, 79, 0.26);
}
.project-item .work-title { color: var(--brand); }
.project-item .work-desc strong { color: var(--brand); }
.project-item .work-ext { color: var(--text-3); }
.project-item .work-ext:hover { color: var(--brand); border-bottom-color: var(--brand); }

.project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease), border-color 0.2s ease;
}
.project-item:hover .project-media {
  transform: translateY(-2px);
  border-color: var(--brand);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-item[data-brand="culinara"] {
  grid-template-columns: 1fr 200px;
  align-items: center;
}
.project-item[data-brand="culinara"] .project-media {
  aspect-ratio: 6 / 13;
  background: #0e1117;
  border: 1px solid #1f2128;
  border-radius: 26px;
  padding: 7px;
  box-shadow:
    0 24px 56px -16px rgba(255, 107, 53, 0.28),
    0 6px 14px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.project-item[data-brand="culinara"]:hover .project-media {
  transform: translateY(-3px);
  border-color: #2a2c34;
}
.project-item[data-brand="culinara"] .project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}
.project-item[data-brand="melo"] .project-media {
  aspect-ratio: 1 / 1;
}
.project-item[data-brand="melo"] .project-media img {
  object-fit: contain;
  padding: 14px;
}

/* Brand color helpers for inline mentions */
.color-culinara { color: #ff6b35; font-weight: 500; }
.color-deckira  { color: #4a6cf7; font-weight: 500; }
.color-melo     { color: #c4a584; font-weight: 500; }
.color-plop     { color: #b8854f; font-weight: 500; }
@media (max-width: 720px) {
  .project-item {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .project-media { max-width: 100%; }
}

/* ============ DECKIRA INTERACTIVE DEMO ============ */
.demo-deckira {
  background: #f5f1ea;
  padding: 16px;
  display: block;
  cursor: default;
}
.demo-deckira:hover { transform: none; border-color: var(--brand-line); }
.demo-window {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font);
  color: #1a1815;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-dots {
  display: flex;
  gap: 5px;
}
.demo-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8d4cd;
}
.demo-dots span:nth-child(1) { background: #ff5f57; }
.demo-dots span:nth-child(2) { background: #ffbd2e; }
.demo-dots span:nth-child(3) { background: #28c940; }
.demo-mode-label {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  color: #1a1815;
  background: #ffffff;
  border: 1px solid rgba(26, 24, 21, 0.08);
  box-shadow: 0 1px 2px rgba(26, 24, 21, 0.05);
}
.demo-count {
  margin-left: auto;
  font-size: 11.5px;
  color: #9a938a;
  font-variant-numeric: tabular-nums;
}
.demo-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(26, 24, 21, 0.10);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
  user-select: none;
  min-height: 0;
}
.demo-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.demo-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.demo-card.revealed { cursor: default; }
.demo-card.revealed:hover { transform: none; }
.demo-label {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #9a938a;
}
.demo-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1815;
  line-height: 1.35;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.demo-card.flipping .demo-text { opacity: 0; transform: translateY(4px); }
.demo-divider {
  height: 1px;
  background: rgba(26, 24, 21, 0.08);
  margin-top: auto;
}
.demo-hint {
  margin: 0;
  font-size: 11.5px;
  color: #9a938a;
  text-align: center;
}
.demo-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.demo-actions[hidden] { display: none; }
.demo-rate {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 7px 0;
  border-radius: 6px;
  border: 1px solid rgba(26, 24, 21, 0.10);
  background: #ffffff;
  color: #1a1815;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.demo-rate:hover { transform: translateY(-1px); }
.demo-rate[data-rate="again"]:hover { background: #B91C1C; color: #fff; border-color: #B91C1C; }
.demo-rate[data-rate="hard"]:hover  { background: #A16207; color: #fff; border-color: #A16207; }
.demo-rate[data-rate="good"]:hover  { background: #15803D; color: #fff; border-color: #15803D; }
.demo-rate[data-rate="easy"]:hover  { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ============ PLOP CARD ============ */
.demo-plop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}
.plop-emoji {
  font-size: clamp(64px, 18vw, 110px);
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(184, 133, 79, 0.25));
}
.plop-wordmark {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand);
}
.project-body { display: flex; flex-direction: column; gap: 6px; }
.project-card .work-head { margin-bottom: 2px; }
.project-card .work-title {
  color: var(--brand);
  font-size: 22px;
}
.project-card .work-ext {
  color: var(--text-3);
}
.project-card .work-ext:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.project-card .work-org { margin-bottom: 6px; }
.project-card .work-desc { font-size: 15.5px; margin-bottom: 6px; }
.project-card .work-desc strong { color: var(--brand); }
.project-card .work-tech { font-size: 12.5px; }
.project-card .work-tech .slash { margin: 0 6px; }

/* ============ WORK ITEM ============ */
.work-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.work-item:first-child { padding-top: 4px; }
.work-item:last-child { border-bottom: none; padding-bottom: 4px; }

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.work-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.012em;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.work-ext {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
  border-bottom: 1px dotted var(--border-strong);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.work-ext:hover { color: var(--accent); border-bottom-color: var(--accent); }

.work-period {
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.work-org {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-2);
}
.work-desc {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--text);
  max-width: 660px;
  line-height: 1.55;
}
.work-desc strong {
  color: var(--accent);
  font-weight: 500;
}
.work-tech {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}
.work-tech .slash {
  margin: 0 8px;
}

/* ============ TOOLKIT ============ */
.toolkit {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 28px;
  margin: 4px 0 0;
}
.toolkit dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  padding-top: 4px;
  font-weight: 500;
}
.toolkit dd {
  margin: 0;
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
}
.toolkit dd .muted { color: var(--text-3); }

/* ============ FOOTER ============ */
.footer {
  padding: 56px 0 36px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
  color: var(--text-3);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--text-2); transition: color 0.15s ease; }
.footer-inner a:hover { color: var(--text); }

/* ============ SELECTION + SCROLLBAR ============ */
::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  .container, .nav-inner { padding-left: 22px; padding-right: 22px; }
  .hero { padding: 48px 0 80px; }
  .section { padding: 56px 0; }
  .bio, .prose { font-size: 17px; }
  .nav nav { gap: 16px; font-size: 13.5px; }
  .nav-name { font-size: 14px; }
  .nav-avatar { width: 22px; height: 22px; }

  .toolkit { grid-template-columns: 1fr; gap: 4px 0; }
  .toolkit dt { padding-top: 14px; }
  .toolkit > *:first-child { padding-top: 0; }
  .toolkit dd { padding-bottom: 4px; }

  .work-title { font-size: 20px; }
  .tab-list { gap: 22px; }
  .project-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-card .work-title { font-size: 20px; }
}
