:root {
  --bg: #f5f6f8;
  --body-bg: linear-gradient(180deg, #f8f9fb 0%, #ffffff 45%, #f3f5f8 100%);
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --text: #111114;
  --muted: #626873;
  --line: #e4e7ec;
  --accent: #0071e3;
  --accent-dark: #005bb8;
  --success: #1f9d62;
  --shadow: 0 12px 30px rgba(25, 31, 40, 0.06);
  --card-bg: #e7eaee;
  --card-shadow: 8px 8px 18px rgba(190, 190, 190, 0.46),
    -8px -8px 18px rgba(255, 255, 255, 0.72);
  --card-shadow-hover: 6px 6px 16px rgba(190, 190, 190, 0.42),
    -6px -6px 16px rgba(255, 255, 255, 0.76);
  --card-radius: 30px;
  --radius: 8px;
  --max-width: 1120px;
}

.dark-theme {
  --bg: #121212;
  --body-bg: linear-gradient(180deg, #0f0f10 0%, #171719 48%, #101011 100%);
  --surface: #1c1c1e;
  --surface-soft: #242426;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: #2f2f32;
  --accent: #2997ff;
  --accent-dark: #0a84ff;
  --success: #30d158;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  --card-bg: #212121;
  --card-shadow: 8px 8px 18px rgb(17, 17, 17),
    -5px -5px 12px rgba(55, 55, 55, 0.38);
  --card-shadow-hover: 6px 6px 16px rgb(14, 14, 14),
    -4px -4px 10px rgba(58, 58, 58, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--body-bg);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.35s ease;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid transparent;
  transform: translateY(0);
  transition: transform 0.28s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(228, 231, 236, 0.85);
  box-shadow: 0 8px 30px rgba(21, 26, 34, 0.06);
  backdrop-filter: blur(18px);
}

.dark-theme .site-header.scrolled {
  background: rgba(22, 22, 23, 0.78);
  border-color: rgba(65, 65, 69, 0.72);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.site-header.nav-hidden {
  transform: translateY(-100%);
}

.navbar {
  width: min(100% - 32px, var(--max-width));
  height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-logo {
  grid-column: 1;
  justify-self: start;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-actions {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.code-nav-logo {
  display: inline-flex;
  align-items: center;
}

.code-loader {
  color: var(--accent);
  font-family: Consolas, Menlo, Monaco, monospace;
  font-weight: 850;
  line-height: 1;
  opacity: 0.9;
}

.code-loader span {
  display: inline-block;
  animation: pulse_414 0.4s alternate infinite ease-in-out;
}

.code-loader span:nth-child(odd) {
  animation-delay: 0.4s;
}

.logo-code {
  font-size: 1.45rem;
}

.assistant-code {
  color: #ffffff;
  font-size: 1rem;
}

.nav-links {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 750;
  border-radius: 999px;
  isolation: isolate;
  transition: color 0.28s ease, transform 0.28s ease;
}

.nav-links a svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-links a span {
  line-height: 1;
}

.nav-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 30px;
  cursor: pointer;
}

.theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.theme-toggle-track {
  position: relative;
  width: 56px;
  height: 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: 0 6px 12px rgba(156, 163, 175, 0.34);
  outline: none;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.theme-toggle-track::before,
.theme-toggle-track::after {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.84rem;
  line-height: 1;
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease;
}

.theme-toggle-track::before {
  content: "\2600\FE0F";
  left: 3px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 214, 10, 0.28);
  transform: translateY(-50%);
}

.theme-toggle-track::after {
  content: "\1F311";
  right: 3px;
  background: #1d1d1d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(100%) rotate(0deg);
}

.theme-toggle-input:checked + .theme-toggle-track {
  background: #383838;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
}

.dark-theme .theme-toggle-track {
  background: #383838;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.34);
}

.theme-toggle-input:checked + .theme-toggle-track::before {
  opacity: 0;
  transform: translateY(-150%) rotate(90deg);
}

.dark-theme .theme-toggle-track::before {
  opacity: 0;
  transform: translateY(-150%) rotate(90deg);
}

.theme-toggle-input:checked + .theme-toggle-track::after {
  opacity: 1;
  transform: translateY(-50%) rotate(180deg);
}

.dark-theme .theme-toggle-track::after {
  opacity: 1;
  transform: translateY(-50%) rotate(180deg);
}

.theme-toggle-input:focus-visible + .theme-toggle-track {
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16), 0 6px 12px rgba(156, 163, 175, 0.34);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: transparent;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  transform: scaleX(1);
  transform-origin: right;
}

.mobile-page-menu {
  position: fixed;
  top: 50%;
  left: 8px;
  z-index: 60;
  width: 44px;
  max-width: none;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-right: 4px;
  border-right: 1px solid rgba(0, 113, 227, 0.16);
  isolation: isolate;
  transform: translateY(-50%);
}

.mobile-page-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  filter: blur(12px);
  opacity: 0.55;
  pointer-events: none;
}

.mobile-page-menu a {
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 7px 10px;
  overflow: hidden;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 113, 227, 0.1);
  border-left-color: rgba(0, 113, 227, 0.22);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(21, 26, 34, 0.08);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    width 0.42s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.28s ease,
    transform 0.18s ease;
}

.mobile-page-menu a.active {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.11);
  border-color: rgba(0, 113, 227, 0.16);
  border-left-color: rgba(0, 113, 227, 0.46);
  box-shadow: 0 8px 16px rgba(0, 113, 227, 0.1);
}

.mobile-page-menu a.active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.mobile-page-menu a:hover,
.mobile-page-menu a:focus-visible,
.mobile-page-menu a.active:hover,
.mobile-page-menu a.active:focus-visible {
  width: 176px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: rgba(0, 113, 227, 0.34);
  box-shadow: 0 12px 26px rgba(0, 113, 227, 0.2);
}

.mobile-page-menu a:active {
  transform: scale(0.98);
}

.mobile-page-menu svg {
  width: 1.06rem;
  height: 1.06rem;
  flex: 0 0 auto;
}

.mobile-page-menu span {
  max-width: 112px;
  overflow: hidden;
  opacity: 0;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.24s ease;
  white-space: nowrap;
}

.mobile-page-menu a:hover span,
.mobile-page-menu a:focus-visible span {
  opacity: 1;
  transform: translateX(0);
}

.section {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 112px 0;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 120px;
  padding-bottom: 120px;
}

.home-hero {
  min-height: 100svh;
  padding-bottom: 92px;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
}

.button {
  position: relative;
  display: inline-block;
  padding: 0;
  border: none;
  background: transparent;
  --stroke-color: rgba(17, 17, 20, 0.72);
  --ani-color: rgba(0, 113, 227, 0);
  --color-gar: linear-gradient(90deg, #0071e3, #1f9d62, #111114, #0071e3);
  font-size: clamp(4.2rem, 13vw, 8.5rem);
  font-family: inherit;
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(17, 17, 20, 0.08);
  -webkit-text-stroke: 1px var(--stroke-color);
  -webkit-text-fill-color: transparent;
  cursor: default;
}

.actual-text {
  display: inline-block;
  white-space: nowrap;
}

.front-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  background: var(--color-gar);
  background-size: 200%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: hidden;
  white-space: nowrap;
  transition: width 1s ease, border-color 1s ease;
  animation: ani 8s linear infinite, yalvacReveal 2s ease-in-out infinite;
  border-bottom: 3px solid transparent;
  -webkit-text-stroke: 1px var(--ani-color);
}

.button:hover .front-text,
.button:focus-visible .front-text {
  animation: ani 8s linear infinite;
  width: 100%;
  border-bottom-color: var(--accent);
}

.hero-text {
  width: min(640px, 100%);
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(0, 113, 227, 0.22);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: rgba(0, 113, 227, 0.28);
  box-shadow: 0 12px 24px rgba(20, 25, 35, 0.07);
}

.scroll-cue {
  position: fixed;
  bottom: 32px;
  left: 50%;
  z-index: 28;
  width: 34px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(0, 113, 227, 0.46);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 36px rgba(0, 113, 227, 0.16),
    0 3px 10px rgba(21, 26, 34, 0.12);
  cursor: pointer;
  transform: translateX(-50%);
  transition: bottom 0.28s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.scroll-cue:hover {
  border-color: rgba(0, 113, 227, 0.82);
  box-shadow: 0 18px 42px rgba(0, 113, 227, 0.22),
    0 4px 12px rgba(21, 26, 34, 0.14);
}

.scroll-cue span {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 5px;
  height: 11px;
  background: var(--accent);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollDot 1.7s ease-in-out infinite;
}

.scroll-cue.to-top span {
  animation-name: scrollDotUp;
}

.scroll-cue.to-top {
  bottom: 92px;
}

.page-main ~ .scroll-cue {
  left: 50%;
}

.section-header {
  width: min(760px, 100%);
  margin-bottom: 34px;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-main {
  min-height: calc(100svh - 122px);
  padding-top: 70px;
}

.page-hero {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 92px 0 36px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-main .section {
  padding-top: 48px;
}

.about-section,
.skills-section,
.projects-section {
  min-height: calc(100svh - 190px);
  display: grid;
  align-items: center;
  justify-items: center;
}

.overview-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-cards .mini-card {
  min-height: 210px;
  color: inherit;
}

.about-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 38px;
  align-items: stretch;
  justify-content: center;
}

.card,
.about-copy,
.contact-card,
.mini-card,
.skill-card,
.project-card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.card:not(.chat-widget),
.about-copy,
.contact-card,
.mini-card,
.skill-card,
.project-card {
  animation: cardEntrance 0.65s ease backwards;
}

.skills-grid .card:nth-child(2),
.projects-grid .card:nth-child(2),
.overview-cards .card:nth-child(2) {
  animation-delay: 0.08s;
}

.skills-grid .card:nth-child(3),
.projects-grid .card:nth-child(3),
.overview-cards .card:nth-child(3) {
  animation-delay: 0.16s;
}

.skills-grid .card:nth-child(n + 4) {
  animation-delay: 0.22s;
}

.about-copy {
  min-height: 320px;
  padding: 34px;
  color: var(--muted);
  font-size: 1.05rem;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 18px;
}

.focus-cards {
  display: grid;
  gap: 24px;
  height: 100%;
}

.mini-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-hover-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 210px;
  --card-a: var(--accent);
  --card-b: var(--success);
}

.about-section .about-hover-card::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  z-index: 1;
  width: 18px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, var(--card-b), var(--card-a));
  box-shadow: -10px 0 24px rgba(0, 113, 227, 0.16);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-info-card {
  min-height: 320px;
  height: 100%;
}

.about-hover-card.about-detail-card {
  min-height: 214px;
}

.about-hover-card.about-timeline-card {
  min-height: 252px;
}

.about-hover-card.about-detail-card .front-content {
  min-height: 190px;
}

.about-hover-card.about-timeline-card .front-content {
  min-height: 228px;
}

.about-hover-card.about-detail-card .content {
  align-items: stretch;
  padding: 22px;
  text-align: left;
}

.about-hover-card.about-detail-card .content .heading {
  text-align: center;
  font-size: 1.28rem;
}

.about-hover-card.about-timeline-card .content {
  gap: 14px;
  padding: 28px 26px;
  justify-content: center;
}

.about-hover-card .front-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-hover-card .front-content h3 {
  width: fit-content;
  margin: 0;
  background: linear-gradient(-45deg, var(--card-a), var(--card-b));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.55rem;
  font-weight: 850;
}

.dark-theme .about-section .about-hover-card .front-content h3 {
  background: linear-gradient(-45deg, #5eb6ff, #30d158);
  -webkit-background-clip: text;
  background-clip: text;
}

.about-hover-card .content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(-45deg, var(--card-a), var(--card-b));
  border-radius: inherit;
  pointer-events: none;
  text-align: center;
  transform: translateX(calc(100% + 2px));
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.dark-theme .about-section .about-hover-card .content {
  background: linear-gradient(-45deg, #0a84ff, #1f8f55);
}

.about-hover-card .content .heading {
  margin: 0;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 850;
}

.about-hover-card .content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.about-hover-card .content p + p {
  margin-top: 2px;
}

.about-list,
.timeline-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-list li,
.timeline-list li {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  line-height: 1.42;
}

.about-list li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 9px;
}

.about-list li > span {
  width: 7px;
  height: 7px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.about-list strong {
  color: #ffffff;
  font-weight: 850;
}

.about-list p {
  margin: 0;
}

.timeline-list {
  --timeline-time-col: 78px;
  --timeline-gap: 42px;
  --timeline-line-x: calc(var(--timeline-time-col) + (var(--timeline-gap) / 2));
  position: relative;
  gap: 11px;
  padding: 2px 0 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: var(--timeline-line-x);
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.28));
}

.timeline-list li {
  position: relative;
  display: grid;
  grid-template-columns: var(--timeline-time-col) 1fr;
  gap: var(--timeline-gap);
  align-items: center;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: calc(var(--timeline-line-x) - 7px);
  top: 50%;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
}

.timeline-list li:nth-child(2)::before {
  background: #b9f6d3;
}

.timeline-list li:nth-child(3)::before {
  background: #7dd3fc;
}

.timeline-list time {
  display: flex;
  justify-content: flex-end;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.35;
}

.timeline-list p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  line-height: 1.32;
}

