/* ============================================
   GLOBAL STYLES - Tony Mikityuk Personal Brand Site
   Merged: Editorial Dark Minimal + 21st.dev patterns
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--text-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

.container--narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 48px;
}

.container--mid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 48px;
}

.section {
  padding: var(--space-12) 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================
   NAVIGATION
   ========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all var(--duration-normal) var(--ease-default);
  background: transparent;
}

.nav--scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: opacity var(--duration-fast);
}

.nav__logo:hover {
  opacity: 0.7;
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  opacity: 0.5;
  letter-spacing: 0.02em;
  transition: opacity var(--duration-fast) var(--ease-default);
}

.nav__link:hover,
.nav__link--active {
  opacity: 1;
  color: var(--text-primary);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--duration-normal) var(--ease-default);
}

.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}

.nav__overlay.active {
  display: flex;
}

.nav__overlay a {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--text-primary);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

.font-serif {
  font-family: var(--font-display);
}

.heading-display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, var(--text-display-xl));
  font-weight: var(--weight-bold);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, var(--text-display));
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.heading-section {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, var(--text-5xl));
  font-weight: var(--weight-regular);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.heading-subsection {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  line-height: 1.25;
  color: var(--text-primary);
}

.heading-card {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  line-height: 1.3;
  color: var(--text-primary);
}

.text-body-xl {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.text-body-lg {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.text-body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.text-small {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

.text-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

.text-white {
  color: var(--text-primary);
}

/* ==========================================
   HERO
   ========================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

/* Three.js dotted surface container */
.hero__dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__dots canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Radial glow - soft centre light for depth */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 60% 50% at 50% 45%,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 70%
  );
}

.hero__inner {
  max-width: 900px;
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Hero slide-up reveal animation --- */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0, 0, 0.2, 1),
              transform 1s cubic-bezier(0, 0, 0.2, 1);
}

.hero-anim--name {
  transition-delay: 0s;
}

.hero-anim--sub {
  transition-delay: 0.35s;
}

.hero-anim--ctas {
  transition-delay: 0.65s;
}

.hero-anim--active {
  opacity: 1;
  transform: translateY(0);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: var(--weight-regular);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4),
               0 0 60px rgba(10, 10, 10, 0.3);
}

