:root {
  --paper: #fbf7ef;
  --paper-strong: #f0eadf;
  --ink: #161616;
  --muted: #645f58;
  --line: rgba(22, 22, 22, 0.14);
  --teal: #0c6f68;
  --teal-dark: #07443f;
  --amber: #c4882b;
  --wine: #7a2638;
  --blue: #1c6e8c;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(28, 22, 14, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(115deg, rgba(12, 111, 104, 0.08), transparent 34%),
    linear-gradient(245deg, rgba(196, 136, 43, 0.09), transparent 38%),
    repeating-linear-gradient(90deg, rgba(22, 22, 22, 0.025) 0 1px, transparent 1px 82px);
}

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

a {
  color: inherit;
}

a[target="_blank"] {
  text-underline-offset: 0.18em;
}

button,
input,
textarea {
  font: inherit;
}

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

.skip-link:focus {
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--white);
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  color: var(--white);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(251, 247, 239, 0.92);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.94rem;
}

.nav a,
.mobile-nav a,
.footer a {
  text-decoration: none;
}

.nav a:hover,
.mobile-nav a:hover,
.footer a:hover {
  color: var(--amber);
}

.hero-panel a,
.project-card h3 a,
.timeline h3 a,
.intro-copy a,
.signal-list a,
.cv-feature a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.mobile-nav {
  position: fixed;
  z-index: 19;
  top: 76px;
  left: 16px;
  right: 16px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  background: rgba(251, 247, 239, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-nav a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero {
  position: relative;
  min-height: 96vh;
  display: grid;
  align-items: end;
  padding: 132px clamp(20px, 5vw, 72px) 36px;
  color: var(--white);
  overflow: hidden;
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 23%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 16, 18, 0.88) 0%, rgba(12, 16, 18, 0.62) 44%, rgba(12, 16, 18, 0.2) 100%),
    linear-gradient(0deg, rgba(12, 16, 18, 0.72), rgba(12, 16, 18, 0.05) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 9vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.button,
.filter-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--amber);
  color: #18130b;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border-color: currentColor;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: var(--max);
  width: 100%;
  margin: 54px auto 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.hero-panel div {
  min-height: 124px;
  padding: 22px;
  background: rgba(17, 17, 17, 0.28);
}

.metric {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 900;
}

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px clamp(20px, 4vw, 36px);
}

.intro-section {
  max-width: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(12, 111, 104, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(251, 247, 239, 0.2));
}

.intro-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.projects-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  background:
    linear-gradient(135deg, rgba(196, 136, 43, 0.12), transparent 34%),
    repeating-linear-gradient(135deg, rgba(12, 111, 104, 0.04) 0 2px, transparent 2px 18px),
    var(--paper);
}