.about-hover-card:hover .content,
.about-hover-card:focus-within .content,
.about-hover-card.is-touch-active .content {
  transform: translateX(0);
}

.about-section .about-hover-card:hover::after,
.about-section .about-hover-card:focus-within::after,
.about-section .about-hover-card.is-touch-active::after {
  opacity: 0;
  transform: translateX(12px);
}

.about-hover-card:hover .front-content,
.about-hover-card:focus-within .front-content,
.about-hover-card.is-touch-active .front-content {
  opacity: 0;
  transform: translateX(20%);
}

.skill-hover-card .front-content {
  align-items: center;
  min-height: 190px;
}

.skill-hover-card .front-content h3 {
  margin: 0;
}

.skill-hover-card .content {
  padding: 26px;
  align-items: stretch;
  text-align: left;
}

.mini-card:hover,
.skill-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
}

.card-number {
  color: var(--accent);
  font-weight: 800;
}

.mini-card h3,
.skill-card h3,
.contact-card h3 {
  margin: 8px 0 8px;
  font-size: 1.2rem;
}

.mini-card p,
.skill-card p,
.project-card p,
.contact-card p {
  margin: 0;
  color: var(--muted);
}

.skills-grid,
.projects-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 30px;
  justify-content: center;
  align-content: center;
}

