/* ═══════════════════════════════════════
   RESET & VARIABLES — Toukoum-style
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f0f0f3;
  --paper:      rgba(255,255,255,.55);
  --paper-solid:#FFFFFF;
  --surface:    rgba(255,255,255,.35);
  --glass:      rgba(255,255,255,.45);
  --glass-heavy:rgba(255,255,255,.65);
  --border:     rgba(255,255,255,.5);
  --border2:    rgba(0,0,0,.06);
  --shadow:     rgba(0,0,0,.04);
  --ink:        #111827;
  --ink2:       #374151;
  --ink3:       #6B7280;
  --ink4:       #9CA3AF;
  --blue:       #3B82F6;
  --blue-light: #60A5FA;
  --green:      #10B981;
  --green-bg:   rgba(16,185,129,.1);
  --red:        #EF4444;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:     16px;
  --radius-sm:  12px;
  --radius-xs:  8px;
  --blur:       16px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════
   ANIMATED IRIDESCENT BACKGROUND
═══════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(236,133,191,.35) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 75% 30%, rgba(147,130,233,.3) 0%, transparent 55%),
    radial-gradient(ellipse 60% 55% at 60% 70%, rgba(110,206,245,.3) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 30% 80%, rgba(165,236,162,.25) 0%, transparent 50%),
    radial-gradient(ellipse 65% 45% at 85% 65%, rgba(255,183,130,.25) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 45% 20%, rgba(255,150,200,.2) 0%, transparent 50%);
  animation: fluidShift 14s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 55% 55%, rgba(200,160,255,.25) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 25% 65%, rgba(130,220,255,.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 45% at 80% 25%, rgba(255,200,150,.2) 0%, transparent 50%);
  animation: fluidShift2 18s ease-in-out infinite alternate;
}

@keyframes fluidShift {
  0%   { transform: scale(1) translate(0, 0) rotate(0deg); }
  25%  { transform: scale(1.05) translate(-2%, 3%) rotate(1deg); }
  50%  { transform: scale(1.1) translate(3%, -2%) rotate(-1deg); }
  75%  { transform: scale(1.03) translate(-1%, -3%) rotate(0.5deg); }
  100% { transform: scale(1.08) translate(2%, 2%) rotate(-0.5deg); }
}

@keyframes fluidShift2 {
  0%   { transform: scale(1.1) translate(2%, -1%) rotate(0.5deg); opacity: .8; }
  50%  { transform: scale(1) translate(-3%, 2%) rotate(-1deg); opacity: 1; }
  100% { transform: scale(1.05) translate(1%, -2%) rotate(0.5deg); opacity: .9; }
}

/* ═══════════════════════════════════════
   SCREENS
═══════════════════════════════════════ */
#screen-welcome, #screen-chat {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
}
#screen-chat {
  opacity: 0; pointer-events: none;
  transform: translateY(16px) scale(.98);
  transition: opacity .5s ease, transform .5s ease;
}
#screen-chat.active {
  opacity: 1; pointer-events: all;
  transform: translateY(0) scale(1);
}
#screen-welcome {
  transition: opacity .4s ease, transform .4s ease;
}
#screen-welcome.hidden {
  opacity: 0; pointer-events: none;
  transform: translateY(-16px) scale(.98);
}

/* ═══════════════════════════════════════
   WELCOME SCREEN — Centered Layout
═══════════════════════════════════════ */
#welcome-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  display: flex; align-items: center; justify-content: center;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#welcome-scroll::-webkit-scrollbar { display: none; }

#welcome-inner {
  max-width: 740px; width: 100%;
  margin: 0 auto;
  padding: 40px 32px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}

/* ── Top bar ── */
#w-topbar {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
  animation: scaleIn .5s ease both;
  width: 100%;
}

.w-logo {
  width: 44px; height: 44px;
  background: var(--glass-heavy);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  padding: 6px;
  flex-shrink: 0;
}

.w-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.w-status {
  display: none;
}