.hero__positioning {
  font-size: clamp(0.6rem, 1vw, 0.72rem);
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.hero__ctas {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 2;
}

/* 3D Robot container - overflow crop hides the bottom watermark */
.hero__robot {
  position: absolute;
  bottom: 6%;
  left: 4%;
  width: 220px;
  height: 220px;
  z-index: 10;
  opacity: 0;
  animation: robotFadeIn 1.2s ease forwards 1.5s;
  pointer-events: auto;
  overflow: hidden;
  cursor: pointer;
}

.hero__robot spline-viewer {
  width: 100%;
  height: calc(100% + 72px);   /* render taller so bottom badge is below the crop */
  display: block;
  --spline-viewer-background: transparent;
  margin-bottom: -72px;         /* push the extra height down, out of view */
}

/* Hide spline logo / watermark (best-effort on free tier) */
.hero__robot spline-viewer::part(logo) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* "click to chat" label on robot chest */
.hero__robot-label {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: 7px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

@keyframes robotFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Robot loader (shown while Spline loads) */
.hero__robot-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.hero__robot-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   ABOUT - Mouse-tracking gradient glow
   ========================================== */

.about-track {
  position: relative;
  overflow: hidden;
  /* Break out of container--mid to span full viewport width */
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: calc(50vw - 500px + 48px);
  padding-right: calc(50vw - 500px + 48px);
}

.about-track__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  /* Default position - centred, invisible until JS kicks in */
  background: radial-gradient(
    300px circle at 50% 50%,
    rgba(255, 255, 255, 0.09) 0%,
    transparent 60%
  );
}

.about-track:hover .about-track__glow,
.about-track.is-touched .about-track__glow {
  opacity: 1;
}

/* Keep text above the glow */
.about-track .reveal {
  position: relative;
  z-index: 1;
}

/* ==========================================
   EDUCATION - JHU Shield Watermark
   ========================================== */

.edu-shield {
  position: absolute;
  right: 2%;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  pointer-events: none;
  opacity: 0.04;
  filter: brightness(0) invert(1);
}

/* ==========================================
   BUTTONS - Interactive Hover (slide + expanding dot)
   ========================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: 10px 28px;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  min-width: 140px;
}

/* Default text - slides out on hover */
.btn__text {
  display: inline-block;
  transform: translateX(2px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn:hover .btn__text {
  transform: translateX(48px);
  opacity: 0;
}

/* Hover text + arrow - slides in on hover */
.btn__hover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(48px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn:hover .btn__hover {
  transform: translateX(-2px);
  opacity: 1;
}

.btn__hover svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Expanding dot */
.btn__dot {
  position: absolute;
  left: 20%;
  top: 40%;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  transform: scale(0);
  transition: all 0.3s ease;
  z-index: 1;
}

.btn:hover .btn__dot {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.8);
  border-radius: 0;
}

/* ---- Primary variant (white bg → dot is slightly warm-white) ---- */
.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn--primary .btn__dot {
  background: rgba(230, 230, 230, 1);
}

.btn--primary .btn__hover {
  color: var(--bg-primary);
}

/* ---- Outline variant (transparent → dot fills white) ---- */
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn--outline .btn__dot {
  background: var(--text-primary);
}

.btn--outline .btn__hover {
  color: var(--bg-primary);
}

/* ---- Ghost variant (no bg, just text - simpler hover) ---- */
.btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 0;
  border-radius: 0;
  overflow: visible;
  min-width: auto;
}

.btn--ghost .btn__dot {
  display: none;
}

.btn--ghost .btn__text {
  transform: none;
}

.btn--ghost:hover .btn__text {
  transform: none;
  opacity: 1;
  color: var(--text-primary);
}

.btn--ghost .btn__hover {
  position: static;
  display: none;
}

/* ---- Full-width variant ---- */
.btn--full {
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-base);
  transition: color var(--duration-fast), gap var(--duration-fast);
}

.link-arrow:hover {
  color: var(--text-primary);
  gap: 12px;
}

.link-arrow::after {
  content: '→';
}

/* ==========================================
   BORDER-LEFT BLOCKS (21st.dev pattern)
   ========================================== */

.bl-block {
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding-left: var(--space-3);
}

.bl-block__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bl-block__subtitle {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.bl-block__meta {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-2);
}

.bl-block__text {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.bl-block__bullets {
  list-style: none;
  padding: 0;
}

.bl-block__bullets li {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.bl-block__bullets li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  margin-top: 9px;
}

/* ==========================================
   SKILLS GRID (21st.dev pattern)
   ========================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.skill-group {
  padding: 0;
}

.skill-group--emphasis {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-3);
}

.skill-group__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.skill-group--emphasis .skill-group__title {
  font-size: var(--text-xl);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.badge--filled {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   PROJECT CARDS (21st.dev card pattern)
   ========================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.project-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.project-card {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: border-color var(--duration-normal) var(--ease-default),
              transform var(--duration-normal) var(--ease-default);
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-default);
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: rgba(255, 255, 255, 0.15);
}

.project-card__body {
  padding: var(--space-3);
}

.project-card__badges {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-2);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  transition: color var(--duration-fast);
}

.project-card:hover .project-card__title {
  color: rgba(255, 255, 255, 0.8);
}

.project-card__desc {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* ==========================================
   FAQ ACCORDION (21st.dev bordered items)
   ========================================== */

.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 var(--space-3);
}

.faq-item__trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-2) 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  text-align: left;
}

.faq-item__trigger:hover {
  opacity: 0.8;
}

.faq-item__icon {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.5);
  transition: transform var(--duration-normal) var(--ease-default);
  flex-shrink: 0;
}