.skill-card {
  min-height: 254px;
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-logo {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 5px 5px 14px rgba(190, 190, 190, 0.35),
    inset -5px -5px 14px rgba(255, 255, 255, 0.95);
}

.skill-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  animation: logoFloat 4.8s ease-in-out infinite;
}

.sql-server-management-mark {
  width: 56px;
  height: 56px;
  animation: logoFloat 4.8s ease-in-out infinite;
}

.sql-server-management-mark.small {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  animation: none;
}

.skill-card:hover .skill-logo img {
  animation-duration: 1.6s;
}

.skill-card:hover .sql-server-management-mark {
  animation-duration: 1.6s;
}

.skill-level {
  display: grid;
  gap: 11px;
  margin-top: 4px;
}

.skill-level-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-level-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.skill-level-icon img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.skill-level-top,
.level-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-level-top {
  flex: 1;
  min-width: 0;
}

.skill-level-top span,
.level-scale {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 750;
}

.skill-level-top strong {
  color: #ffffff;
  font-size: 1rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
}

.progress-fill {
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.72));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.16s;
}

.skill-hover-card:hover .progress-fill,
.skill-hover-card:focus-within .progress-fill,
.skill-hover-card.is-touch-active .progress-fill {
  transform: scaleX(1);
}

.project-card {
  position: relative;
  overflow: hidden;
  transform-origin: center;
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.32s ease;
}