/* ── Hero: Centered ── */
#w-hero {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

#w-hero-text {
  display: flex; flex-direction: column;
  align-items: center;
  width: 100%;
}

#w-greeting {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 6px;
  animation: fadeUp .5s .1s ease both;
}

#w-name {
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 0;
  animation: fadeUp .5s .15s ease both;
}

#w-name-sub {
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 16px;
  animation: fadeUp .5s .2s ease both;
}

/* Roles — hidden in this design, info moved to chat */
#w-roles { display: none; }
#w-location { display: none; }

#w-desc {
  font-size: 14px;
  color: var(--ink3);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 0;
  animation: fadeUp .5s .25s ease both;
  display: none;
}

/* ── Hero Image ── */
#w-hero-img {
  flex-shrink: 0;
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
  animation: floatIn .7s .2s ease both;
  position: relative;
  margin-bottom: 28px;
}

#akib-cartoon {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.08));
  transition: transform .5s ease;
}

#akib-cartoon:hover {
  transform: translateY(-6px) scale(1.04);
}

/* ── Divider – hidden ── */
.w-divider { display: none; }

/* ── Section label – hidden ── */
#w-section-label { display: none; }

/* ═══════════════════════════════════════
   WELCOME INPUT — Glassmorphism search bar
═══════════════════════════════════════ */
#w-input-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 480px;
  background: var(--glass-heavy);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 4px 20px var(--shadow);
  animation: fadeUp .5s .35s ease both;
  margin-bottom: 24px;
}

#w-input {
  flex: 1;
  font-family: var(--font);
  font-size: 15px;
  background: transparent;
  border: none;
  padding: 8px 4px;
  color: var(--ink);
  outline: none;
}
#w-input::placeholder {
  color: var(--ink4);
}

#w-send {
  width: 40px; height: 40px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
  font-size: 0;
  padding: 0;
}
#w-send:hover {
  background: var(--blue-light);
  transform: scale(1.05);
}
#w-send:active { transform: scale(.95); }

#w-send svg {
  width: 16px; height: 16px;
}

/* ═══════════════════════════════════════
   NAVIGATION CHIPS — Glassmorphism cards
═══════════════════════════════════════ */
#w-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 0;
  animation: fadeUp .5s .4s ease both;
}

.w-chip {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 16px 24px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: all .25s ease;
  min-width: 100px;
}

.w-chip:hover {
  background: var(--glass-heavy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  color: var(--ink);
}

.w-chip-icon {
  width: 24px; height: 24px;
  object-fit: contain;
  line-height: 1;
}

.w-chip-num {
  display: none;
}

/* ── Footer — hidden ── */
#w-footer { display: none; }

/* ═══════════════════════════════════════
   CHAT SCREEN — Glassmorphism theme
═══════════════════════════════════════ */
#chat-wrap {
  max-width: 780px; width: 100%;
  margin: 0 auto;
  display: flex; flex-direction: column;
  height: 100%; padding: 0 24px;
}

/* ── Header ── */
#chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
#chat-hl {
  display: flex; align-items: center; gap: 12px;
}

#back-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  transition: all .2s;
}
#back-btn:hover {
  background: var(--glass-heavy);
  color: var(--ink);
}

#chat-title {
  font-size: 14px; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em;
}
#chat-sub {
  font-size: 11px; color: var(--ink3);
  margin-top: 1px;
}

#model-badge {
  font-size: 10px; letter-spacing: .03em;
  color: var(--ink4);
  padding: 4px 10px;
  background: var(--glass);
  border: 1px solid var(--border2);
  border-radius: 100px;
  max-width: 160px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ── Messages ── */
#messages {
  flex: 1; overflow-y: auto;
  padding: 8px 0;
  scroll-behavior: smooth;
}
#messages::-webkit-scrollbar { width: 4px; }
#messages::-webkit-scrollbar-track { background: transparent; }
#messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 4px; }