.faq-item.active .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-default),
              padding var(--duration-normal) var(--ease-default);
}

.faq-item.active .faq-item__content {
  max-height: 400px;
}

.faq-item__text {
  padding-bottom: var(--space-2);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* ==========================================
   CONTACT FORM (underline + 21st.dev layout)
   ========================================== */

.hire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
  transition: color var(--duration-fast);
}

.contact-link:hover {
  color: var(--text-primary);
}

.contact-link__icon {
  width: 24px;
  height: 24px;
  transition: transform var(--duration-fast);
}

.contact-link:hover .contact-link__icon {
  transform: scale(1.1);
}

.form__group {
  margin-bottom: var(--space-3);
}

.form__input,
.form__textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: 12px 0;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-default);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form__input:focus,
.form__textarea:focus {
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.form__textarea {
  min-height: 120px;
  resize: none;
}

/* ==========================================
   CONTACT CTA
   ========================================== */

.contact-cta {
  padding: var(--space-12) 0;
}

.contact-cta--centered {
  text-align: center;
}

.contact-cta__heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, var(--text-5xl));
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

/* ==========================================
   PROJECT DETAIL - process, gallery, quote
   ========================================== */

.project-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.project-meta-bar .badge {
  font-size: var(--text-xs);
}

.project-meta-bar__separator {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: var(--space-8) 0;
}

.hero-image__placeholder {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: rgba(255, 255, 255, 0.1);
}

.image-gallery {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.image-gallery--2col {
  grid-template-columns: repeat(2, 1fr);
}

.image-gallery--3col {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-image__placeholder {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.15);
}

.quote-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.quote-block__text {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

/* ==========================================
   CHATBOT WIDGET - Gradient AI Chat Style
   Multi-layer conic gradient border adapted
   for editorial dark minimal theme
   ========================================== */

/* --- Floating toggle button --- */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  box-shadow: var(--shadow-floating);
  transition: transform var(--duration-fast);
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

.chatbot-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Panel container --- */
.chatbot-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 128px);
  z-index: 200;
  display: none;
  flex-direction: column;
  /* Multi-layer gradient border system */
  border-radius: 20px;
  padding: 2px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.18) 0deg,
    rgba(255, 255, 255, 0.08) 90deg,
    rgba(255, 255, 255, 0.12) 180deg,
    rgba(255, 255, 255, 0.06) 270deg,
    rgba(255, 255, 255, 0.18) 360deg
  );
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 0 0.5px rgba(255, 255, 255, 0.08);
  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.35s var(--ease-enter),
              transform 0.35s var(--ease-enter);
}

.chatbot-panel.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Inner shell - the actual dark background */
.chatbot-panel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

/* Subtle inner border highlight */
.chatbot-panel__body::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 0.5px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.06) 0deg,
    rgba(255, 255, 255, 0.02) 90deg,
    rgba(255, 255, 255, 0.04) 180deg,
    rgba(255, 255, 255, 0.01) 270deg,
    rgba(255, 255, 255, 0.06) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Top edge highlight */
.chatbot-panel__body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 0.5px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.1) 50%,
    transparent
  );
  z-index: 2;
  pointer-events: none;
}

/* --- Header --- */
.chatbot-panel__header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-panel__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-primary);
  font-weight: var(--weight-regular);
}

.chatbot-panel__subtitle {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

.chatbot-panel__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 6px;
  font-size: var(--text-lg);
  transition: color var(--duration-fast);
  line-height: 1;
}

.chatbot-panel__close:hover {
  color: var(--text-primary);
}

/* --- Messages area --- */
.chatbot-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.chatbot-panel__messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-panel__messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-panel__messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: var(--text-sm);
  line-height: 1.6;
  border-radius: 12px;
}

.chat-msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border-bottom-left-radius: 4px;
}

.chat-msg--user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.9);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