.project-card:hover,
.project-card:focus-within,
.project-card.is-touch-active {
  z-index: 2;
  transform: translateY(-10px) scale(1.055);
  box-shadow: var(--card-shadow-hover);
}

.project-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 17, 20, 0.1);
}

.project-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #56ccf2);
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.4s ease;
}

.project-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 113, 227, 0.24);
}

.project-button:hover::before {
  left: 100%;
}

.project-showcase-card {
  --project-card-bg: #172033;
  width: 280px;
  min-height: 480px;
  justify-self: center;
  padding: 5px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--project-card-bg);
  box-shadow: 0 18px 36px rgba(21, 26, 34, 0.14);
  transform-origin: center;
  transition: transform 0.46s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.32s ease;
}

.projects-grid .project-showcase-card:nth-child(2) {
  animation-delay: 0.08s;
}

.projects-grid .project-showcase-card:nth-child(3) {
  animation-delay: 0.16s;
}

.project-showcase-card:hover,
.project-showcase-card:focus-within,
.project-showcase-card.is-touch-active {
  z-index: 2;
  transform: scale(1.05);
  box-shadow: 0 24px 48px rgba(0, 113, 227, 0.18);
}

.project-showcase-card .top-section {
  position: relative;
  height: 156px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(45deg, var(--project-a), var(--project-b));
}

.project-showcase-card .top-section .border {
  position: relative;
  width: 132px;
  height: 30px;
  background: var(--project-card-bg);
  border-bottom-right-radius: 10px;
  box-shadow: -10px -10px 0 0 var(--project-card-bg);
  transform: skew(-40deg);
}

.project-showcase-card .top-section .border::before {
  content: "";
  position: absolute;
  top: 0;
  right: -15px;
  width: 15px;
  height: 15px;
  border-top-left-radius: 10px;
  box-shadow: -5px -5px 0 2px var(--project-card-bg);
}

.project-showcase-card .top-section::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 0;
  width: 15px;
  height: 15px;
  border-top-left-radius: 15px;
  box-shadow: -5px -5px 0 2px var(--project-card-bg);
}

.project-showcase-card .icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-showcase-card .logo {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 6px 0 6px 15px;
  color: #ffffff;
  font-family: Consolas, Menlo, Monaco, monospace;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.project-showcase-card .project-badges {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 0;
}

.project-showcase-card .project-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 18px;
  padding: 0 6px;
  color: var(--project-card-bg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.project-showcase-card .project-badges span:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.project-showcase-card .project-visual {
  position: absolute;
  inset: 42px 0 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.88);
}

.project-showcase-card .project-visual svg {
  width: 78px;
  height: 78px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.18));
}

.project-showcase-card .bottom-section {
  min-height: 309px;
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  padding: 10px 7px 12px;
}

.project-showcase-card .project-type {
  margin: 0 0 7px;
  color: rgba(170, 222, 243, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.project-showcase-card .title {
  display: block;
  min-height: 48px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.22;
  text-align: center;
}

.project-showcase-card .project-description {
  margin: 12px 4px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: center;
}

.project-showcase-card .row {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}

.project-showcase-card .row .item {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 4px;
  color: rgba(170, 222, 243, 0.78);
  text-align: center;
}

.project-showcase-card .row .item:nth-child(2) {
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.project-showcase-card .big-text {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-showcase-card .regular-text {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  line-height: 1.1;
}

.project-showcase-card .project-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.project-showcase-card .project-button {
  width: 100%;
  min-height: 40px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--project-a), var(--project-b));
  font-size: 0.82rem;
  box-shadow: 0 12px 24px rgba(0, 113, 227, 0.18);
}

.project-showcase-card .project-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 113, 227, 0.24);
}

.contact-card {
  min-height: 254px;
  padding: 34px;
  position: relative;
  transform-origin: center;
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.32s ease;
}

.contact-card {
  display: grid;
  gap: 12px;
}

.contact-card:hover {
  z-index: 2;
  transform: translateY(-10px) scale(1.055);
  box-shadow: var(--card-shadow-hover);
}

