:root {
  --bg: #09090b;
  --panel: #111319;
  --panel-hover: #161922;
  --text: #f5f3ef;
  --muted: #9fa1a8;
  --line: #22242c;
  --accent: #d56768;
  --accent-glow: rgba(213, 103, 104, 0.45);
  --accent2: #9b7bff;
  --cyan: #41e2d0;
  --green: #22c55e;
  --ease: cubic-bezier(.2,.7,.2,1);
  --font-sans: "Plus Jakarta Sans", "Aptos", Inter, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1280px, 92vw); margin: auto; }
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  background-image: radial-gradient(rgba(255,255,255,.07) .6px, transparent .7px);
  background-size: 5px 5px;
  opacity: .08;
}

/* TOP NAVBAR */
nav {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 0;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all .25s ease;
}
.navin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #251419, #3d1b24);
  border: 1px solid #d5676880;
  display: grid;
  place-items: center;
  color: #d56768;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(213,103,104,0.3);
}
.links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  color: #c2bdbc;
  font-weight: 500;
}
.links a { transition: .2s; }
.links a:hover { color: #fff; }
.nav-actions {
  display: flex;
  align-items: center;
}
.navbtn {
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition: .25s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.navbtn:hover {
  background: rgba(213, 103, 104, 0.2);
  border-color: #d56768;
  color: #fff;
}

/* HERO SECTION - CINEMATIC DARK CONCEPT 1 V6 */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 70px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,7,8,.96) 0%, rgba(9,8,9,.87) 36%, rgba(7,7,8,.28) 65%, rgba(5,5,6,.62) 100%),
    radial-gradient(circle at 78% 42%, rgba(164,48,51,.58), transparent 28%),
    radial-gradient(circle at 57% 68%, rgba(82,34,42,.38), transparent 30%),
    linear-gradient(135deg, #171317 0, #2c1b20 38%, #110f12 100%);
}
.hero-bg:before {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse at 75% 45%, rgba(235,145,130,.22), transparent 20%),
    radial-gradient(ellipse at 59% 80%, rgba(255,255,255,.09), transparent 14%),
    linear-gradient(115deg, transparent 55%, rgba(255,255,255,.045) 56%, transparent 57%);
  filter: blur(22px);
  transform: scale(1.07);
}
.hero-bg:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,9,11,.92), transparent 35%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 4vw;
  padding-top: 40px;
}
.hero-copy { max-width: 620px; }
.eyebrow {
  font-size: 11px;
  letter-spacing: .23em;
  color: #c88d8e;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 11px;
  color: #dedede;
  margin-bottom: 18px;
  max-width: 100%;
}
.status-pill span.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fe0d0;
  box-shadow: 0 0 10px #3fe0d0;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}

h1 {
  font-size: clamp(54px, 6.2vw, 100px);
  line-height: .95;
  letter-spacing: -.045em;
  margin: 0 0 22px;
  font-weight: 800;
}
h1 em {
  font-weight: 500;
  font-style: normal;
  color: #d7c7c3;
}
.hero-copy p {
  font-size: 17px;
  line-height: 1.65;
  color: #b5b0ae;
  max-width: 520px;
  margin-bottom: 30px;
}
.cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #edeae5;
  transition: all .2s ease;
}
.cta:hover { border-color: #d56768; color: #fff; }
.cta i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5f3ef;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: all .2s ease;
}
.cta:hover i {
  background: #d56768;
  border-color: #d56768;
  color: #fff;
  transform: translate(1px, -1px);
  box-shadow: 0 0 10px rgba(213, 103, 104, 0.45);
}

.cta-recruiter {
  padding: 10px 22px;
  background: linear-gradient(135deg, #d56768, #b8494a);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(213, 103, 104, 0.35);
  transition: .2s;
}
.cta-recruiter:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(213, 103, 104, 0.5);
}