.projects-section > * {
  max-width: var(--max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.experience-section {
  max-width: none;
  background:
    linear-gradient(90deg, rgba(122, 38, 56, 0.1), transparent 32%),
    linear-gradient(180deg, #fffdfa, var(--paper-strong));
}

.experience-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.cv-section {
  max-width: none;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(28, 110, 140, 0.28), transparent 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 74px),
    #111616;
}

.cv-section::before {
  position: absolute;
  inset: auto -20% 8% -20%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(196, 136, 43, 0.8), transparent);
  animation: scan-line 8s linear infinite;
}

.cv-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.social-section {
  max-width: none;
  background:
    linear-gradient(180deg, #f8f0e3, #fffdfa 46%, #e9f1ed),
    repeating-linear-gradient(0deg, rgba(22, 22, 22, 0.04) 0 1px, transparent 1px 28px);
}

.social-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  max-width: 870px;
  margin-bottom: 38px;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-grid,
.ai-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(26px, 5vw, 52px);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.intro-copy p {
  width: min(900px, 100%);
  max-width: 900px;
  color: var(--muted);
  font-size: 1.08rem;
}

.profile-tags,
.tech-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.intro-copy .profile-tags {
  width: min(900px, 100%);
}

.profile-tags span,
.tech-row span {
  padding: 8px 10px;
  background: var(--paper-strong);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-links,
.social-strip,
.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-links a,
.social-strip a,
.contact-socials a {
  padding: 8px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.project-links a {
  color: var(--teal-dark);
}

.project-card.featured .project-links a {
  color: rgba(255, 255, 255, 0.86);
}

.social-strip {
  margin-top: 24px;
}

.social-strip a {
  color: var(--white);
}

.portrait-card {
  min-height: 520px;
  display: grid;
  align-content: end;
  overflow: hidden;
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow);
}

.portrait-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.portrait-card div {
  padding: 24px;
  background: var(--teal-dark);
}

.portrait-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
}

.ai-section {
  max-width: none;
  background: #10100f;
  color: var(--white);
}

.ai-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.ai-layout {
  align-items: start;
}

.ai-card {
  padding: 22px;
  background: #191817;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.ai-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #54c788;
  box-shadow: 0 0 0 6px rgba(84, 199, 136, 0.12);
}

.chat-window {
  height: 286px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #0c0c0b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.9);
}

.message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
}

.message.user {
  align-self: flex-end;
  background: var(--teal);
}

.chat-form {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px 48px;
  gap: 10px;
  margin-top: 12px;
}

.chat-form input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.chat-form input {
  min-height: 48px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.icon-button,
.voice-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-button {
  border: 0;
  background: var(--amber);
  color: #1d1409;
}

.voice-button {
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(64, 217, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
}

.voice-button:hover,
.voice-button.is-listening {
  color: #061014;
  background: linear-gradient(135deg, #2ee7d1, #40d9ff);
}

.icon-button svg,
.voice-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.signal-list {
  display: grid;
  gap: 14px;
}

.signal-list article,
.skills-grid article {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.signal-list span {
  color: var(--amber);
  font-weight: 900;
}

.signal-list p,
.skills-grid p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-button {
  padding: 0 14px;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 800;
}

.filter-button.active {
  background: var(--ink);
  color: var(--white);
}

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

.projects-section .section-heading {
  order: 1;
}

.project-toolbar {
  order: 2;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-card.is-hidden {
  display: none;
}

.project-card.featured {
  grid-column: span 2;
  background: var(--teal-dark);
  color: var(--white);
}

.project-card.featured .tech-row span {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.project-card p,
.project-card li {
  color: var(--muted);
}

.project-card.featured p,
.project-card.featured li {
  color: rgba(255, 255, 255, 0.78);
}

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

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-carousel {
  order: 4;
  position: relative;
  width: min(100%, var(--max));
  margin: 34px auto 0;
  padding: 16px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(46, 231, 209, 0.08), rgba(255, 184, 77, 0.06)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.project-carousel::before,
.project-carousel::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: min(90px, 12vw);
  content: "";
  pointer-events: none;
}

.project-carousel::before {
  left: 0;
  background: linear-gradient(90deg, #07090e, transparent);
}

.project-carousel::after {
  right: 0;
  background: linear-gradient(270deg, #07090e, transparent);
}

.carousel-heading {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 clamp(16px, 3vw, 24px) 12px;
  text-align: center;
}

.carousel-heading .eyebrow {
  margin: 0;
}

.carousel-heading h3 {
  max-width: 540px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.2;
}

.project-logo-marquee {
  overflow: hidden;
}

.project-logo-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 0 12px;
  animation: project-marquee 34s linear infinite;
}

.project-logo-marquee:hover .project-logo-track,
.project-logo-card:focus-within ~ .project-logo-track {
  animation-play-state: paused;
}

.project-logo-track:hover {
  animation-play-state: paused;
}

.project-logo-card {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(130px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  min-width: 250px;
  min-height: 88px;
  padding: 14px;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-logo-card:hover,
.project-logo-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(46, 231, 209, 0.48);
  background: rgba(46, 231, 209, 0.12);
  outline: none;
}

.project-logo-card > span:not(.logo-mark) {
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.05;
}

.project-logo-card small {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.logo-mark {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #041010;
  border-radius: 14px;
  background: linear-gradient(135deg, #2ee7d1, #ffb84d);
  font-size: 0.95rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-mark {
  padding: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.dialogue-logo .logo-mark:not(.image-mark) {
  color: #fff;
  background: linear-gradient(135deg, #0c6f68, #1c6e8c);
}

.norsud-logo .logo-mark:not(.image-mark) {
  color: #fff;
  background: linear-gradient(135deg, #7a2638, #c4882b);
}

.hoolsy-logo .logo-mark {
  background: #fff;
}

.hoolsy-mark {
  position: relative;
  display: flex;
  gap: 4px;
  border-radius: 50%;
}

.hoolsy-mark::before {
  position: absolute;
  inset: 10px;
  content: "";
  border-radius: 50%;
  background: #ef1d2f;
}

.hoolsy-mark span {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
}

.medical-logo .logo-mark {
  color: #fff;
  background: linear-gradient(135deg, #1c6e8c, #0c6f68);
}

.search-logo .logo-mark {
  background: linear-gradient(135deg, #40d9ff, #2ee7d1);
}

.web-logo .logo-mark {
  color: #fff;
  background: linear-gradient(135deg, #2b2f3d, #0c6f68);
}

.civic-logo .logo-mark {
  color: #fff;
  background: linear-gradient(135deg, #c4882b, #7a2638);
}

@keyframes project-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 7px));
  }
}

.visual-band {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 72px clamp(20px, 6vw, 80px);
  background: var(--teal-dark);
  color: var(--white);
}

.visual-band img {
  width: 100%;
  height: min(620px, 70vh);
  object-fit: cover;
  border-radius: var(--radius);
}

.visual-band p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

.timeline {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline article {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 26px;
  background: var(--white);
}

.timeline time {
  color: var(--wine);
  font-weight: 900;
}

.timeline p {
  margin-bottom: 0;
  color: var(--muted);
}

.skills-section {
  max-width: none;
  background: #2d2421;
  color: var(--white);
}

.skills-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

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

.skills-grid article {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    background 260ms ease;
}

.skills-grid article::before,
.skills-grid article::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.skills-grid article::before {
  inset: -65%;
  z-index: 0;
  opacity: 0.24;
  background:
    conic-gradient(
      from 0deg,
      transparent,
      rgba(46, 231, 209, 0.42),
      rgba(255, 184, 77, 0.38),
      transparent 46%
    );
  animation: skill-orbit 8s linear infinite;
}

.skills-grid article::after {
  inset: 1px;
  z-index: 1;
  border-radius: calc(var(--radius) - 1px);
  background:
    radial-gradient(circle at 20% 0%, rgba(46, 231, 209, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.035);
  transition: background 260ms ease, opacity 260ms ease;
}

.skills-grid article:nth-child(2)::before {
  animation-delay: -2s;
}

.skills-grid article:nth-child(3)::before {
  animation-delay: -4s;
}

.skills-grid article:nth-child(4)::before {
  animation-delay: -6s;
}

.skills-grid article h3,
.skills-grid article p {
  position: relative;
  z-index: 2;
}

.skills-grid article:hover,
.skills-grid article:focus-within {
  transform: translateY(-10px) scale(1.018);
  border-color: rgba(46, 231, 209, 0.72);
  background:
    linear-gradient(135deg, rgba(46, 231, 209, 0.2), rgba(255, 184, 77, 0.12)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.36),
    0 0 42px rgba(46, 231, 209, 0.18);
}

.skills-grid article:hover::before,
.skills-grid article:focus-within::before {
  opacity: 0.56;
  animation-duration: 3.8s;
}

.skills-grid article:hover::after,
.skills-grid article:focus-within::after {
  background:
    radial-gradient(circle at 15% 12%, rgba(46, 231, 209, 0.26), transparent 34%),
    linear-gradient(135deg, rgba(255, 184, 77, 0.14), rgba(64, 217, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
}

.skills-grid article:hover h3,
.skills-grid article:focus-within h3 {
  color: var(--amber);
}

.skills-grid article:hover p,
.skills-grid article:focus-within p {
  color: rgba(255, 255, 255, 0.9);
}

@keyframes skill-orbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.cv-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.cv-feature {
  display: none;
  min-height: 560px;
  padding: clamp(26px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.cv-feature.active {
  display: flex;
  flex-direction: column;
  animation: rise-in 360ms ease both;
}

.cv-label {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-feature h3 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.98;
}

.cv-feature p,
.cv-feature li {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.cv-feature ul {
  display: grid;
  gap: 12px;
  margin: 10px 0 30px;
  padding-left: 20px;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.cv-switcher {
  display: grid;
  gap: 12px;
}

.cv-tab {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
  color: var(--white);
  text-align: left;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  cursor: pointer;
}

.cv-tab.active,
.cv-tab:hover {
  background: var(--amber);
  color: #19130b;
}

.cv-tab span {
  font-weight: 900;
}

.cv-tab small {
  color: inherit;
  opacity: 0.76;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.social-grid a {
  min-height: 160px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(28, 22, 14, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.social-grid a:hover {
  transform: translateY(-4px);
  background: var(--teal-dark);
  color: var(--white);
}

.social-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.social-grid strong {
  font-size: 1.28rem;
}

.contact-section {
  max-width: none;
  padding-bottom: 70px;
  background:
    linear-gradient(135deg, rgba(12, 111, 104, 0.12), transparent 44%),
    linear-gradient(0deg, #fbf7ef, #ffffff);
}

.contact-section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-content: start;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(12, 111, 104, 0.22), transparent 38%),
    var(--ink);
  border-radius: var(--radius);
  color: var(--white);
  min-height: 360px;
}

.contact-card img {
  grid-row: span 4;
  width: 130px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.contact-socials {
  grid-column: 2;
}

.contact-socials a {
  color: rgba(255, 255, 255, 0.82);
}

.contact-card p {
  margin-bottom: 2px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-card a,
.contact-card span {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.contact-form {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
}

.contact-form textarea {
  resize: vertical;
}

.form-actions {
  justify-content: flex-end;
}

.contact-form .button-secondary {
  color: var(--teal-dark);
  border-color: var(--teal);
}

.form-note {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--white);
  background: var(--ink);
}

.footer p {
  margin-bottom: 0;
}

.footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-panel,
  .intro-grid,
  .ai-layout,
  .visual-band,
  .contact-layout,
  .cv-showcase {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .skills-grid,
  .social-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card.featured {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 16px;
  }

  .hero {
    min-height: 100vh;
    padding: 112px 18px 24px;
  }

  .hero-media img {
    object-position: 61% 18%;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.42)),
      linear-gradient(90deg, rgba(10, 10, 10, 0.68), rgba(10, 10, 10, 0.14));
  }

  .hero-actions,
  .form-actions,
  .field-row,
  .footer {
    flex-direction: column;
    display: flex;
  }

  .button,
  .form-actions button {
    width: 100%;
  }

  .hero-panel,
  .project-grid,
  .skills-grid,
  .social-grid,
  .cv-showcase,
  .timeline article,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    min-height: auto;
  }

  .project-card,
  .project-card.featured {
    grid-column: auto;
  }

  .visual-band {
    padding: 54px 18px;
  }

  .contact-card img {
    grid-row: auto;
  }

  .contact-socials {
    grid-column: auto;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-line {
  from {
    transform: translateX(-20%);
  }

  to {
    transform: translateX(20%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

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

/* AI portfolio redesign */
:root {
  --paper: #080b12;
  --paper-strong: #10141e;
  --ink: #f5f7fb;
  --muted: #a8afbd;
  --line: rgba(255, 255, 255, 0.13);
  --teal: #2ee7d1;
  --teal-dark: #062f34;
  --amber: #ffb84d;
  --wine: #e15c77;
  --blue: #40d9ff;
  --white: #ffffff;
  --shadow: 0 28px 100px rgba(0, 0, 0, 0.42);
}

body {
  color: var(--ink);
  background: #05070b;
}

body.zoomed-out-guard {
  zoom: var(--zoom-boost, 1);
}

body::before {
  z-index: -2;
  background:
    radial-gradient(circle at 14% 18%, rgba(64, 217, 255, 0.18), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(255, 184, 77, 0.15), transparent 30%),
    linear-gradient(115deg, rgba(5, 7, 11, 1), rgba(12, 19, 31, 0.98));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent 82%);
  animation: grid-drift 16s linear infinite;
}

.site-header {
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(5, 7, 11, 0.72), rgba(5, 7, 11, 0.28));
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  color: var(--white);
  background: rgba(5, 7, 11, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
}

.brand-mark {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow: 0 0 28px rgba(64, 217, 255, 0.24);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav a {
  color: rgba(255, 255, 255, 0.76);
}

.nav a:hover {
  color: var(--amber);
}

.language-switcher,
.mobile-languages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.language-switcher button,
.mobile-languages button {
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.language-switcher button.active,
.mobile-languages button.active {
  color: #061014;
  background: var(--amber);
}

.side-rail {
  position: fixed;
  z-index: 18;
  left: 22px;
  top: 38%;
  display: grid;
  gap: 16px;
  justify-items: center;
  color: rgba(255, 255, 255, 0.78);
}

.side-rail a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.side-rail a:hover {
  color: #051014;
  background: var(--amber);
}

.rail-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.55), transparent);
}

.hero {
  min-height: 100vh;
  align-items: center;
  padding-left: clamp(24px, 8vw, 136px);
  background: #05070b;
}

.ai-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.88;
}

.hero-media {
  left: auto;
  width: min(48vw, 760px);
  opacity: 0.72;
  mix-blend-mode: luminosity;
  filter: contrast(1.05) brightness(0.75);
  mask-image: linear-gradient(90deg, transparent, #000 24%, #000);
}

.hero-media img {
  object-position: 54% 22%;
}

.hero-overlay {
  z-index: 0;
  background:
    linear-gradient(90deg, #05070b 0%, rgba(5, 7, 11, 0.96) 42%, rgba(5, 7, 11, 0.42) 100%),
    radial-gradient(circle at 28% 44%, rgba(46, 231, 209, 0.17), transparent 32%),
    linear-gradient(0deg, rgba(5, 7, 11, 0.95), transparent 45%);
}

.hero-content,
.hero-panel {
  z-index: 2;
}

h1 {
  max-width: 1080px;
  font-size: clamp(3.4rem, 8vw, 7.9rem);
  text-wrap: balance;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.78);
}

.button,
.filter-button {
  border-radius: 4px;
}

.button-primary {
  background: linear-gradient(135deg, var(--amber), #ff8f3d);
  color: #06070a;
  box-shadow: 0 0 38px rgba(255, 184, 77, 0.22);
}

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.hero-panel div {
  background: rgba(6, 14, 24, 0.74);
}

.metric {
  color: var(--blue);
}

.section {
  padding-top: 118px;
  padding-bottom: 118px;
}

.section-heading {
  position: relative;
}

.section-heading::before {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 1px;
  height: 64px;
  content: "";
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.72), transparent);
}

.intro-section,
.projects-section,
.experience-section,
.skills-section,
.social-section,
.contact-section,
.ai-section,
.cv-section {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 0%, rgba(64, 217, 255, 0.12), transparent 30%),
    linear-gradient(135deg, #0b0f18, #07090e 56%, #11121a);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.projects-section {
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 184, 77, 0.15), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 88px),
    #07090e;
}

.experience-section {
  background:
    linear-gradient(120deg, rgba(225, 92, 119, 0.12), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 72px),
    #090b10;
}

.skills-section {
  background:
    radial-gradient(circle at 30% 20%, rgba(46, 231, 209, 0.16), transparent 24%),
    linear-gradient(160deg, #0a0d14, #17161d);
}

.social-section {
  background:
    linear-gradient(115deg, rgba(255, 184, 77, 0.12), transparent 35%),
    linear-gradient(180deg, #080b12, #0c1018);
}

.contact-section {
  background:
    radial-gradient(circle at 78% 10%, rgba(46, 231, 209, 0.13), transparent 26%),
    #080b12;
}

.intro-copy,
.project-card,
.timeline article,
.social-grid a,
.contact-form {
  color: var(--white);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.intro-copy p,
.project-card p,
.project-card li,
.timeline p,
.contact-form label {
  color: rgba(255, 255, 255, 0.7);
}

.portrait-card,
.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #05070b;
  box-shadow: var(--shadow);
}

.portrait-card div {
  background: linear-gradient(135deg, rgba(64, 217, 255, 0.22), rgba(255, 184, 77, 0.1));
}

.profile-tags span,
.tech-row span {
  color: #d9fffb;
  background: rgba(46, 231, 209, 0.12);
  border: 1px solid rgba(46, 231, 209, 0.2);
}

.ai-section {
  overflow: hidden;
}

.ai-section::before,
.projects-section::before,
.skills-section::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(64, 217, 255, 0.12) 48%, transparent 52%),
    linear-gradient(180deg, transparent, rgba(255, 184, 77, 0.07), transparent);
  transform: translateX(-60%);
  animation: scan-wide 10s ease-in-out infinite;
}

.ai-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(46, 231, 209, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.ai-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(64, 217, 255, 0.22), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  opacity: 0.65;
}

.ai-card > * {
  position: relative;
  z-index: 1;
}

.chat-window {
  min-height: 342px;
  background: rgba(5, 7, 11, 0.82);
  border-color: rgba(64, 217, 255, 0.2);
}

.message {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.assistant {
  background: rgba(255, 255, 255, 0.08);
}

.message.user {
  color: #041010;
  background: linear-gradient(135deg, #2ee7d1, #40d9ff);
  font-weight: 800;
}

.visitor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.visitor-fields label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.visitor-fields input,
.chat-form input,
.contact-form input,
.contact-form textarea {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.chat-privacy {
  min-height: 24px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
}

.signal-list article,
.skills-grid article {
  background:
    linear-gradient(135deg, rgba(64, 217, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.filter-button {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
}

.filter-button.active {
  color: #061014;
  background: var(--amber);
}

.project-card.featured {
  background:
    linear-gradient(135deg, rgba(46, 231, 209, 0.22), transparent 44%),
    #071b20;
}

.project-card:hover,
.social-grid a:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.project-links a {
  color: #d8fffb;
}

.visual-band {
  background:
    linear-gradient(90deg, #05070b 0%, rgba(5, 7, 11, 0.8) 42%, rgba(5, 7, 11, 0.4)),
    radial-gradient(circle at 70% 20%, rgba(255, 184, 77, 0.18), transparent 30%),
    #071418;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visual-band img {
  filter: grayscale(0.25) contrast(1.05);
  box-shadow: var(--shadow);
}

.timeline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.timeline time,
.social-grid span,
.contact-card p,
.cv-label {
  color: var(--amber);
}

.social-grid a {
  min-height: 178px;
}

.social-grid a:hover {
  color: #041010;
  background: linear-gradient(135deg, #2ee7d1, #40d9ff);
}

.contact-card {
  background:
    linear-gradient(145deg, rgba(64, 217, 255, 0.16), transparent 42%),
    #05070b;
}

.contact-card img {
  border-radius: 50%;
  border: 2px solid rgba(255, 184, 77, 0.85);
  box-shadow: 0 0 36px rgba(255, 184, 77, 0.2);
}

.contact-form {
  background:
    linear-gradient(135deg, rgba(255, 184, 77, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.055);
}

.form-note {
  color: var(--blue);
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #040508;
}

.assistant-widget {
  position: fixed;
  right: clamp(18px, 4vw, 48px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 90;
  display: grid;
  justify-items: end;
  gap: 14px;
  pointer-events: none;
}

.assistant-launcher,
.assistant-panel {
  pointer-events: auto;
}

.assistant-launcher {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 258px;
  min-height: 82px;
  padding: 12px 24px 12px 14px;
  border: 1px solid rgba(64, 217, 255, 0.24);
  border-radius: 999px;
  color: var(--white);
  background:
    radial-gradient(circle at 24% 28%, rgba(64, 217, 255, 0.34), transparent 34%),
    linear-gradient(135deg, #083246, #082734 48%, #2e3f38);
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.62), 0 0 34px rgba(64, 217, 255, 0.12);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  cursor: pointer;
  transform-origin: right bottom;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.assistant-launcher::after {
  position: absolute;
  inset: -8px;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(64, 217, 255, 0.12), rgba(255, 184, 77, 0.08));
  filter: blur(20px);
  opacity: 0.55;
  animation: assistant-pulse 3.6s ease-in-out infinite;
}

.assistant-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(64, 217, 255, 0.58);
  box-shadow: 0 30px 86px rgba(0, 0, 0, 0.7), 0 0 48px rgba(64, 217, 255, 0.18);
}

.assistant-launcher-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 24px rgba(64, 217, 255, 0.14);
  font-size: 1.45rem;
  letter-spacing: 0;
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 98px;
  width: min(430px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 132px));
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(64, 217, 255, 0.18);
  border-radius: 22px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 0%, rgba(64, 217, 255, 0.1), transparent 36%),
    radial-gradient(circle at 100% 22%, rgba(255, 184, 77, 0.07), transparent 34%),
    linear-gradient(135deg, rgba(3, 8, 13, 0.98), rgba(5, 7, 11, 0.985) 54%, rgba(10, 9, 9, 0.98));
  box-shadow: 0 32px 92px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transform-origin: right bottom;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  backdrop-filter: blur(22px);
}

.assistant-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.assistant-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.assistant-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.assistant-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.assistant-panel-header p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
}

.assistant-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.assistant-close span {
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--white);
}

.assistant-close span:first-child {
  transform: rotate(45deg);
}

.assistant-close span:last-child {
  transform: rotate(-45deg);
}

.assistant-chat-window {
  min-height: 260px;
  max-height: 330px;
}

.assistant-visitor-fields {
  grid-template-columns: 1fr 1fr;
}

.assistant-panel .chat-form {
  margin-top: 0;
}

@keyframes assistant-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.98);
  }

  50% {
    opacity: 0.95;
    transform: scale(1.03);
  }
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 68px 68px, 68px 68px;
  }
}

@keyframes scan-wide {
  0% {
    transform: translateX(-70%);
    opacity: 0;
  }

  45%,
  55% {
    opacity: 1;
  }

  100% {
    transform: translateX(70%);
  }
}

@media (max-width: 1120px) {
  .language-switcher {
    display: none;
  }

  .side-rail {
    display: none;
  }

  .section-heading::before {
    display: none;
  }
}

@media (max-width: 680px) {
  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }

  .assistant-launcher {
    min-width: 218px;
    min-height: 68px;
    gap: 12px;
    padding: 10px 18px 10px 10px;
    font-size: 1rem;
  }

  .assistant-launcher-badge {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .assistant-panel {
    bottom: 84px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 106px);
    border-radius: 18px;
  }

  .assistant-visitor-fields {
    grid-template-columns: 1fr;
  }

  .hero-media {
    width: 100%;
    opacity: 0.42;
    mask-image: linear-gradient(0deg, #000, transparent 82%);
  }

  .visitor-fields {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .mobile-nav {
    background: rgba(5, 7, 11, 0.96);
  }

  .mobile-languages {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .hero-content,
html[dir="rtl"] .section-heading,
html[dir="rtl"] .intro-copy,
html[dir="rtl"] .project-card,
html[dir="rtl"] .timeline article,
html[dir="rtl"] .cv-feature,
html[dir="rtl"] .contact-card,
html[dir="rtl"] .contact-form {
  direction: rtl;
}

html[dir="rtl"] .hero-actions,
html[dir="rtl"] .profile-tags,
html[dir="rtl"] .tech-row,
html[dir="rtl"] .project-toolbar,
html[dir="rtl"] .project-links,
html[dir="rtl"] .social-strip,
html[dir="rtl"] .contact-socials,
html[dir="rtl"] .form-actions,
html[dir="rtl"] .footer {
  flex-direction: row-reverse;
}

html[dir="rtl"] .intro-copy {
  text-align: right;
}

html[dir="rtl"] .timeline article {
  grid-template-columns: 1fr 180px;
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .ai-section::before,
  .projects-section::before,
  .skills-section::before,
  .assistant-launcher::after,
  .project-logo-track,
  .skills-grid article::before {
    animation: none !important;
  }

  .skills-grid article:hover,
  .skills-grid article:focus-within {
    transform: none;
  }
}
