:root {
  --bg: #091017;
  --bg-elevated: #0f1822;
  --panel: rgba(13, 24, 34, 0.82);
  --panel-strong: rgba(16, 28, 39, 0.96);
  --line: rgba(158, 182, 204, 0.16);
  --text: #edf3f7;
  --muted: #9fb0be;
  --muted-strong: #c4d1db;
  --accent: #d1a15a;
  --accent-strong: #ffbf69;
  --accent-cool: #5ed2c4;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(94, 210, 196, 0.12), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(209, 161, 90, 0.16), transparent 24%),
    linear-gradient(180deg, #091017 0%, #0b1016 48%, #060a0f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 92%);
  pointer-events: none;
  z-index: -1;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: clip;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  top: 4rem;
  left: -8rem;
  background: rgba(94, 210, 196, 0.18);
}

.ambient-two {
  width: 24rem;
  height: 24rem;
  right: -5rem;
  top: 22rem;
  background: rgba(209, 161, 90, 0.18);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 1rem 1.4rem 0;
}

.topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 12, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(209, 161, 90, 0.34);
  background: linear-gradient(145deg, rgba(209, 161, 90, 0.2), rgba(94, 210, 196, 0.16));
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.77rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-cta,
.button-primary {
  background: linear-gradient(135deg, rgba(209, 161, 90, 0.96), rgba(255, 191, 105, 0.92));
  color: #111;
  font-weight: 700;
}

.nav-cta:hover,
.button:hover {
  transform: translateY(-2px);
}

.button-secondary {
  border-color: rgba(209, 161, 90, 0.3);
  background: rgba(209, 161, 90, 0.08);
  color: var(--text);
}

.button-tertiary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
}

.hero-section,
.section-block {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4.5rem 1.4rem 0;
}

.hero-section {
  padding-top: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.6rem;
  align-items: stretch;
}

.hero-copy,
.panel,
.hero-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2.3rem;
  border-radius: var(--radius-xl);
}

.eyebrow,
.panel-label,
.experience-label,
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-strong);
}

.hero-copy h1,
.section-heading h2,
.contact-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  margin-top: 1rem;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  max-width: 12ch;
}

.hero-subheadline,
#about-summary,
.contact-copy p,
.project-card p,
.signal-card p,
.capability-card p,
.timeline-description,
.education-item p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-subheadline {
  margin-top: 1.4rem;
  max-width: 64ch;
  font-size: 1.05rem;
}

.hero-person {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.hero-person h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
}