/* HERO VISUAL FRAME */
.hero-visual {
  height: 560px;
  position: relative;
  perspective: 1000px;
}
.frame {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 86%;
  max-width: 440px;
  height: 86%;
  max-height: 500px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 26px;
  background: rgba(23,17,20,.48);
  backdrop-filter: blur(3px);
  overflow: hidden;
  box-shadow: 0 35px 100px rgba(0,0,0,.65);
  transition: transform .15s ease-out;
}
.frame:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(222,122,117,.2), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.00));
  pointer-events: none;
}

.portrait {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
}
.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.05) brightness(0.94);
  transition: .3s;
}
.portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(17,13,16,.75) 80%, rgba(9,9,11,.96) 100%);
}
.caption {
  position: absolute;
  left: 26px;
  bottom: 24px;
  right: 26px;
  z-index: 3;
}
.caption strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.2;
}
.caption span {
  display: block;
  font-size: 12px;
  color: #df7770;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* TICKER */
.ticker {
  overflow: hidden;
  border-top: 1px solid #1f2128;
  border-bottom: 1px solid #1f2128;
  background: #0d0e12;
  padding: 16px 0;
}
.track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: ticker 75s linear infinite;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.track span { font-size: 12px; letter-spacing: .15em; color: #999; font-family: var(--font-mono); }
.track span b { color: #d56768; font-weight: 700; }

/* SECTION SHARED STYLES */
.section { padding: 120px 0; border-top: 1px solid #1a1b22; }
.label {
  font-size: 11px;
  letter-spacing: .22em;
  color: #df7770;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-weight: 600;
}
h2 {
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0 0 20px;
  max-width: 920px;
  font-weight: 800;
}
.lead {
  max-width: 760px;
  color: #a8abb3;
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 34px;
}

/* ABOUT SECTION */
#about {
  padding: 160px 0 170px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: center;
}
.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mini {
  padding: 24px;
  border: 1px solid #2b2b34;
  background: #111319;
  border-radius: 18px;
  transition: .25s;
}
.mini:hover {
  border-color: rgba(213,103,104,0.7);
  transform: translateY(-3px);
}
.mini strong { display: block; font-size: 20px; margin-bottom: 4px; color: #fff; }
.mini span { font-size: 10px; color: #999; letter-spacing: .12em; font-family: var(--font-mono); }

/* PROJECTS FILTER BAR */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 32px 0 42px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: #9b98a2;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.filter-btn:hover { color: #fff; background: rgba(255,255,255,.12); }
.filter-btn.active {
  background: #d56768;
  color: #fff;
  border-color: #d56768;
  box-shadow: 0 0 16px rgba(213,103,104,.45);
}

/* PROJECTS GRID & PHOTOREALISTIC CARDS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.project {
  background: #111319;
  border: 1px solid #22242c;
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .3s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.project:hover {
  border-color: rgba(255,255,255,.28);
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,.65);
}

.proj-img-wrap {
  height: 210px;
  border-radius: 16px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  background: #0d0f14;
  border: 1px solid rgba(255,255,255,.08);
}
.proj-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.project:hover .proj-img-wrap img {
  transform: scale(1.06);
}


.project small {
  color: #df7770;
  font-size: 10px;
  letter-spacing: .15em;
  font-family: var(--font-mono);
  font-weight: 700;
  display: block;
}
.project h3 {
  font-size: 22px;
  margin: 8px 0;
  font-weight: 800;
  color: #fff;
}
.project p {
  color: #8f9199;
  line-height: 1.55;
  font-size: 14px;
  margin-bottom: 16px;
}
.project b {
  font-size: 11px;
  color: #c7c8cc;
  font-weight: 500;
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 16px;
}
.project-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #d56768;
}
.project-action i { transition: transform .2s; }
.project:hover .project-action i { transform: translateX(3px); }

/* SKILLS / CAPABILITIES SECTION */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.skill {
  padding: 32px;
  border: 1px solid #22242c;
  background: #111319;
  border-radius: 20px;
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.skill:hover {
  border-color: rgba(255,255,255,.2);
  transform: translateY(-3px);
}
.skill small {
  color: #df7770;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 700;
}
.skill h3 { font-size: 24px; margin: 10px 0 8px; font-weight: 800; }
.skill p { color: #8e9098; line-height: 1.6; font-size: 15px; }
.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #272a33;
  background: #111319;
  font-size: 12px;
  color: #c0c1c6;
  font-family: var(--font-mono);
}

/* EXPERIENCE SECTION */
.timeline { margin-top: 42px; }
.item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  padding: 34px 0;
  border-top: 1px solid #22242c;
}
.item .date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: #b06c6c;
  font-weight: 700;
}
.item h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #fff; }
.item .role-company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9b7bff;
  margin-bottom: 8px;
}
.item .role-company:last-child {
  margin-bottom: 0;
}
.item:not(:has(p)) {
  padding: 22px 0;
}
.item p { margin: 0; color: #8f9199; line-height: 1.65; font-size: 15px; }
.item p + p { margin-top: 10px; }

/* CONTACT SECTION */
.contact-box {
  padding: 56px 60px;
  background: linear-gradient(145deg, #181216, #101116);
  border: 1px solid #2a2529;
  border-radius: 28px;
}
.contact-box h2 {
  font-size: 38px;
  letter-spacing: -0.02em;
  margin: 12px 0 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.contact-box .lead {
  font-size: 16px;
  color: #9fa1a8;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 0 32px;
}
.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.contact-btn {
  padding: 11px 22px;
  background: #f3f0ec;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  transition: all .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.contact-btn:hover {
  background: #d56768;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(213, 103, 104, 0.35);
}
.contact-btn i {
  font-style: normal;
  transition: transform .2s ease;
}
.contact-btn:hover i {
  transform: translate(2px, -2px);
}
.copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #d8dae2;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.copy-pill:hover {
  background: rgba(255,255,255,.1);
  border-color: #d56768;
  color: #fff;
}
.copy-hint {
  font-size: 11px;
  color: #8b8e98;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 10px;
  transition: color .2s ease;
}
.copy-pill:hover .copy-hint {
  color: #d56768;
}
.contact-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #c0c2cc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}
.contact-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-2px);
}
.contact-secondary-btn i:last-child {
  font-style: normal;
  display: inline-block;
  transition: transform .2s ease;
}
.contact-secondary-btn:hover i:last-child {
  transform: translate(2px, -2px);
}

/* FOOTER */
footer {
  padding: 50px 0 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #7a777d;
}

/* FLOATING AI CHAT TRIGGER */
.ai-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 70;
  padding: 10px 18px;
  background: linear-gradient(135deg, #d56768, #ad3e4a);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(213, 103, 104, 0.45);
  transition: all .25s var(--ease);
}
.ai-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 14px 40px rgba(213, 103, 104, 0.65);
}
.ai-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #41e2d0;
  box-shadow: 0 0 10px #41e2d0;
  animation: pulse 1.6s infinite;
}

/* AI TWIN CHAT WINDOW */
.ai-chat-window {
  position: fixed;
  bottom: 84px;
  right: 28px;
  width: 380px;
  max-width: 90vw;
  height: 520px;
  max-height: 80vh;
  background: rgba(18, 19, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.8);
  z-index: 70;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all .25s var(--ease);
}
.ai-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.chat-head {
  padding: 16px 20px;
  background: rgba(26, 27, 36, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #d56768;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-title { font-size: 13px; font-weight: 800; }
.chat-sub { font-size: 10px; color: var(--cyan); font-family: var(--font-mono); }
.chat-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: #bbb;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.chat-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg p {
  margin: 0 0 8px 0;
}
.chat-msg p:last-child {
  margin-bottom: 0;
}
.chat-msg ul, .chat-msg ol {
  margin: 6px 0 8px 18px;
  padding: 0;
}
.chat-msg li {
  margin-bottom: 4px;
}
.chat-msg strong {
  color: #fff;
  font-weight: 700;
}
.chat-msg a {
  color: #e0565b;
  text-decoration: underline;
}
.chat-table-wrap {
  margin: 10px 0;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 15, 21, 0.6);
}
.chat-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  line-height: 1.45;
}
.chat-table-wrap th {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  white-space: nowrap;
}
.chat-table-wrap td {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dad7e2;
  vertical-align: top;
}
.msg-ai {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f3f1ed;
  align-self: flex-start;
  border-top-left-radius: 4px;
}
.msg-ai.thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 12px;
}
.chat-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.chat-typing-dots span {
  width: 6px;
  height: 6px;
  background: #d56768;
  border-radius: 50%;
  animation: typingPulse 1.4s infinite ease-in-out both;
}
.chat-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1.1); opacity: 1; }
}
.msg-error {
  background: rgba(224, 86, 91, 0.12);
  border: 1px solid rgba(224, 86, 91, 0.3);
  color: #ffb4b4;
  align-self: flex-start;
  border-top-left-radius: 4px;
}
.msg-user {
  background: linear-gradient(135deg, #d56768, #ad3e4a);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 4px;
}
.chat-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}
.chat-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #bbb;
  font-size: 11px;
  cursor: pointer;
  transition: .2s;
}
.chat-chip:hover {
  background: rgba(213, 103, 104, 0.2);
  border-color: #d56768;
  color: #fff;
}
.chat-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 8px;
  background: rgba(14, 15, 20, 0.7);
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 8px 14px;
  color: #fff;
  font-size: 12px;
  outline: none;
}
.chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.chat-send {
  padding: 8px 16px;
  background: #d56768;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* PROJECT ARCHITECTURE & VISION MODAL */
dialog.proj-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: 760px;
  width: 92vw;
  max-height: 88vh;
  background: #13141c;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 26px;
  box-shadow: 0 30px 100px rgba(0,0,0,.9);
  color: #f5f3ef;
  padding: 0;
  outline: none;
  overflow: hidden;
}
dialog::backdrop {
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(8px);
}
.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid #232530;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #181924;
}
.modal-header h3 { margin: 4px 0 0; font-size: 26px; font-weight: 800; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.modal-tabs {
  display: flex;
  border-bottom: 1px solid #232530;
  background: #14151f;
  padding: 0 32px;
}
.modal-tab {
  padding: 12px 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #8b8e98;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.modal-tab.active {
  color: #d56768;
  border-color: #d56768;
}
.modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  max-height: calc(88vh - 140px);
}
.modal-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #c7c9d3;
  margin: 0 0 20px 0;
}
.modal-section-title {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #df7770;
  margin: 0 0 10px 0;
  text-transform: uppercase;
}
.modal-flow-box {
  background: #0e0f14;
  border: 1px solid #232530;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.flow-step {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: #f1f2f6;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 5px 11px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  white-space: normal;
}
.flow-arrow {
  color: #d56768;
  font-weight: 700;
  font-size: 13px;
  user-select: none;
}
.modal-spec-box {
  background: #0e0f14;
  border: 1px solid #232530;
  border-radius: 14px;
  padding: 18px 20px 18px 36px;
  margin-bottom: 22px;
}
.modal-spec-list {
  margin: 0;
  padding: 0;
  list-style-type: disc;
}
.modal-spec-list li {
  font-size: 13px;
  line-height: 1.7;
  color: #dad7e2;
  margin-bottom: 8px;
}
.modal-spec-list li:last-child {
  margin-bottom: 0;
}
.modal-tags-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modal-tag-pill {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d56768;
}
/* PHOTOS & VIDEOS MODAL TAB & GALLERY */
.modal-media-wrap {
  width: 100%;
  padding: 8px 0;
}
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 28px;
  background: #0d0f15;
  border: 1px dashed #282a36;
  border-radius: 16px;
  transition: border-color 0.2s ease;
}
.media-placeholder:hover {
  border-color: #3b3f52;
}
.media-placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #141620;
  border: 1px solid #232534;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b7f92;
  margin-bottom: 18px;
}
.media-placeholder-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: #e5e5eb;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.media-placeholder-desc {
  font-size: 13px;
  color: #7a7e8e;
  max-width: 440px;
  line-height: 1.55;
  margin: 0;
}
.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.media-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: #0c0e14;
  border: 1px solid #232532;
  position: relative;
  aspect-ratio: 16 / 10;
}
.media-gallery-item img,
.media-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* YOLO PLAYGROUND CANVAS */
.yolo-demo {
  background: #090a0f;
  border: 1px solid #2b2e3b;
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
}
.yolo-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yolo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
  color: #a0a4b0;
  font-family: var(--font-mono);
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: .75s var(--ease); }
.reveal.show { opacity: 1; transform: none; }

