:root{
  --bg: #f8fafc;
  --bg-soft: #eef4ff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-strong: #dbeafe;
  --line: #d8e2ee;
  --line-strong: #b9c8dc;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --primary: #1e40af;
  --primary-strong: #1e3a8a;
  --secondary: #0369a1;
  --accent: #f59e0b;
  --accent-strong: #b45309;
  --sage: #0f766e;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.09);
  --nav-bg: rgba(255, 255, 255, 0.88);
  --radius: 18px;
  --section-width: 1160px;
  --transition: 240ms ease;
}

*{
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body{
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94) 0%, rgba(238, 244, 255, 0.98) 48%, #eaf2fb 100%),
    repeating-linear-gradient(90deg, rgba(30, 64, 175, 0.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(14, 165, 233, 0.035) 0 1px, transparent 1px 96px);
  color: var(--text);
  font-family: "Manrope", Arial, sans-serif;
}

body.dark-mode{
  --bg: #07111f;
  --bg-soft: #0d1b2d;
  --surface: #0f1d31;
  --surface-muted: #13243a;
  --surface-strong: #19304a;
  --line: #29415f;
  --line-strong: #3f5e82;
  --text: #f8fafc;
  --muted: #c5d1e1;
  --subtle: #9badc4;
  --primary: #60a5fa;
  --primary-strong: #bfdbfe;
  --secondary: #38bdf8;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --sage: #2dd4bf;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
  --nav-bg: rgba(15, 29, 49, 0.88);
  background:
    linear-gradient(180deg, #07111f 0%, #0a1728 58%, #0d1b2d 100%),
    repeating-linear-gradient(90deg, rgba(96, 165, 250, 0.045) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.035) 0 1px, transparent 1px 96px);
}

a{
  color: inherit;
  text-decoration: none;
}

button,
input{
  font: inherit;
}

button,
a{
  -webkit-tap-highlight-color: transparent;
}

button{
  cursor: pointer;
}

img,
video{
  max-width: 100%;
}

::selection{
  background: rgba(245, 158, 11, 0.28);
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
}

.skip-link,
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus{
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #111827;
  font-weight: 800;
}

:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.navbar{
  width: min(var(--section-width), calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 12px;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--text);
  font-weight: 800;
}

.logo-mark{
  display: inline-grid;
  width: 42px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-links{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a{
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  transition: background-color var(--transition), color var(--transition);
}

.nav-links a:hover{
  background: var(--surface-muted);
  color: var(--text);
}

.nav-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.theme-toggle,
.resume-btn,
.button,
.command-trigger,
.hero-command,
.filter-button,
.chatbot-send{
  border-radius: var(--radius);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.theme-toggle{
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
}

.theme-toggle img{
  width: 21px;
  height: 21px;
}

body.dark-mode .theme-toggle img{
  filter: invert(1);
}

.theme-toggle:hover,
.resume-btn:hover,
.button:hover,
.command-trigger:hover,
.hero-command:hover,
.filter-button:hover,
.contact-card:hover,
.project-card:hover,
.skill-group:hover,
.experience-card:hover{
  transform: translateY(-2px);
}

.resume-btn{
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--accent);
  color: #111827;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.command-trigger{
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

kbd{
  display: inline-grid;
  min-width: 26px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero{
  position: relative;
  min-height: 84svh;
  margin-top: 20px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b1220;
}

.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(15, 23, 42, 0.74) 48%, rgba(30, 64, 175, 0.30) 100%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.22) 0%, rgba(3, 7, 18, 0.80) 100%);
}

.hero-inner{
  width: min(var(--section-width), calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 96px 0 72px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker,
.project-type,
.contact-label{
  font-family: "Fira Code", monospace;
  letter-spacing: 0;
}

.hero-kicker{
  display: inline-flex;
  margin: 0 0 18px;
  padding: 8px 10px;
  border: 1px solid rgba(219, 234, 254, 0.32);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.12);
  color: #dbeafe;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1{
  max-width: 920px;
  margin: 0;
  color: #fff9ef;
  font-family: "Fraunces", Georgia, serif;
  font-size: 5.4rem;
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 800;
  overflow-wrap: break-word;
}

.hero-role{
  max-width: 760px;
  margin: 16px 0 0;
  color: #fde68a;
  font-size: 1.42rem;
  line-height: 1.35;
  font-weight: 800;
}

.hero-text{
  max-width: 690px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 1.16rem;
  line-height: 1.85;
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button{
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button.primary{
  background: var(--accent);
  color: #111827;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.34);
}

.button.primary:hover{
  background: var(--accent-strong);
}

.button.secondary{
  background: #ffffff;
  color: #0f172a;
}

.button.ghost{
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(219, 234, 254, 0.08);
  color: #ffffff;
}

.hero-metrics{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 192px));
  gap: 14px;
  margin-top: 42px;
}

.metric-tile{
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(219, 234, 254, 0.28);
  border-radius: 20px;
  background: rgba(219, 234, 254, 0.12);
  backdrop-filter: blur(12px);
}

.metric-value{
  display: block;
  color: #ffffff;
  font-family: "Fira Code", monospace;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
}

.metric-label{
  display: block;
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
}

.hero-signature{
  max-width: 620px;
  margin: 24px 0 0;
  color: #fde68a;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.55;
}

.hero-command{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(219, 234, 254, 0.28);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.1);
  color: #fff7ea;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-command kbd{
  border-color: rgba(219, 234, 254, 0.34);
  background: rgba(219, 234, 254, 0.14);
  color: #fff7ea;
}

main{
  position: relative;
}

.content-section{
  width: min(var(--section-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading{
  margin-bottom: 28px;
}

.split-heading{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker{
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.dark-mode .section-kicker{
  color: var(--accent);
}

h2,
h3,
p{
  margin-top: 0;
}

h2{
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text);
  font-family: "Fraunces", Georgia, serif;
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 800;
}

h3{
  color: var(--text);
  letter-spacing: 0;
}

p{
  color: var(--muted);
  line-height: 1.78;
}

.lead-copy{
  color: var(--text);
  font-size: 1.18rem;
}

.section-note{
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.about-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.76fr);
  gap: 44px;
  align-items: start;
}

.about-copy{
  max-width: 710px;
}

.about-copy p{
  margin-bottom: 18px;
  font-size: 1.06rem;
}

.impact-list{
  display: grid;
  gap: 12px;
}

.impact-item{
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-muted) 100%);
  box-shadow: var(--shadow-soft);
}

.impact-item span{
  grid-row: span 2;
  color: var(--accent-strong);
  font-family: "Fira Code", monospace;
  font-size: 1rem;
  font-weight: 700;
}

.impact-item strong{
  color: var(--text);
  font-size: 1.04rem;
}

.impact-item p{
  margin-bottom: 0;
  font-size: 0.95rem;
}

.skills-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.skill-group{
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-group:hover{
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.skill-group h3{
  margin-bottom: 16px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
}

.skill-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span{
  display: inline-flex;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

body.dark-mode .skill-tags span{
  background: rgba(219, 234, 254, 0.08);
}

.project-filters{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button{
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.filter-button.active,
.filter-button[aria-pressed="true"]{
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card,
.experience-card,
.contact-card{
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.project-card{
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.project-card::before{
  content: "";
  position: absolute;
  inset: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--sage));
  opacity: 0.82;
}

.project-card:first-child{
  grid-column: span 2;
  min-height: 280px;
}

.project-card:hover{
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.project-card[hidden]{
  display: none;
}

.project-topline{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.project-badge,
.experience-pill{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: var(--radius);
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-weight: 700;
}

.project-badge{
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary);
  border: 1px solid rgba(30, 64, 175, 0.2);
}

.project-badge.live{
  background: rgba(15, 118, 110, 0.1);
  color: var(--secondary);
  border-color: rgba(15, 118, 110, 0.24);
}

body.dark-mode .project-badge{
  background: rgba(96, 165, 250, 0.13);
  border-color: rgba(96, 165, 250, 0.26);
}

body.dark-mode .project-badge.live{
  background: rgba(45, 212, 191, 0.13);
  border-color: rgba(45, 212, 191, 0.26);
}

.project-type{
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: right;
}

.project-card h3{
  margin-bottom: 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.2;
}

.project-card p{
  margin-bottom: 14px;
}

.tech{
  margin-top: auto;
  color: var(--accent-strong);
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

body.dark-mode .tech{
  color: var(--primary);
}

.project-card a{
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  color: var(--primary-strong);
  font-weight: 800;
}

.project-card a:hover{
  color: var(--accent-strong);
}

.experience-container{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.experience-card{
  padding: 26px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.experience-card:hover{
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.experience-top{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.experience-top h3{
  margin-bottom: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.42rem;
}

.experience-pill{
  flex: 0 0 auto;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.role{
  margin-bottom: 14px;
  color: var(--primary-strong);
  font-weight: 800;
}

body.dark-mode .role{
  color: var(--accent);
}

.experience-card ul{
  margin: 0;
  padding-left: 18px;
}

.experience-card li{
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.contact-section{
  border-bottom: 0;
}

.contact-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-card{
  display: flex;
  flex-direction: column;
  min-height: 128px;
  justify-content: space-between;
  padding: 24px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.contact-card:hover{
  border-color: var(--secondary);
  box-shadow: var(--shadow);
}

.contact-label{
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-value{
  color: var(--text);
  font-weight: 800;
  word-break: break-word;
}

footer{
  width: min(var(--section-width), calc(100% - 32px));
  margin: 0 auto 32px;
  padding: 22px 0 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

footer p{
  margin-bottom: 0;
  font-size: 0.95rem;
}

.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease-out, transform 520ms ease-out;
}

.reveal.active{
  opacity: 1;
  transform: translateY(0);
}

.command-palette{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: 84px 16px 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
}

.command-palette[hidden]{
  display: none;
}

.command-panel{
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    linear-gradient(145deg, var(--surface) 0%, var(--surface-muted) 100%);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.command-header{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 14px;
}

.command-kicker{
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.command-header h2{
  font-size: 1.8rem;
}

.command-close{
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.command-search{
  width: calc(100% - 44px);
  min-height: 48px;
  margin: 0 22px 14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.command-search:focus{
  border-color: var(--accent);
}

.command-list{
  display: grid;
  gap: 8px;
  max-height: min(56vh, 430px);
  overflow-y: auto;
  padding: 0 14px 14px;
}

.command-item{
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.command-item:hover,
.command-item:focus-visible{
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

body.dark-mode .command-item:hover,
body.dark-mode .command-item:focus-visible{
  background: rgba(219, 234, 254, 0.08);
}

.command-item span{
  font-weight: 800;
}

.command-item small{
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.chatbot-button{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(125, 211, 252, 0.55);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.94), rgba(30, 64, 175, 0.96)),
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.34), transparent 28%);
  color: #f8fbff;
  font-weight: 800;
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.28), 0 0 0 6px rgba(14, 165, 233, 0.08);
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

.chatbot-button:hover{
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.78);
  box-shadow: 0 22px 52px rgba(14, 165, 233, 0.34), 0 0 0 8px rgba(251, 191, 36, 0.1);
}

.chatbot-orb{
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  color: #e0f2fe;
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  border: 1px solid rgba(224, 242, 254, 0.42);
  box-shadow: inset 0 0 18px rgba(125, 211, 252, 0.22);
}

.chatbot-modal{
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 41;
  width: min(420px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 148px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.38);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.98) 0%, rgba(10, 23, 40, 0.98) 100%);
  color: #eaf6ff;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(20px);
}

.chatbot-modal.open{
  display: flex;
}

.chatbot-header{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.18);
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.16), rgba(245, 158, 11, 0.06));
}

.chatbot-header h3{
  margin-bottom: 0;
  color: #f8fbff;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.42rem;
}

.chatbot-title-wrap p{
  margin: 4px 0 0;
  color: #9bd8ff;
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
}

.assistant-status{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #a7f3d0;
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.assistant-status span{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.84);
}

.chatbot-close{
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 1.4rem;
  line-height: 1;
}

.chatbot-messages{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

.chatbot-message{
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  color: #eaf6ff;
  line-height: 1.5;
  font-size: 0.95rem;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
}

.chatbot-message.bot{
  align-self: flex-start;
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(15, 23, 42, 0.62));
}

.chatbot-message.user{
  align-self: flex-end;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.82), rgba(245, 158, 11, 0.28));
  color: #ffffff;
}

.chatbot-suggestions{
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  overflow-x: auto;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
}

.chatbot-suggestions button{
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
  color: #bae6fd;
  font-weight: 800;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.chatbot-suggestions button:hover{
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.48);
  background: rgba(251, 191, 36, 0.13);
  color: #fde68a;
}

.chatbot-input-area{
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(2, 6, 23, 0.32);
}

.chatbot-input{
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fbff;
  outline: 0;
}

.chatbot-input:focus{
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.chatbot-input::placeholder{
  color: #93c5fd;
}

.chatbot-send{
  min-width: 74px;
  border: 1px solid rgba(251, 191, 36, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111827;
  font-weight: 800;
}

@media (max-width: 1024px){
  .navbar{
    grid-template-columns: 1fr auto;
  }

  .nav-links{
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .hero h1{
    font-size: 4.1rem;
  }

  .about-layout,
  .skills-grid,
  .experience-container{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px){
  .navbar{
    width: calc(100% - 20px);
    margin-top: 10px;
    top: 8px;
    gap: 12px;
  }

  .logo span:last-child{
    display: none;
  }

  .nav-links{
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .nav-links a{
    white-space: nowrap;
  }

  .command-trigger span{
    display: none;
  }

  .hero{
    min-height: auto;
  }

  .hero-inner{
    width: calc(100% - 32px);
    padding: 72px 0 42px;
  }

  .hero h1{
    font-size: 3.1rem;
  }

  .hero-role{
    font-size: 1.2rem;
  }

  .hero-text{
    font-size: 1rem;
  }

  .hero-metrics,
  .about-layout,
  .skills-grid,
  .projects-grid,
  .experience-container,
  .contact-grid{
    grid-template-columns: 1fr;
  }

  .project-card:first-child{
    grid-column: auto;
  }

  .metric-tile{
    min-height: auto;
  }

  .split-heading{
    align-items: start;
    flex-direction: column;
  }

  .project-filters{
    justify-content: flex-start;
  }

  h2{
    font-size: 2.35rem;
  }

  .content-section{
    width: calc(100% - 32px);
    padding: 58px 0;
  }
}

@media (max-width: 520px){
  .navbar{
    grid-template-columns: auto 1fr;
    padding: 10px;
  }

  .nav-actions{
    justify-self: end;
  }

  .resume-btn{
    padding: 0 10px;
  }

  .command-trigger{
    padding: 0 8px;
  }

  .hero-kicker{
    display: flex;
    width: fit-content;
    max-width: 100%;
    line-height: 1.45;
  }

  .hero h1{
    font-size: 2.8rem;
  }

  .hero-actions{
    flex-direction: column;
  }

  .button{
    width: 100%;
  }

  .hero-command{
    width: 100%;
    justify-content: space-between;
  }

  .content-section{
    width: calc(100% - 24px);
  }

  .impact-item{
    grid-template-columns: 1fr;
  }

  .impact-item span{
    grid-row: auto;
  }

  .project-card,
  .skill-group,
  .experience-card,
  .contact-card{
    padding: 18px;
  }

  .chatbot-button{
    right: 12px;
    bottom: 12px;
    min-height: 54px;
    padding-right: 13px;
  }

  .chatbot-modal{
    right: 12px;
    bottom: 78px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100vh - 92px));
  }

  .chatbot-header{
    padding: 16px;
  }

  .chatbot-suggestions{
    padding-inline: 12px;
  }

  .command-palette{
    padding-top: 58px;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal{
    opacity: 1;
    transform: none;
  }
}