.contact-card a {
  color: var(--accent);
  font-weight: 800;
}

.contact-single {
  display: grid;
  place-items: center;
}

.contact-page-main {
  display: grid;
  align-items: center;
}

.contact-page-main .contact-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.contact-single-card {
  width: min(640px, 100%);
  min-height: 360px;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 22px;
}

.contact-single-card h3 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.contact-single-card p {
  width: min(460px, 100%);
}

.holographic-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px;
  perspective: 1000px;
}

.holographic-icon {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.holographic-icon svg {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 3;
  fill: currentColor;
  transition: transform 0.3s ease;
  filter: none;
  shape-rendering: geometricPrecision;
}

.holographic-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: rotate 3s linear infinite;
  opacity: 0.7;
}

.holographic-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 20%, currentColor 20%, currentColor 30%, transparent 30%, transparent 40%, currentColor 40%, currentColor 50%, transparent 50%);
  background-size: 15px 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.holographic-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 15px currentColor;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.holographic-icon.linkedin {
  color: #0a66c2;
}

.holographic-icon.github {
  color: #24292f;
}

.dark-theme .holographic-icon.github {
  color: #f5f5f7;
}

.dark-theme .holographic-icon.github .holographic-ring {
  border-color: rgba(245, 245, 247, 0.92);
  border-top-color: transparent;
  border-bottom-color: transparent;
}

.holographic-icon.mail {
  color: #ea4335;
}

.holographic-icon.youtube {
  color: #ff0000;
}

.holographic-icon:hover {
  transform: translateY(-10px) rotateX(20deg);
}

.holographic-icon:hover svg {
  transform: scale(1.2) rotate(10deg);
}

.holographic-icon:hover .holographic-particles {
  opacity: 0.3;
  animation: particles 3s linear infinite;
}

.holographic-icon:hover .holographic-pulse {
  opacity: 0.5;
  animation: pulse 2s ease-out infinite;
}

.holographic-icon::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 5%;
  width: 90%;
  height: 20%;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  filter: none;
  opacity: 0;
  transform: rotateX(80deg) translateZ(-20px);
  transition: opacity 0.3s ease;
}

.holographic-icon:hover::before {
  opacity: 0.5;
}

.chat-section {
  padding-top: 94px;
}

.home-chat-section {
  min-height: 72svh;
  display: grid;
  align-content: start;
  padding-top: 12svh;
  padding-bottom: 56px;
}

.home-chat {
  width: min(820px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.assistant-launch-list {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 0;
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
  overflow: visible;
  transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.32s ease;
}

.assistant-launch-item {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 60px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  list-style: none;
  outline: none;
  transition: width 0.5s ease, box-shadow 0.5s ease;
}

.dark-theme .assistant-launch-item {
  background: #212121;
  box-shadow: 6px 6px 14px rgb(16, 16, 16),
    -4px -4px 10px rgba(58, 58, 58, 0.35);
}

.dark-theme .assistant-launch-item .icon {
  color: #b8b8bd;
}

.dark-theme .assistant-launch-item:hover,
.dark-theme .assistant-launch-item:focus-visible {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0);
}

.dark-theme .assistant-launch-item::before,
.dark-theme .assistant-launch-item::after {
  background: linear-gradient(45deg, #1d6fd6, #30d158);
}

.assistant-launch-item:hover,
.assistant-launch-item:focus-visible {
  width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0);
}

.assistant-launch-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 60px;
  background: linear-gradient(45deg, var(--i), var(--j));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.assistant-launch-item:hover::before,
.assistant-launch-item:focus-visible::before {
  opacity: 1;
}

.assistant-launch-item::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 100%;
  height: 100%;
  border-radius: 60px;
  background: linear-gradient(45deg, var(--i), var(--j));
  filter: blur(15px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.assistant-launch-item:hover::after,
.assistant-launch-item:focus-visible::after {
  opacity: 0.5;
}

.assistant-launch-item span {
  position: absolute;
}

.assistant-launch-item .icon {
  color: #777777;
  font-size: 1.55rem;
  line-height: 1;
  transition: color 0.5s ease, transform 0.5s ease;
  transition-delay: 0.25s;
}

.assistant-launch-item:hover .icon,
.assistant-launch-item:focus-visible .icon {
  color: #ffffff;
  transform: scale(0);
  transition-delay: 0s;
}

.assistant-launch-item .title {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: scale(0);
  white-space: nowrap;
  transition: transform 0.5s ease;
  transition-delay: 0s;
}

.assistant-launch-item:hover .title,
.assistant-launch-item:focus-visible .title {
  transform: scale(1);
  transition-delay: 0.25s;
}

.chat-widget {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.chat-widget-inline {
  width: 100%;
  margin: 0;
  max-height: 780px;
  overflow: hidden;
  opacity: 1;
  transform-origin: center;
  transform: translateY(0);
  transition: max-height 0.38s ease, opacity 0.26s ease, padding 0.28s ease, box-shadow 0.28s ease, transform 0.38s ease;
}

.home-chat.open .chat-widget-inline:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow: var(--card-shadow-hover);
}

.home-chat:not(.open) .chat-widget-inline {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
  transform: translateY(18px);
}

.home-chat.open .inline-chat-launcher {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-12px);
}

.chat-header {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
}

.chat-header > div:not(.chat-avatar):not(.chat-actions) {
  min-width: 0;
}

.chat-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--success));
  border-radius: 16px;
  font-weight: 850;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.chat-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-messages {
  min-height: 190px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 22px;
}