/* TOAST */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  padding: 12px 20px;
  border-radius: 12px;
  background: #1c1d27;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(80px);
  opacity: 0;
  transition: .3s cubic-bezier(.16,1,.3,1);
}
#toast.show { transform: none; opacity: 1; }

/* RESPONSIVE */
@media(max-width: 980px) {
  .links { display: none; }
  .hero { padding-top: 100px; min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual {
    height: auto;
    margin-top: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: none;
  }
  .frame {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 4 / 4.7;
    height: auto;
    max-height: none;
    margin: 0 auto;
  }
  .section { padding: 85px 0; }
  #about { padding: 105px 0 115px; }
  .about-grid, .project-grid, .skills { grid-template-columns: 1fr; }

  /* Experience intermediate tablet layout */
  .item {
    grid-template-columns: 180px 1fr;
    gap: 28px;
    padding: 30px 0;
  }
  .item h3 {
    font-size: 20px;
  }
  .item p {
    font-size: 14.5px;
    line-height: 1.6;
  }

  .contact-box { padding: 40px 24px; }
  .contact-box h2 { font-size: 28px; }
  .contact-box .lead { font-size: 15px; margin-bottom: 24px; }
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 40px 0 90px;
  }
}

@media(max-width: 680px) {
  .hero {
    padding-top: 85px;
    padding-bottom: 50px;
  }
  .hero-visual {
    height: auto;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .frame {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 290px;
    aspect-ratio: 4 / 4.8;
    height: auto;
    margin: 0 auto;
    border-radius: 22px;
  }
  .caption {
    left: 20px;
    bottom: 20px;
    right: 20px;
  }
  .caption strong {
    font-size: 18px;
  }
  .caption span {
    font-size: 11px;
  }

  /* Experience & Education stacked mobile layout */
  .timeline {
    margin-top: 28px;
  }
  .item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 0;
  }
  .item:not(:has(p)) {
    padding: 18px 0;
  }
  .item .date {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .12em;
    color: #df7770;
    font-weight: 700;
    margin-bottom: 2px;
  }
  .item > div:last-child {
    width: 100%;
  }
  .item h3 {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 6px;
    color: #fff;
  }
  .item .role-company {
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.45;
    color: #9b7bff;
    margin-bottom: 10px;
    word-break: break-word;
  }
  .item .role-company:last-child {
    margin-bottom: 0;
  }
  .item p {
    font-size: 14px;
    line-height: 1.65;
    color: #9fa1a8;
    max-width: 100%;
  }
  .item p + p {
    margin-top: 10px;
  }

  /* Floating AI trigger and section clearance on mobile */
  .ai-trigger {
    bottom: 18px;
    right: 18px;
    padding: 8px 14px;
    font-size: 12px;
    gap: 8px;
  }
  #experience {
    padding-bottom: 95px;
  }

  dialog.proj-modal {
    width: 95vw;
    max-height: 90vh;
    border-radius: 20px;
  }
  .modal-header {
    padding: 18px 20px;
  }
  .modal-header h3 {
    font-size: 20px;
  }
  .modal-tabs {
    padding: 0 16px;
    overflow-x: auto;
  }
  .modal-tab {
    padding: 10px 14px;
    font-size: 11px;
    white-space: nowrap;
  }
  .modal-body {
    padding: 20px 18px;
    max-height: calc(90vh - 125px);
  }
  .modal-desc {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .modal-flow-box {
    padding: 12px 14px;
    gap: 6px 8px;
    margin-bottom: 18px;
  }
  .flow-step {
    font-size: 11px;
    padding: 4px 8px;
  }
  .modal-spec-box {
    padding: 14px 16px 14px 28px;
    margin-bottom: 18px;
  }
  .modal-spec-list li {
    font-size: 12.5px;
    margin-bottom: 6px;
  }
}