.msg-row {
  display: flex; gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
  animation: fadeUp .25s ease both;
}

.msg-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
}
.avatar-user {
  background: var(--glass-heavy);
  border: 1px solid var(--border2);
  color: var(--ink2);
}
.avatar-ai {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.msg-body { flex: 1; min-width: 0; }
.msg-sender {
  font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink4);
  margin-bottom: 5px; font-weight: 500;
}
.msg-text {
  font-size: 14px; line-height: 1.7;
  color: var(--ink2);
  white-space: pre-wrap; word-break: break-word;
}

/* Rich text */
.msg-bold { font-weight: 600; color: var(--ink); }
.msg-italic { font-style: italic; color: var(--ink3); }

.msg-list {
  margin: 8px 0; padding-left: 18px;
  list-style: none;
}
.msg-list-item {
  position: relative; margin-bottom: 4px;
  padding-left: 14px;
}
.msg-list-item::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--blue); font-weight: bold;
}

.msg-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: rgba(0,0,0,.04);
  color: var(--ink);
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,.06);
}

/* Enhanced AI message */
.msg-row:has(.avatar-ai) .msg-body {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: -4px -8px;
  border: 1px solid rgba(255,255,255,.4);
}

.msg-row:has(.avatar-ai) .msg-text {
  animation: fadeInText 0.5s ease-out;
}

@keyframes fadeInText {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cursor {
  display: inline-block; width: 2px; height: 14px;
  background: var(--blue); margin-left: 2px;
  vertical-align: middle;
  animation: blink .8s step-end infinite;
}

.retry-notice {
  font-size: 11px; color: var(--ink3);
  font-style: italic; margin-bottom: 4px;
}

.msg-typing {
  font-size: 12px; color: var(--ink3);
  font-style: italic; margin-bottom: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════
   TOOL RENDERS — Glassmorphism Cards
═══════════════════════════════════════ */
.tool-render { margin-top: 14px; }

/* ── TABS ── */
.rt-tabs {
  display: flex; gap: 4px;
  margin-bottom: 12px;
}
.rt-tab {
  flex: 1; padding: 8px 10px;
  font-family: var(--font); font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .2s;
}
.rt-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.rt-tab:not(.active):hover {
  background: var(--glass-heavy);
  color: var(--ink2);
}
.rt-panel { display: none; }
.rt-panel.active { display: block; }

/* ── PROJECT CARDS ── */
.rt-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.rt-proj-card {
  border-radius: var(--radius-sm);
  padding: 18px 16px 14px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
  min-height: 170px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(255,255,255,.07);
}
.rt-proj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.rt-proj-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--pa, #4A9EFF);
  opacity: .7;
  border-radius: 2px 2px 0 0;
}
.rt-proj-tag {
  font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--pl, #8BB8FF); margin-bottom: 7px;
}
.rt-proj-title {
  font-size: 16px; font-weight: 700;
  color: #F0EDE8; line-height: 1.2; margin-bottom: 8px;
}
.rt-proj-desc {
  font-size: 12px; color: rgba(240,237,232,.55);
  line-height: 1.6; flex: 1; margin-bottom: 10px;
}
.rt-proj-metric {
  font-size: 11px;
  color: var(--pa, #4A9EFF);
  padding: 5px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.rt-proj-techs { display: flex; flex-wrap: wrap; gap: 5px; }
.rt-tech {
  font-size: 10px; padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  color: rgba(240,237,232,.5);
}

/* ── RESEARCH CARDS ── */
.rt-research-card {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 8px;
  position: relative; overflow: hidden;
  transition: all .2s;
}
.rt-research-card:hover {
  background: var(--glass-heavy);
  transform: translateY(-1px);
}
.rt-research-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ra, #CF6EBE);
  border-radius: 3px 0 0 3px;
}
.rt-research-num {
  font-size: 11px;
  color: var(--ink4); margin-bottom: 5px;
}
.rt-research-tag {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink3); margin-bottom: 6px;
}
.rt-research-title {
  font-size: 14px; font-weight: 600;
  color: var(--ink); margin-bottom: 6px; line-height: 1.35;
}
.rt-research-desc {
  font-size: 12px; color: var(--ink2); line-height: 1.65;
}

/* ── SKILLS ── */
.rt-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.rt-skill-card {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .2s;
}
.rt-skill-card:hover {
  background: var(--glass-heavy);
  transform: translateY(-1px);
}
.rt-skill-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.rt-skill-icon {
  font-size: 14px; color: var(--ink2); line-height: 1;
}
.rt-skill-group {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.rt-skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rt-skill-tag {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 100px;
  border: none;
}
.rt-skill-tag.primary {
  background: var(--blue);
  color: #fff;
  font-weight: 500;
}

/* ── EDUCATION ── */
.rt-edu-wrap { display: flex; flex-direction: column; gap: 10px; }
.rt-edu-card {
  display: flex; align-items: flex-start; gap: 16px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rt-edu-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.rt-edu-body { flex: 1; }
.rt-edu-degree {
  font-size: 15px; font-weight: 700;
  color: var(--ink); margin-bottom: 5px; line-height: 1.3;
}
.rt-edu-inst { font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.rt-edu-year {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 100px;
}

/* ── EXPERIENCE ── */
.rt-exp-wrap { display: flex; flex-direction: column; gap: 10px; }
.rt-exp-banner {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink3);
  padding: 10px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rt-exp-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink4); flex-shrink: 0;
}
.rt-exp-card {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative; overflow: hidden;
}
.rt-exp-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue);
  border-radius: 3px 0 0 3px;
}
.rt-exp-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px; margin-bottom: 6px;
}
.rt-exp-role {
  font-size: 14px; font-weight: 700;
  color: var(--ink); line-height: 1.3;
}
.rt-exp-type {
  font-size: 10px;
  padding: 3px 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 100px;
  white-space: nowrap; flex-shrink: 0;
}
.rt-exp-company {
  font-size: 13px; color: var(--blue); margin-bottom: 4px; font-weight: 500;
}
.rt-exp-duration {
  font-size: 11px; color: var(--ink3); margin-bottom: 10px;
}
.rt-exp-desc {
  font-size: 13px; color: var(--ink2); line-height: 1.7;
}

