:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --ink: #f5f5f7;
  --ink-soft: #98989d;
  --accent: #0a84ff;
  --radius: 28px;
  --shadow: 0 10px 30px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4);
  --shadow-hover: 0 20px 50px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.5);
  --grad-sql: linear-gradient(135deg,#0a2540 0%,#1e4d8c 100%);
  --grad-python: linear-gradient(135deg,#3d2e0a 0%,#806014 100%);
  --grad-pbi: linear-gradient(135deg,#3d1f0f 0%,#8a3d1a 100%);
  --grad-contact: linear-gradient(135deg,#3d0f2a 0%,#7a1e54 100%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}

/* BENTO */
.bento { max-width: 1240px; margin: 0 auto; padding: 56px 24px 80px; display: grid; grid-template-columns: repeat(6,1fr); gap: 20px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s; display: flex; flex-direction: column; opacity: 0; transform: translateY(18px); }
.tile.visible { opacity: 1; transform: translateY(0); }
.tile-project { cursor: default; grid-column: span 2; height: 100%; }
.tile-project:hover,.tile-project:focus-visible { transform: none; box-shadow: var(--shadow); outline: none; }
.tile-project h2 { font-size: clamp(22px,2.2vw,30px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 8px 0 0; color: #fff; }
.tile-head { margin-bottom: 22px; }
.tile-tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.7); }
.tile-body { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.summary-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.summary-block p { margin: 0; font-size: 15px; color: rgba(255,255,255,0.92); line-height: 1.5; text-align: justify; text-justify: inter-word; }
.tile-project code { background: rgba(255,255,255,0.15); color: #fff; padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.tile-open-btn { margin-top: 12px; align-self: flex-start; border: 1px solid rgba(255,255,255,0.48); background: rgba(255,255,255,0.18); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.28); transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tile-open-btn:hover,.tile-open-btn:focus-visible { background: rgba(255,255,255,0.28); border-color: rgba(255,255,255,0.72); box-shadow: 0 6px 18px rgba(0,0,0,0.36); outline: none; }
.tile-open-btn span { display: inline-block; margin-left: 4px; }
.tile-sql { background: var(--grad-sql); }
.tile-python { background: var(--grad-python); }
.tile-powerbi { background: var(--grad-pbi); }

/* ABOUT */
.tile-about { padding: 22px 26px; justify-content: center; grid-column: span 3; }
.toolkit-row { display: flex; align-items: center; justify-content: space-evenly; width: 100%; gap: 10px; }
.tile-about h2 { font-size: 19px; margin: 0; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); white-space: nowrap; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li { background: rgba(255,255,255,0.08); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--ink); font-weight: 500; transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, box-shadow .25s; box-shadow: 0 2px 8px rgba(0,0,0,0.22); }
.chips li:hover { transform: translateY(-2px) scale(1.06); background: rgba(255,255,255,0.16); box-shadow: 0 6px 18px rgba(0,0,0,0.32); }

/* CONTACT */
.tile-contact { background: var(--grad-contact); padding: 22px 26px; justify-content: center; grid-column: span 3; }
.tile-contact h2 { font-size: 19px; margin: 0; letter-spacing: -0.02em; font-weight: 700; white-space: nowrap; color: #fff; }
.contact-row { display: flex; align-items: center; justify-content: space-evenly; }
.social-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: transform .25s cubic-bezier(.2,.7,.2,1),background .25s,box-shadow .25s; box-shadow: 0 2px 8px rgba(0,0,0,0.3); flex-shrink: 0; }
.social-btn:hover { transform: translateY(-2px) scale(1.06); background: rgba(255,255,255,0.28); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.social-btn svg { width: 18px; height: 18px; }

/* MODAL — full viewport transparent shell, hidden until [open] */
.modal {
  border: none; padding: 0; margin: 0; background: transparent;
  width: 100vw; max-width: 100vw;
  height: 100vh; max-height: 100vh;
  overflow: hidden;
  color: var(--ink);
}
.modal[open] {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.modal::backdrop { background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal[open] .modal-card { animation: cardIn .35s cubic-bezier(.2,.7,.2,1); }
@keyframes cardIn { from { opacity:0; transform: translateY(20px) scale(.98); } to { opacity:1; transform:none; } }

/* MODAL WRAP — row: arrow + card + arrow */
.modal-wrap { display: flex; align-items: center; gap: 16px; width: min(1060px, calc(100vw - 24px)); }

/* MODAL CARD */
.modal-card {
  flex: 1; max-width: 860px;
  background: #1c1c1e; border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 82vh;
  position: relative;
}
.modal-inner { padding: 48px 52px 40px; overflow-y: auto; flex: 1; overscroll-behavior: contain; color: var(--ink); }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,0.1); cursor: pointer; font-size: 16px; color: var(--ink); display: flex; align-items: center; justify-content: center; transition: background .2s; z-index: 2; }
.modal-close:hover { background: rgba(255,255,255,0.2); }

/* NAV ARROWS */
.mnav-arrow { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.15); border: none; cursor: pointer; font-size: 28px; font-weight: 300; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,0.4); color: #fff; transition: transform .2s,background .2s; flex-shrink: 0; line-height: 1; }
.mnav-arrow:hover { background: rgba(255,255,255,0.28); transform: scale(1.06); }
.mnav-arrow:disabled { opacity: .2; cursor: default; pointer-events: none; }

/* DOTS */
.mnav-dots { display: flex; gap: 8px; align-items: center; }
.mnav-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.3); border: none; cursor: pointer; padding: 0; transition: width .3s ease,background .3s ease,border-radius .3s ease; }
.mnav-dot.active { width: 24px; background: rgba(255,255,255,0.9); }

/* MODAL CONTENT */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.lede { font-size: 17px; color: var(--ink-soft); margin: 8px 0 0; }
.modal-inner h2 { font-size: 30px; margin: 8px 0 12px; letter-spacing: -0.02em; color: var(--ink); }
.modal-inner h3 { margin-top: 28px; font-size: 18px; letter-spacing: -0.01em; font-weight: 700; color: var(--ink); }
.modal-inner h4 { margin-top: 18px; font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-inner p { margin: 8px 0; color: rgba(245,245,247,0.85); }
.modal-inner strong { color: var(--ink); }
.modal-inner ul,.modal-inner ol { padding-left: 22px; color: rgba(245,245,247,0.85); }
.modal-inner li { margin: 5px 0; }
.modal-inner p, .modal-inner li { text-align: justify; text-justify: inter-word; }
.modal-inner code { background: rgba(255,255,255,0.1); color: #f5f5f7; padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.modal-inner pre { background: #0d1117; color: #e6edf3; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 10px 0; border: 1px solid rgba(255,255,255,0.08); }
.modal-inner pre code { background: transparent; color: inherit; padding: 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.gallery.one-col { grid-template-columns: 1fr; }
.gallery img { width: 100%; border-radius: 12px; display: block; }
table.data { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; color: rgba(245,245,247,0.9); }
table.data th,table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); vertical-align: top; }
table.data th { font-weight: 600; background: rgba(255,255,255,0.05); color: var(--ink); }
.btn { display: inline-block; background: #fff; color: #0a0a0a; text-decoration: none; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: transform .2s,opacity .2s; }
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn-ghost-dark { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,0.25); }
.modal-actions { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 4px; }

@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .tile-project, .tile-about, .tile-contact { grid-column: auto; }
  .tile-project { min-height: 340px; }
  .modal-wrap { gap: 8px; width: calc(100vw - 16px); }
  .mnav-arrow { width: 36px; height: 36px; font-size: 22px; }
  .modal-inner { padding: 32px 22px 28px; }
  .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tile { padding: 22px; }
  .tile-project h2 { font-size: 22px; }
  .toolkit-row { flex-wrap: wrap; justify-content: center; }
  .contact-row { gap: 0; }
}