/* --- Input area - Gradient border treatment --- */
.chatbot-panel__form-wrap {
  padding: 16px 16px 16px;
  position: relative;
}

/* Gradient input container */
.chatbot-panel__input-shell {
  position: relative;
  border-radius: 16px;
  padding: 1.5px;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.14) 0deg,
    rgba(255, 255, 255, 0.06) 90deg,
    rgba(255, 255, 255, 0.10) 180deg,
    rgba(255, 255, 255, 0.04) 270deg,
    rgba(255, 255, 255, 0.14) 360deg
  );
  transition: background 0.3s ease;
}

.chatbot-panel__input-shell:focus-within {
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.22) 0deg,
    rgba(255, 255, 255, 0.10) 90deg,
    rgba(255, 255, 255, 0.16) 180deg,
    rgba(255, 255, 255, 0.08) 270deg,
    rgba(255, 255, 255, 0.22) 360deg
  );
}

/* Inner dark background of the input */
.chatbot-panel__input-inner {
  background: var(--bg-primary);
  border-radius: 14.5px;
  position: relative;
  overflow: hidden;
}

/* Top highlight inside input */
.chatbot-panel__input-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 0.5px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.06) 50%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

.chatbot-panel__form {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
}

.chatbot-panel__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: 4px 0;
  outline: none;
  resize: none;
  min-height: 24px;
  max-height: 96px;
  overflow-y: auto;
}

.chatbot-panel__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chatbot-panel__send {
  width: 28px;
  height: 28px;
  background: transparent;
  color: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.chatbot-panel__send:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.chatbot-panel__send.has-text {
  color: rgba(255, 255, 255, 0.7);
}

.chatbot-panel__send svg {
  width: 14px;
  height: 14px;
}

/* --- Example question chips --- */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.chat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast);
  line-height: 1.4;
}

.chat-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

/* --- Typing indicator --- */
.chat-typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  min-height: auto;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-4px); opacity: 0.8; }
}

/* Shadow underneath the input shell */
.chatbot-panel__input-shadow {
  position: absolute;
  bottom: -4px;
  left: 12px;
  right: 12px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 70%
  );
  filter: blur(4px);
  pointer-events: none;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-4) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__credits {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer__links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
}

.footer__links a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer__links a:hover {
  color: var(--text-primary);
}

/* ==========================================
   SCROLL REVEAL
   ========================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-enter),
              transform var(--duration-reveal) var(--ease-enter);
}

.reveal--left {
  transform: translateX(-24px);
}

.reveal--right {
  transform: translateX(24px);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1023px) {
  .container, .container--narrow, .container--mid {
    padding: 0 32px;
  }
  .nav__inner {
    padding: 20px 32px;
  }
  .section {
    padding: var(--space-10) 0;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hire-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .hero__robot {
    width: 180px;
    height: 180px;
    bottom: 4%;
    left: 2%;
  }
}

@media (max-width: 767px) {
  .hero__robot {
    width: 140px;
    height: 140px;
    bottom: 3%;
    left: 4%;
    transform: none;
  }
  .hero__robot {
    animation: robotFadeInMobile 1.2s ease forwards 1.5s;
  }
  @keyframes robotFadeInMobile {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 639px) {
  .container, .container--narrow, .container--mid {
    padding: 0 20px;
  }
  .nav__inner {
    padding: 16px 20px;
  }
  .nav__links {
    display: none;
  }
  .nav__hamburger {
    display: flex;
  }
  .section {
    padding: var(--space-8) 0;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .badge {
    white-space: normal;
  }
  .skill-group--emphasis .skill-group__tags {
    grid-template-columns: 1fr 1fr !important;
  }
  .edu-shield {
    display: none;
  }
  .edu-video--desktop {
    display: none !important;
  }
  .edu-video--mobile {
    display: block !important;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-grid--3col {
    grid-template-columns: 1fr;
  }
  .image-gallery--2col,
  .image-gallery--3col {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-card__frame,
  .scroll-card__header {
    transform: none !important;
  }
}