/* ── CONTACT ── */
.rt-contact-box {
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rt-contact-header {
  padding: 16px 20px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rt-contact-title {
  font-size: 15px; font-weight: 700;
}
.rt-contact-links { display: flex; gap: 12px; flex-wrap: wrap; }
.rt-clink {
  font-size: 11px;
  color: rgba(255,255,255,.6); text-decoration: none;
  transition: color .15s;
}
.rt-clink:hover { color: #fff; }
.rt-contact-box .contact-form { padding: 0 20px 20px; }

/* Preserve old edu classes */
.edu-card {
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 16px 18px; background: var(--glass);
}
.edu-degree { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.edu-inst { font-size: 13px; color: var(--ink2); margin-bottom: 4px; }
.edu-year { font-size: 12px; color: var(--ink3); }

/* ── Contact form ── */
.contact-form label {
  display: block; font-size: 10px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink3); margin-bottom: 5px; font-weight: 500;
  margin-top: 12px;
}
.contact-form label:first-child { margin-top: 0; }
.contact-form input,
.contact-form textarea {
  width: 100%; font-family: var(--font); font-size: 14px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs); padding: 10px 14px;
  color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 0; resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.contact-form textarea { min-height: 80px; }

.contact-submit {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 10px 22px;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-xs);
  cursor: pointer; transition: all .2s;
  margin-top: 12px;
}
.contact-submit:hover { background: var(--blue-light); transform: translateY(-1px); }
.form-sent { font-size: 12px; color: var(--green); margin-top: 8px; }

/* ═══════════════════════════════════════
   SUGGESTIONS
═══════════════════════════════════════ */
#sug-wrap {
  flex-shrink: 0;
  border-top: 1px solid var(--border2);
  transition: max-height .3s ease, opacity .3s ease;
  max-height: 52px;
  position: relative;
}
#sug-wrap.collapsed {
  max-height: 0; opacity: 0;
  border-top-color: transparent;
  overflow: hidden;
}
#sug-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 52px; height: 100%;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none; z-index: 1;
}
#sug-inner {
  padding: 9px 0;
  display: flex; gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