.chat-widget-popover .chat-messages {
  min-height: 170px;
  max-height: 230px;
}

.chat-message {
  width: fit-content;
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 18px;
  font-size: 0.93rem;
  word-break: break-word;
}

.chat-message.bot {
  align-self: flex-start;
  color: #20242c;
  background: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 6px;
  box-shadow: 0 10px 24px rgba(21, 26, 34, 0.06);
}

.chat-message.bot.rich-response {
  width: min(100%, 520px);
  max-width: 92%;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(0, 113, 227, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88));
}

.chat-response-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-response-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--success));
  border-radius: 10px;
  font-weight: 850;
  line-height: 1;
}

.chat-response-title {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 850;
}

.chat-response-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.chat-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.chat-contact-link {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 13px;
  box-shadow: 0 9px 18px rgba(21, 26, 34, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.chat-contact-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.chat-contact-link:hover,
.chat-contact-link:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 24px rgba(21, 26, 34, 0.16);
}

.chat-contact-link-github {
  background: #24292f;
}

.chat-contact-link-linkedin {
  background: #0a66c2;
}

.chat-contact-link-mail {
  background: #ea4335;
}

.chat-contact-link-youtube {
  background: #ff0000;
}

.chat-message.user {
  align-self: flex-end;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-bottom-right-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.16);
}