.hero-title,
.hero-location {
  color: var(--muted-strong);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-panel {
  padding: 1rem;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 1rem;
}

.portrait-card,
.signal-panel,
.timeline-detail,
.contact-panel {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: calc(var(--radius-xl) - 8px);
}

.portrait-card {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.portrait-frame {
  aspect-ratio: 4 / 4.7;
  border-radius: calc(var(--radius-xl) - 12px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(209, 161, 90, 0.24), transparent 45%),
    linear-gradient(180deg, #121c26, #080d12);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.06);
}

.portrait-meta,
.signal-panel {
  padding: 1rem 1.1rem;
}

.portrait-meta h3 {
  margin-top: 0.55rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  line-height: 1.18;
}

.tag-row,
.stack-row,
.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag,
.stack-tag,
.interest-pill,
.stat-card span:last-child {
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
}

.tag,
.stack-tag,
.interest-pill {
  padding: 0.46rem 0.8rem;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.signal-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.signal-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.signal-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.signal-list span {
  color: var(--muted);
}

.signal-list strong {
  max-width: 55%;
  text-align: right;
  font-weight: 600;
}

.stats-grid,
.signal-cards,
.capability-grid,
.project-grid,
.credentials-grid,
.footer-grid,
.about-layout {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 1.1rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.stat-card span:first-child {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-card span:last-child {
  display: inline-flex;
  margin-top: 0.8rem;
  padding: 0.45rem 0.78rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
  color: var(--text);
}

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 13ch;
}

.about-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.panel {
  padding: 1.4rem;
  border-radius: var(--radius-xl);
}

.signal-cards,
.capability-grid,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-card,
.capability-card,
.project-card {
  padding: 1.3rem;
  min-height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.signal-card h3,
.capability-card h3,
.project-card h3,
.timeline-title {
  font-family: "Space Grotesk", sans-serif;
}

.signal-card h3,
.project-card h3 {
  font-size: 1.22rem;
}

.signal-card p,
.capability-card p,
.project-card p {
  margin-top: 0.85rem;
}

.capability-card h3 {
  margin-bottom: 1rem;
}

.skill-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.skill-chip {
  padding: 0.48rem 0.76rem;
  border-radius: 999px;
  background: rgba(94, 210, 196, 0.08);
  border: 1px solid rgba(94, 210, 196, 0.16);
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.timeline-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
}

.timeline-detail {
  padding: 1.8rem;
  min-height: 28rem;
  position: relative;
  overflow: hidden;
}

.timeline-detail::before {
  content: "";
  position: absolute;
  inset: auto -15% -20% auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 210, 196, 0.12), transparent 68%);
  pointer-events: none;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.timeline-title {
  margin-top: 0.7rem;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1;
}

.timeline-company {
  margin-top: 0.4rem;
  color: var(--accent-cool);
  font-weight: 600;
}

.timeline-period {
  display: inline-flex;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(209, 161, 90, 0.08);
  border: 1px solid rgba(209, 161, 90, 0.18);
  color: var(--accent-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.timeline-description {
  margin-top: 1rem;
  max-width: 64ch;
}

.timeline-highlights {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.timeline-highlights li {
  list-style: none;
  padding: 0.9rem 1rem;
  border-left: 2px solid rgba(94, 210, 196, 0.34);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.stack-row {
  margin-top: 1.2rem;
}

.timeline-rail {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.timeline-rail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.timeline-controls {
  display: flex;
  gap: 0.5rem;
}

.timeline-controls button {
  min-width: 4.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.timeline-controls button:hover {
  border-color: rgba(209, 161, 90, 0.34);
  color: var(--text);
}

.timeline-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.timeline-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.timeline-item:hover {
  transform: translateX(4px);
}

.timeline-item.active {
  border-color: rgba(209, 161, 90, 0.3);
  background: rgba(209, 161, 90, 0.08);
}

.timeline-item strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.timeline-item span,
.timeline-item small,
.project-card small,
.education-item span {
  color: var(--muted);
}

.timeline-item small {
  display: block;
  margin-top: 0.35rem;
}

.timeline-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.timeline-dots button {
  width: 0.8rem;
  height: 0.8rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.timeline-dots button.active {
  background: var(--accent-strong);
  box-shadow: 0 0 20px rgba(255, 191, 105, 0.46);
}

.project-card small {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credentials-grid,
.footer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.education-list {
  display: grid;
  gap: 1rem;
}

.education-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.education-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.education-item strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.education-item span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.contact-panel {
  padding: 1.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
}

.site-footer {
  padding: 4rem 1.4rem 3rem;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  align-items: center;
  color: var(--muted);
}

.footer-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  color: var(--text);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-copy {
  text-align: right;
}

#chatbot-popup {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
}

#chatbot-toggle {
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(209, 161, 90, 0.3);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(209, 161, 90, 0.18), rgba(9, 16, 23, 0.96));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.chatbot-avatar-icon,
.chatbot-avatar-header {
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
}

.chatbot-avatar-icon {
  width: 3.4rem;
  height: 3.4rem;
}

#chatbot-window {
  position: absolute;
  right: 0;
  bottom: 5.4rem;
  width: min(27rem, calc(100vw - 2rem));
  height: 37rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(209, 161, 90, 0.26);
  border-radius: 24px;
  background: rgba(7, 12, 18, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

#chatbot-window.hidden {
  display: none;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chatbot-avatar-header {
  width: 2.6rem;
  height: 2.6rem;
}

.chatbot-header small {
  display: block;
  color: var(--muted);
}

.chatbot-title {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

#chatbot-close,
#chatbot-clear {
  margin-left: auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  cursor: pointer;
}

#chatbot-close {
  margin-left: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
}

.message {
  display: flex;
  gap: 0.7rem;
  max-width: 90%;
}

.message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.bot {
  align-self: flex-start;
}

.message-avatar img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%);
}

.message-content {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  line-height: 1.55;
}

.message.user .message-content {
  background: rgba(209, 161, 90, 0.16);
  color: var(--text);
}

.chatbot-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 1rem 1rem;
}

.quick-prompt {
  flex: 1 1 calc(50% - 0.6rem);
  min-height: 2.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(94, 210, 196, 0.16);
  border-radius: 14px;
  background: rgba(94, 210, 196, 0.05);
  color: var(--muted-strong);
  cursor: pointer;
}

.chat-input {
  display: flex;
  gap: 0.7rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-input input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.chat-input button {
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(209, 161, 90, 0.96), rgba(255, 191, 105, 0.92));
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .topbar,
  .hero-grid,
  .timeline-shell,
  .contact-panel,
  .about-layout,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    border-radius: 28px;
  }

  .contact-actions,
  .footer-copy {
    justify-content: flex-start;
    text-align: left;
  }

  .signal-cards,
  .capability-grid,
  .project-grid,
  .stats-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 0.9rem;
  }

  .topbar {
    padding: 1rem;
    border-radius: 24px;
  }

  .nav-links {
    display: none;
  }

  .hero-section,
  .section-block,
  .site-footer {
    padding-inline: 0.9rem;
  }

  .hero-copy,
  .panel,
  .hero-panel,
  .timeline-detail,
  .timeline-rail,
  .contact-panel {
    padding: 1.2rem;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .signal-cards,
  .capability-grid,
  .project-grid,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-prompt {
    flex-basis: 100%;
  }

  #chatbot-popup {
    right: 0.9rem;
    bottom: 0.9rem;
  }

  #chatbot-window {
    right: -0.2rem;
    bottom: 5rem;
    height: min(37rem, calc(100vh - 7rem));
  }
}