#sug-inner::-webkit-scrollbar { display: none; }
#sug-inner::after {
  content: '';
  flex-shrink: 0; width: 36px;
}

.sug-chip {
  font-size: 12px; font-family: var(--font);
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border2);
  border-radius: 100px;
  color: var(--ink2);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .2s;
}
.sug-chip:hover {
  background: var(--glass-heavy);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   INPUT BAR
═══════════════════════════════════════ */
#input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 0 18px;
  border-top: 1px solid var(--border2);
  flex-shrink: 0;
}
#sug-toggle {
  width: 34px; height: 38px; flex-shrink: 0;
  background: var(--glass);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  color: var(--ink3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
#sug-toggle:hover { background: var(--glass-heavy); color: var(--ink2); }
#sug-toggle.on { background: var(--glass-heavy); color: var(--ink2); }

#prompt-input {
  flex: 1; font-family: var(--font); font-size: 14px;
  background: var(--glass-heavy);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 10px 16px;
  color: var(--ink); outline: none; resize: none;
  min-height: 38px; max-height: 130px;
  line-height: 1.6;
  transition: border-color .2s, box-shadow .2s;
  overflow-y: auto;
}
#prompt-input::placeholder { color: var(--ink4); }
#prompt-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

#send-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--blue);
  border: none; border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
#send-btn:hover { background: var(--blue-light); transform: translateY(-1px); }
#send-btn:active { transform: scale(.94); }
#send-btn:disabled { opacity: .3; cursor: default; transform: none; }

#send-btn svg path {
  stroke: #fff;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET (max 900px)
═══════════════════════════════════════ */
@media (max-width: 900px) {
  #welcome-inner { padding: 32px 24px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (max 600px)
═══════════════════════════════════════ */
@media (max-width: 600px) {
  #welcome-inner { padding: 24px 16px; }
  #w-topbar { margin-bottom: 20px; }

  #w-greeting { font-size: 16px; }
  #w-name, #w-name-sub { font-size: clamp(32px, 10vw, 52px); }

  #w-hero-img { width: 150px; height: 150px; margin-bottom: 20px; }
  #akib-cartoon { max-width: 150px; }

  #w-input-row { max-width: 100%; }

  #w-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .w-chip {
    padding: 12px 8px;
    font-size: 11px;
    min-width: unset;
  }

  /* Chat */
  #chat-wrap { padding: 0 14px; }
  #chat-header { padding: 12px 0 10px; }
  #chat-title { font-size: 13px; }
  #chat-sub { font-size: 10px; }
  #model-badge { font-size: 9px; max-width: 100px; }
  #back-btn { width: 30px; height: 30px; font-size: 14px; }

  .msg-row { padding: 12px 0; gap: 10px; }
  .msg-avatar { width: 28px; height: 28px; font-size: 9px; }
  .msg-text { font-size: 13px; line-height: 1.65; }
  .msg-sender { font-size: 9px; }

  .msg-row:has(.avatar-ai) .msg-body {
    padding: 10px 12px;
  }

  .rt-proj-grid { grid-template-columns: 1fr; }
  .rt-skills-grid { grid-template-columns: 1fr; }
  .rt-tabs { gap: 3px; }
  .rt-tab { font-size: 11px; padding: 7px 8px; }
  .rt-contact-header { flex-direction: column; gap: 8px; }

  #sug-wrap { max-height: 48px; }
  #sug-inner { padding: 8px 0; gap: 6px; }
  .sug-chip { font-size: 11px; padding: 5px 11px; }

  #input-bar { padding: 8px 0 14px; gap: 6px; }
  #prompt-input { font-size: 13px; padding: 9px 12px; min-height: 36px; }
  #send-btn { width: 36px; height: 36px; }
  #sug-toggle { width: 36px; height: 36px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (max 380px)
═══════════════════════════════════════ */
@media (max-width: 380px) {
  #w-name, #w-name-sub { font-size: clamp(28px, 11vw, 42px); }
  #welcome-inner { padding: 18px 12px; }

  #w-hero-img { width: 120px; height: 120px; }
  #akib-cartoon { max-width: 120px; }

  #w-chips {
    grid-template-columns: repeat(2, 1fr);
  }
  .w-chip { padding: 10px 6px; font-size: 10px; }
}