.chat-message-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-message-link:hover,
.chat-message-link:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.chat-icon-link {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: #24292f;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(36, 41, 47, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.chat-icon-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.chat-icon-link:hover,
.chat-icon-link:focus-visible {
  background: #000000;
  box-shadow: 0 10px 22px rgba(36, 41, 47, 0.26);
  transform: translateY(-2px) scale(1.04);
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-options button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(0, 113, 227, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.chat-options button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 54px;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 50%;
  background: var(--accent);
  animation: typingPulse 0.9s ease-in-out infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.24s;
}

.messageBox {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 999px;
  box-shadow: inset 3px 3px 8px rgba(190, 190, 190, 0.34), inset -3px -3px 8px rgba(255, 255, 255, 0.92);
}

.messageBox:focus-within {
  border-color: rgba(0, 113, 227, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.09), inset 3px 3px 8px rgba(190, 190, 190, 0.24);
}

.fileUploadWrapper {
  position: relative;
  flex: 0 0 auto;
}

.fileUploadWrapper label,
.sendButton {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #6c6c6c;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.fileUploadWrapper label:hover,
.sendButton:hover {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}

.fileUploadWrapper svg {
  width: 19px;
  height: 19px;
}

.fileUploadWrapper input {
  display: none;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  width: max-content;
  padding: 6px 9px;
  color: #ffffff;
  background: #20242c;
  border-radius: 999px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fileUploadWrapper label:hover .tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.messageBox > input[type="text"] {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 0.95rem;
}

.sendButton svg {
  width: 21px;
  height: 21px;
}

.floating-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 18;
}

.floating-chat.open .chat-launcher {
  display: none;
}

.chat-widget-popover {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(380px, calc(100vw - 32px));
  max-height: min(620px, calc(100svh - 112px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.98);
  transform-origin: right bottom;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.floating-chat.open .chat-widget-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-close,
.chat-minimize {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chat-close:hover,
.chat-minimize:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.chat-minimize {
  position: relative;
}

.chat-minimize::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.site-footer {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 28px 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.dark-theme .mobile-page-menu {
  border-right-color: rgba(41, 151, 255, 0.2);
}

.dark-theme .mobile-page-menu a.active {
  color: var(--accent);
  background: rgba(41, 151, 255, 0.14);
  border-color: rgba(41, 151, 255, 0.2);
  border-left-color: rgba(41, 151, 255, 0.5);
}

.dark-theme .mobile-page-menu a {
  color: var(--accent);
  background: rgba(28, 28, 30, 0.78);
  border-color: rgba(41, 151, 255, 0.14);
  border-left-color: rgba(41, 151, 255, 0.28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.dark-theme .mobile-page-menu a:hover,
.dark-theme .mobile-page-menu a:focus-visible,
.dark-theme .mobile-page-menu a.active:hover,
.dark-theme .mobile-page-menu a.active:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.dark-theme .nav-links a:hover,
.dark-theme .nav-links a.active {
  color: #ffffff;
  background: transparent;
}

.dark-theme .button {
  --stroke-color: rgba(245, 245, 247, 0.68);
  --color-gar: linear-gradient(90deg, #2997ff, #30d158, #f5f5f7, #2997ff);
  color: rgba(245, 245, 247, 0.08);
}

.dark-theme .scroll-cue {
  border-color: rgba(41, 151, 255, 0.62);
  background: rgba(33, 33, 33, 0.92);
  box-shadow: 0 16px 36px rgba(41, 151, 255, 0.2),
    0 3px 10px rgba(0, 0, 0, 0.28);
}

.dark-theme .scroll-cue span {
  background: var(--accent);
}

.dark-theme .page-hero,
.dark-theme .section-header,
.dark-theme .site-footer {
  color: var(--text);
}

.dark-theme .site-footer {
  border-color: var(--line);
}

.dark-theme .project-showcase-card {
  --project-card-bg: #171719;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
}

.dark-theme .project-showcase-card:hover,
.dark-theme .project-showcase-card:focus-within,
.dark-theme .project-showcase-card.is-touch-active {
  box-shadow: 0 24px 52px rgba(41, 151, 255, 0.2);
}

.dark-theme .project-showcase-card .project-badges span {
  color: #171719;
}

.dark-theme .project-showcase-card .project-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.dark-theme .skill-logo {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 5px 5px 14px rgba(0, 0, 0, 0.34),
    inset -5px -5px 14px rgba(82, 82, 86, 0.36);
}

.dark-theme .chat-messages {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark-theme .chat-message.bot {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.dark-theme .chat-message.bot.rich-response {
  border-color: rgba(41, 151, 255, 0.18);
  background: linear-gradient(180deg, rgba(36, 36, 38, 0.96), rgba(28, 28, 30, 0.9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.dark-theme .chat-response-title {
  color: var(--text);
}

.dark-theme .chat-response-text {
  color: var(--muted);
}

.dark-theme .messageBox {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(41, 151, 255, 0.24);
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.32),
    inset -3px -3px 8px rgba(82, 82, 86, 0.24);
}

.dark-theme .messageBox > input[type="text"] {
  color: var(--text);
}

.dark-theme .chat-close,
.dark-theme .chat-minimize {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.dark-theme .chat-options button {
  color: var(--accent);
  border-color: rgba(41, 151, 255, 0.22);
  background: rgba(41, 151, 255, 0.1);
}

.dark-theme .chat-options button:hover {
  color: #ffffff;
  background: var(--accent);
}

.dark-theme .nav-links {
  background: transparent;
}

.dark-theme .chat-widget {
  background: #212121;
  box-shadow: 8px 8px 18px rgb(17, 17, 17),
    -5px -5px 12px rgba(55, 55, 55, 0.38);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ani {
  0% {
    background-position: 0%;
  }

  50% {
    background-position: 200%;
  }

  100% {
    background-position: 0%;
  }
}

@keyframes yalvacReveal {
  0%,
  18%,
  100% {
    width: 0%;
    border-bottom-color: transparent;
  }

  42%,
  76% {
    width: 100%;
    border-bottom-color: var(--accent);
  }
}

@keyframes pulse_414 {
  to {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes particles {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 30px 30px;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.2;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes scrollDot {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
}

@keyframes scrollDotUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px);
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
}

@keyframes typingPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .about-section,
  .skills-section,
  .projects-section {
    min-height: auto;
    align-items: start;
  }

  .skills-grid,
  .projects-grid,
  .overview-cards,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 254px;
  }
}

@media (max-width: 720px) {
  .navbar {
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .mobile-page-menu {
    left: auto;
    right: 0;
    width: 24px;
    display: flex;
    align-items: flex-end;
    min-height: auto;
    padding: 0 12px 0 0;
    border-right: 0;
    border-left: 0;
    cursor: pointer;
    touch-action: manipulation;
    transition: width 0.32s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .mobile-page-menu::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 5px;
    height: auto;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(180deg, var(--success), var(--accent));
    box-shadow: 0 12px 28px rgba(0, 113, 227, 0.2);
    transition: width 0.28s ease, box-shadow 0.28s ease, opacity 0.28s ease;
  }

  .mobile-page-menu::after {
    inset: 18px 0;
    border-radius: 12px 0 0 12px;
    opacity: 0;
    transform: translateX(12px) scaleX(0.72);
    transform-origin: right center;
    transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .mobile-page-menu a {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px) scale(0.86);
    will-change: opacity, transform;
    transition:
      opacity 0.22s ease,
      transform 0.36s cubic-bezier(0.23, 1, 0.32, 1),
      background 0.22s ease,
      color 0.22s ease,
      border-color 0.22s ease,
      box-shadow 0.28s ease;
  }

  .mobile-page-menu.is-open {
    width: 62px;
  }

  .mobile-page-menu.is-open::before {
    width: 6px;
    box-shadow: 0 16px 34px rgba(0, 113, 227, 0.28);
  }

  .mobile-page-menu.is-open::after {
    opacity: 0.5;
    transform: translateX(0) scaleX(1);
  }

  .mobile-page-menu.is-open a {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
  }

  .mobile-page-menu a:hover,
  .mobile-page-menu a:focus-visible {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 113, 227, 0.1);
    border-left-color: rgba(0, 113, 227, 0.22);
    box-shadow: 0 8px 18px rgba(21, 26, 34, 0.08);
  }

  .mobile-page-menu a.active,
  .mobile-page-menu a.active:hover,
  .mobile-page-menu a.active:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: rgba(0, 113, 227, 0.34);
    box-shadow: 0 12px 26px rgba(0, 113, 227, 0.2);
  }

  .dark-theme .mobile-page-menu a:hover,
  .dark-theme .mobile-page-menu a:focus-visible {
    color: var(--accent);
    background: rgba(28, 28, 30, 0.78);
    border-color: rgba(41, 151, 255, 0.14);
    border-left-color: rgba(41, 151, 255, 0.28);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  }

  .dark-theme .mobile-page-menu a.active,
  .dark-theme .mobile-page-menu a.active:hover,
  .dark-theme .mobile-page-menu a.active:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: rgba(41, 151, 255, 0.34);
    box-shadow: 0 12px 26px rgba(0, 113, 227, 0.24);
  }

  .mobile-page-menu.is-open a:nth-child(1) {
    transition-delay: 0.02s;
  }

  .mobile-page-menu.is-open a:nth-child(2) {
    transition-delay: 0.05s;
  }

  .mobile-page-menu.is-open a:nth-child(3) {
    transition-delay: 0.08s;
  }

  .mobile-page-menu.is-open a:nth-child(4) {
    transition-delay: 0.11s;
  }

  .mobile-page-menu.is-open a:nth-child(5) {
    transition-delay: 0.14s;
  }

  .mobile-page-menu:not(.is-open) a {
    transition-delay: 0s;
  }

  .mobile-page-menu a:hover,
  .mobile-page-menu a:focus-visible,
  .mobile-page-menu a.active:hover,
  .mobile-page-menu a.active:focus-visible {
    width: 42px;
  }

  .mobile-page-menu a:hover span,
  .mobile-page-menu a:focus-visible span {
    opacity: 0;
    transform: translateX(8px);
  }

  .nav-actions {
    gap: 8px;
  }

  .theme-toggle,
  .theme-toggle-track {
    width: 50px;
    height: 28px;
  }

  .theme-toggle-track::before,
  .theme-toggle-track::after {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .section {
    width: min(100% - 24px, var(--max-width));
    padding: 82px 0;
  }

  .page-hero {
    width: min(100% - 24px, var(--max-width));
    padding: 76px 0 24px;
  }

  .hero {
    padding-top: 96px;
  }

  .btn {
    width: 100%;
  }

  .about-copy,
  .contact-card,
  .mini-card,
  .skill-card {
    padding: 20px;
  }

  .about-hover-card.about-timeline-card {
    min-height: 296px;
  }

  .about-hover-card.about-timeline-card .front-content {
    min-height: 256px;
  }

  .about-hover-card.about-timeline-card .content {
    gap: 12px;
    padding: 24px 20px 26px;
  }

  .timeline-list {
    --timeline-time-col: 66px;
    --timeline-gap: 36px;
    gap: 12px;
  }

  .timeline-list p {
    padding: 9px 10px;
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .project-showcase-card {
    width: min(100%, 280px);
  }

  .project-showcase-card .bottom-section {
    padding: 10px 7px 12px;
  }

  .chat-section {
    padding-top: 72px;
  }

  .home-chat-section {
    min-height: 74svh;
    padding-top: 8svh;
    padding-bottom: 48px;
  }

  .chat-widget {
    padding: 20px;
  }

  .chat-header {
    grid-template-columns: 40px 1fr auto;
  }

  .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .chat-messages {
    min-height: 170px;
    max-height: 250px;
    padding: 12px;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-options {
    gap: 7px;
  }

  .floating-chat {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .scroll-cue {
    bottom: calc(28px + env(safe-area-inset-bottom));
    width: 32px;
    height: 52px;
  }

  .scroll-cue.to-top {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .page-main ~ .scroll-cue {
    left: 50%;
  }

  .holographic-stack {
    gap: 18px;
  }

  .holographic-icon {
    width: 66px;
    height: 66px;
  }

  .holographic-icon svg {
    width: 32px;
    height: 32px;
  }

  .assistant-launch-item:hover,
  .assistant-launch-item:focus-visible {
    width: 200px;
  }

  .chat-widget-popover {
    bottom: 0;
    width: calc(100vw - 32px);
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 420px) {
  .mobile-page-menu {
    right: 0;
  }

  .about-hover-card.about-timeline-card {
    min-height: 318px;
  }

  .about-hover-card.about-timeline-card .content {
    padding: 24px 16px 26px;
  }

  .timeline-list {
    --timeline-time-col: 58px;
    --timeline-gap: 34px;
  }

  .timeline-list time {
    font-size: 0.68rem;
  }

  .timeline-list p {
    font-size: 0.78rem;
  }

  .mobile-page-menu a:hover,
  .mobile-page-menu a:focus-visible,
  .mobile-page-menu a.active:hover,
  .mobile-page-menu a.active:focus-visible {
    width: 42px;
  }
}