/* ═══════════════════════════════════════
   LIMIT POPUP
═══════════════════════════════════════ */
#limit-popup {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  padding: 20px;
}
#limit-popup.show {
  opacity: 1; pointer-events: all;
}
#limit-popup-box {
  background: var(--paper-solid);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  max-width: 420px; width: 100%;
  position: relative;
  transform: translateY(10px) scale(.97);
  transition: transform .3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,.1);
}
#limit-popup.show #limit-popup-box {
  transform: translateY(0) scale(1);
}
#limit-popup-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 16px; color: var(--ink3);
  cursor: pointer; line-height: 1;
  transition: color .15s;
}
#limit-popup-close:hover { color: var(--ink); }
#limit-popup-icon {
  font-size: 28px; color: var(--blue);
  margin-bottom: 12px; line-height: 1;
}
#limit-popup-title {
  font-size: 20px; font-weight: 700;
  color: var(--ink); margin-bottom: 8px;
  letter-spacing: -.02em;
}
#limit-popup-msg {
  font-size: 13px; color: var(--ink2);
  line-height: 1.7; margin-bottom: 20px;
}
#limit-contact-slot .contact-form input,
#limit-contact-slot .contact-form textarea {
  background: rgba(0,0,0,.03);
}
/* ── WELCOME FOOTER BAR ── */
#w-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border2);
  margin-top: 16px;
  animation: fadeUp .5s .45s ease both;
  width: 100%;
}

.w-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink3);
  text-decoration: none;
  transition: color .15s;
}

.w-footer-item:hover { color: var(--ink); }

#screen-welcome.hidden #w-footer-bar { display: none; }

@media (max-width: 600px) {
  #w-footer-bar { gap: 8px 14px; padding: 12px 0 4px; }
  .w-footer-item { font-size: 10px; }
}

/* ── WELCOME FOOTER BAR — FIXED BOTTOM ── */
#w-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 6px;
  padding: 12px 24px;
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.6);
  animation: fadeUp .5s .5s ease both;
}

.w-footer-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(55,65,81,.6);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 100px;
  transition: all .2s;
  letter-spacing: .01em;
}

.w-footer-item:hover {
  color: var(--ink);
  background: rgba(255,255,255,.7);
}

.w-footer-item svg {
  opacity: .7;
  flex-shrink: 0;
}

/* separator dots between items */
.w-footer-item + .w-footer-item::before {
  content: '·';
  margin-right: 6px;
  color: rgba(55,65,81,.3);
  font-size: 14px;
}

/* hide when chat is open */
#screen-welcome.hidden ~ * #w-footer-bar,
#screen-chat.active ~ #w-footer-bar { display: none; }

@media (max-width: 600px) {
  #w-footer-bar { padding: 10px 16px; gap: 0 2px; }
  .w-footer-item { font-size: 10px; padding: 4px 7px; }
}

/* Prevent footer from overlapping content */
#welcome-inner {
  padding-bottom: 70px;
}

@media (max-width: 600px) {
  #welcome-inner {
    padding-bottom: 80px;
  }
}