:root {
  --ink: #1a2025;
  --paper: #ffffff;
  --soft: #eeeeee;
  --muted: rgba(26, 32, 37, 0.64);
  --glass: rgba(255, 255, 255, 0.74);
  --border: rgba(26, 32, 37, 0.12);
}

/* Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
}

/* Navbar */
.floating-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 50px rgba(26, 32, 37, 0.08);
  backdrop-filter: blur(22px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px) scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

.floating-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.floating-nav a {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 16px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.floating-nav a.is-active {
  color: #000000;
}

.floating-nav a:hover,
.floating-nav a:focus-visible {
  color: #ffffff;
  background: rgba(26, 32, 37, 0.78);
  outline: none;
  transform: translateY(-1px);
}

.nav-light {
  position: absolute;
  bottom: 5px;
  left: 0;
  z-index: 1;
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.95),
    0 0 26px rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 260ms ease, width 260ms ease;
}

.floating-nav.is-visible .nav-light {
  opacity: 1;
}

/* Notification */
.site-notification {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  width: min(calc(100% - 28px), 520px);
  padding: 14px 16px;
  color: var(--ink);
  line-height: 1.45;
  text-align: center;
  border: 1px solid rgba(26, 32, 37, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 50px rgba(26, 32, 37, 0.14);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.site-notification.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

button,
input {
  font: inherit;
}

/* Header */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
  background: #ffffff;
}

.chat-video,
.chat-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chat-video {
  object-fit: cover;
  z-index: -3;
  background:
    radial-gradient(circle at 18% 20%, rgba(238, 238, 238, 0.96), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #eeeeee 45%, #d7dde2 100%);
}

.chat-video-mobile {
  display: none;
}

.chat-gradient {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.34) 42%, rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.18), rgba(26, 32, 37, 0.18));
}

.hero-content {
  width: 100%;
  min-height: calc(100svh - 40px);
}

/* Header Typography */
.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  color: #000000;
  font-size: clamp(3.5rem, 8vw, 7.8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-subtitle {
  width: min(100%, 560px);
  margin: 16px 0 0;
  color: rgba(26, 32, 37, 0.72);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

/* Header Chatbox */
.chat-panel {
  position: relative;
  min-height: calc(100svh - 40px);
  width: 100%;
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 20%, rgba(238, 238, 238, 0.96), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #eeeeee 45%, #d7dde2 100%);
  box-shadow: 0 28px 80px rgba(26, 32, 37, 0.16);
  backdrop-filter: blur(22px);
  isolation: isolate;
}

.chat-intro {
  display: grid;
  justify-items: center;
  text-align: center;
}

.chat-shell {
  width: 100%;
  min-height: calc(100svh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(14px, 2.4vh, 28px);
  padding: clamp(28px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
}

.chat-body {
  width: min(100%, 1120px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  justify-self: center;
  gap: 14px;
  min-height: 0;
}

.chat-footer {
  width: min(100%, 1120px);
  display: grid;
  justify-self: center;
  gap: 16px;
}

.chat-output {
  min-height: 150px;
  max-height: clamp(170px, 28vh, 270px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
  overflow: hidden;
  padding: 14px;
  text-align: left;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.message {
  max-width: min(78%, 620px);
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.5;
  box-shadow: 0 10px 26px rgba(26, 32, 37, 0.08);
}

.bot-message {
  align-self: flex-start;
  color: var(--ink);
  background: rgba(238, 238, 238, 0.9);
}

.user-message {
  align-self: flex-end;
  color: #ffffff;
  background: var(--ink);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  position: relative;
  min-height: clamp(76px, 9vh, 112px);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(26, 32, 37, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(26, 32, 37, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.quick-card::before {
  content: "";
  position: absolute;
  left: var(--hover-x, 50%);
  top: var(--hover-y, 50%);
  width: 0;
  height: 0;
  border-radius: 999px;
  background: rgba(26, 32, 37, 0.1);
  transform: translate(-50%, -50%);
  transition: width 360ms ease, height 360ms ease;
}

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

.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(26, 32, 37, 0.32);
  background: #ffffff;
  outline: none;
}

.quick-card:hover::before,
.quick-card:focus-visible::before {
  width: 240%;
  height: 240%;
}

.quick-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid rgba(26, 32, 37, 0.18);
  border-radius: 999px;
}

.avatar-icon {
  font-size: 0.66rem;
  letter-spacing: 0;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-form input {
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid rgba(26, 32, 37, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.chat-form input:focus {
  border-color: rgba(26, 32, 37, 0.46);
}

.chat-form button,
.prompt-row button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.chat-form button {
  height: 50px;
  padding: 0 20px;
  color: #ffffff;
  border-radius: 8px;
  background: var(--ink);
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-row button {
  padding: 9px 12px;
  color: var(--ink);
  border-radius: 999px;
  background: var(--soft);
}

.chat-form button:hover,
.prompt-row button:hover {
  transform: translateY(-2px);
}

/* Projects */
.projects-section {
  min-height: 100svh;
  padding: clamp(58px, 7vw, 92px) 0;
  overflow: hidden;
  color: #ffffff;
  background: var(--ink);
}

.section-heading {
  width: min(100%, 1180px);
  margin: 0 auto clamp(20px, 3.5vw, 36px);
}

.section-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(3.2rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.project-carousel {
  position: relative;
  width: 100%;
  min-height: clamp(360px, 46vw, 540px);
  display: grid;
  align-items: center;
}

.project-track {
  position: relative;
  height: clamp(340px, 42vw, 500px);
  touch-action: pan-y;
  user-select: none;
  --project-drag: 0px;
}

.project-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(84vw, 1320px);
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--project-drag))) scale(0.88);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, filter 320ms ease;
  filter: saturate(0.75);
}

.project-slide.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  filter: saturate(1);
  transform: translateX(calc(-50% + var(--project-drag))) scale(1);
}

.project-slide.is-prev {
  z-index: 1;
  opacity: 0.44;
  pointer-events: auto;
  --project-offset: calc(-1 * min(78vw, 1220px));
  transform: translateX(calc(-50% + var(--project-offset) + var(--project-drag))) scale(0.9);
}

.project-slide.is-next {
  z-index: 1;
  opacity: 0.44;
  pointer-events: auto;
  --project-offset: min(78vw, 1220px);
  transform: translateX(calc(-50% + var(--project-offset) + var(--project-drag))) scale(0.9);
}

.project-track.is-dragging .project-slide {
  transition: opacity 180ms ease, filter 180ms ease;
}

.project-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  align-items: end;
  padding: clamp(24px, 5vw, 72px);
  overflow: hidden;
  color: #ffffff;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: #eeeeee;
  cursor: pointer;
  will-change: transform;
  transition: transform 220ms ease;
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-thumb::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 58%), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
}

.project-thumb-media {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 68% 42%, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(135deg, #0d1117, #1f3444 52%, #8fb6c7);
}

.project-thumb-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-thumb:hover {
  transform: scale(1.01);
}

.project-thumb-site .project-thumb-media {
  background:
    linear-gradient(90deg, rgba(13, 17, 23, 0.92), rgba(13, 17, 23, 0.24)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 90px),
    #23303a;
}

.project-thumb-home .project-thumb-media {
  background:
    radial-gradient(circle at 70% 36%, rgba(143, 230, 255, 0.24), transparent 18%),
    linear-gradient(135deg, #111820, #25313a 48%, #eeeeee 220%);
}

.project-thumb-content {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  display: grid;
  gap: 14px;
}

.project-number {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-thumb strong {
  color: #ffffff;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.project-thumb span:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
}

.project-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transform: translateY(-50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-arrow:hover,
.project-arrow:focus-visible {
  opacity: 0.88;
  outline: none;
  transform: translateY(-50%) scale(1.04);
}

.project-arrow-left {
  left: 28px;
}

.project-arrow-right {
  right: 28px;
}

.project-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.project-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.project-dots button.is-active {
  width: 30px;
  background: #ffffff;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

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

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.68);
  backdrop-filter: blur(18px);
}

.project-modal-card {
  position: relative;
  width: min(100%, 1320px);
  max-height: calc(100svh - 40px);
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  overflow: hidden;
  color: var(--ink);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.38);
}

.project-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 32, 37, 0.74);
  cursor: pointer;
}

.project-modal-visual {
  display: block;
  min-height: min(760px, calc(100svh - 40px));
  background:
    radial-gradient(circle at 68% 42%, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(135deg, #0d1117, #1f3444 52%, #8fb6c7);
}

.project-modal-visual img {
  width: 100%;
  height: 100%;
  min-height: min(760px, calc(100svh - 40px));
  display: block;
  object-fit: cover;
}

.project-modal-visual-site {
  background:
    linear-gradient(90deg, rgba(13, 17, 23, 0.92), rgba(13, 17, 23, 0.24)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 90px),
    #23303a;
}

.project-modal-visual-home {
  background:
    radial-gradient(circle at 70% 36%, rgba(143, 230, 255, 0.24), transparent 18%),
    linear-gradient(135deg, #111820, #25313a 48%, #eeeeee 220%);
}

.project-modal-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  max-height: calc(100svh - 40px);
  overflow: auto;
  padding: clamp(28px, 4vw, 64px);
}

.project-modal-kicker {
  margin: 0;
  color: rgba(26, 32, 37, 0.54);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-modal-copy h3 {
  margin: 0;
  color: #000000;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.project-modal-text {
  margin: 0;
  color: rgba(26, 32, 37, 0.72);
  line-height: 1.65;
}

.project-modal-sections {
  display: grid;
  gap: 16px;
}

.project-modal-section {
  display: grid;
  gap: 6px;
}

.project-modal-section h4 {
  margin: 0;
  color: #000000;
  font-size: 1rem;
  letter-spacing: 0;
}

.project-modal-section p {
  margin: 0;
  color: rgba(26, 32, 37, 0.7);
  line-height: 1.62;
}

.project-modal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0;
  padding-left: 18px;
  color: rgba(26, 32, 37, 0.82);
}

/* Skills */
.skills-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #ffffff;
}

.skills-chatbox {
  width: 100%;
  min-height: calc(100svh - 40px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(18px, 3vh, 32px);
  overflow: hidden;
  padding: clamp(22px, 4vw, 54px);
  border: 1px solid rgba(26, 32, 37, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(26, 32, 37, 0.1);
}

.light-heading {
  margin-bottom: 0;
  text-align: center;
}

.light-heading .section-kicker {
  color: rgba(26, 32, 37, 0.54);
}

.light-heading h2 {
  color: #000000;
}

.skills-chat-window {
  width: min(100%, 820px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  justify-self: center;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(26, 32, 37, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 238, 238, 0.56), rgba(255, 255, 255, 0.94)),
    #ffffff;
}

.skills-empty-state {
  align-self: center;
  color: rgba(26, 32, 37, 0.48);
  text-align: center;
}

.skills-empty-state p {
  margin: 0;
}

.skill-message {
  max-width: min(88%, 560px);
  padding: 16px 18px;
  border: 1px solid rgba(26, 32, 37, 0.1);
  border-radius: 8px;
  line-height: 1.55;
  opacity: 0;
  animation: fadeUp 360ms ease forwards;
  will-change: transform, opacity;
}

.skill-message.user {
  align-self: flex-end;
  color: #ffffff;
  background: var(--ink);
}

.skill-message.bot {
  align-self: flex-start;
  color: var(--ink);
  background: #eeeeee;
}

.skill-message h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.skill-message p {
  margin: 0;
  color: rgba(26, 32, 37, 0.74);
}

.skill-message.user p {
  color: rgba(255, 255, 255, 0.82);
}

.skills-form {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  justify-self: center;
  padding: 8px;
  border: 1px solid rgba(26, 32, 37, 0.16);
  border-radius: 8px;
  background: #eeeeee;
}

.skills-form input {
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  outline: none;
}

.skills-form button {
  height: 50px;
  padding: 0 18px;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.skills-form button:hover,
.skills-form button:focus-visible {
  opacity: 0.9;
  outline: none;
  transform: translateY(-2px);
}

/* Me */
.me-section {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #ffffff;
}

.me-panel {
  width: min(100%, 1060px);
  min-height: min(720px, calc(100svh - 40px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  color: #eeeeee;
  border: 1px solid rgba(26, 32, 37, 0.12);
  border-radius: 8px;
  background: #1a2025;
  box-shadow: 0 30px 90px rgba(26, 32, 37, 0.16);
  will-change: transform;
  transition: opacity 260ms ease, transform 260ms ease;
}

.me-panel.is-closed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
}

.me-panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(238, 238, 238, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.me-panel-bar span,
.me-close {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(238, 238, 238, 0.36);
}

.me-close {
  display: grid;
  place-items: center;
  padding: 0;
  color: transparent;
  border: 0;
  cursor: pointer;
  transition: width 180ms ease, height 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.me-close:hover,
.me-close:focus-visible {
  width: 18px;
  height: 18px;
  color: #1a2025;
  background: #eeeeee;
  outline: none;
  transform: scale(1.02);
}

.me-reopen-message {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(calc(100% - 32px), 420px);
  margin: 0;
  padding: 16px 18px;
  color: var(--ink);
  text-align: center;
  line-height: 1.45;
  border: 1px solid rgba(26, 32, 37, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(26, 32, 37, 0.12);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -38%);
  transition: opacity 220ms ease, transform 220ms ease;
}

.me-reopen-message.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.me-terminal {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(22px, 4vh, 38px);
  padding: clamp(28px, 6vw, 78px);
  overflow: hidden;
}

.me-terminal-output {
  display: grid;
  align-content: center;
  gap: clamp(22px, 4vh, 38px);
  overflow: auto;
}

.terminal-entry {
  display: grid;
  gap: 10px;
}

.terminal-command,
.terminal-answer {
  margin: 0;
  letter-spacing: 0;
}

.terminal-command {
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 700;
}

.prompt {
  color: rgba(238, 238, 238, 0.46);
}

.terminal-answer {
  max-width: 760px;
  color: rgba(238, 238, 238, 0.72);
  font-size: clamp(1.1rem, 2.2vw, 1.75rem);
  line-height: 1.45;
}

.me-terminal-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(238, 238, 238, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.me-terminal-form input {
  min-width: 0;
  height: 42px;
  color: #ffffff;
  border: 0;
  background: transparent;
  outline: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.me-terminal-form input::placeholder {
  color: rgba(238, 238, 238, 0.34);
}

.me-terminal-form button {
  height: 42px;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: #eeeeee;
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease;
}

.me-terminal-form button:hover,
.me-terminal-form button:focus-visible {
  opacity: 0.88;
  outline: none;
  transform: translateY(-1px);
}

.terminal-gamble-machine {
  display: grid;
  gap: 14px;
  width: min(100%, 620px);
  padding: 18px;
  border: 1px solid rgba(238, 238, 238, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.terminal-gamble-reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  --gamble-reel-height: clamp(76px, 12vw, 118px);
}

.terminal-gamble-reel {
  height: var(--gamble-reel-height);
  overflow: hidden;
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.8rem, 5vw, 3.8rem);
  font-weight: 800;
  border: 1px solid rgba(238, 238, 238, 0.14);
  border-radius: 8px;
  background: rgba(238, 238, 238, 0.08);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.18);
}

.terminal-gamble-reel-inner {
  width: 100%;
  display: grid;
}

.terminal-gamble-symbol {
  width: 100%;
  height: var(--gamble-reel-height);
  display: grid;
  place-items: center;
}

.terminal-gamble-result,
.terminal-gamble-hint {
  margin: 0;
  color: rgba(238, 238, 238, 0.74);
  line-height: 1.5;
}

.terminal-gamble-hint {
  color: rgba(238, 238, 238, 0.46);
  font-size: 0.92rem;
}

.typing.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.54em;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: cursorBlink 850ms steps(2, start) infinite;
}

/* Contact */
.contact-section {
  min-height: 72svh;
  display: grid;
  place-items: center;
  padding: clamp(80px, 10vw, 140px) 20px;
  background: #ffffff;
}

.contact-panel {
  width: min(100%, 900px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.dark-kicker {
  color: rgba(26, 32, 37, 0.54);
}

.contact-panel h2 {
  margin: 0;
  color: #000000;
  font-size: clamp(3.4rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.contact-panel a {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 0 22px;
  color: var(--ink);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(26, 32, 37, 0.14);
  border-radius: 999px;
  background: #eeeeee;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.contact-panel a:hover,
.contact-panel a:focus-visible {
  color: #ffffff;
  background: var(--ink);
  outline: none;
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: rgba(26, 32, 37, 0.56);
  border-top: 1px solid rgba(26, 32, 37, 0.08);
  background: #ffffff;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Placeholder Sections */
.placeholder-section {
  min-height: 46vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  background: #ffffff;
}

.placeholder-section.dark {
  color: #ffffff;
  background: var(--ink);
}

.placeholder-section h2 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: 0;
}

/* Animations */
.fade-in {
  opacity: 0;
  animation: fadeUp 700ms ease forwards;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 240ms;
}

.delay-3 {
  animation-delay: 380ms;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .floating-nav {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: 10px;
    justify-content: space-between;
    overflow-x: auto;
    transform: translateY(-18px) scale(0.98);
  }

  .floating-nav.is-visible {
    transform: translateY(0) scale(1);
  }

  .floating-nav a {
    min-width: max-content;
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .site-notification {
    top: 62px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 0;
  }

  .hero-content,
  .chat-panel {
    min-height: 100svh;
  }

  .chat-panel {
    border: 0;
    border-radius: 0;
  }

  .chat-video-desktop {
    display: none;
  }

  .chat-video-mobile {
    display: block;
  }

  .hero-title {
    font-size: clamp(3rem, 16vw, 5.2rem);
  }

  .chat-intro {
    padding-top: 44px;
  }

  .hero-subtitle {
    margin: 10px 0 0;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .chat-shell {
    min-height: 100svh;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 18px 10px 12px;
  }

  .chat-body,
  .chat-footer {
    width: 100%;
  }

  .chat-body {
    align-content: end;
    grid-template-rows: 1fr auto;
  }

  .quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .quick-card {
    min-height: 52px;
    gap: 3px;
    padding: 6px 3px;
    font-size: 0.68rem;
  }

  .quick-icon {
    width: 20px;
    height: 20px;
    font-size: 0.58rem;
  }

  .chat-output {
    min-height: 128px;
    max-height: 22vh;
    align-self: end;
    padding: 10px;
  }

  .message {
    padding: 11px 12px;
    font-size: 0.92rem;
    max-width: 88%;
  }

  .chat-form {
    gap: 8px;
  }

  .chat-form input,
  .chat-form button {
    height: 44px;
  }

  .prompt-row button {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form button {
    width: 100%;
  }

  .projects-section {
    padding: 62px 0;
  }

  .projects-section .section-heading {
    padding: 0 14px;
  }

  .project-carousel {
    min-height: 500px;
  }

  .project-track {
    height: 470px;
  }

  .project-slide {
    width: min(72vw, 420px);
  }

  .project-slide.is-prev {
    --project-offset: calc(-1 * min(76vw, 438px));
  }

  .project-slide.is-next {
    --project-offset: min(76vw, 438px);
  }

  .project-thumb {
    align-items: start;
    padding: 34px 22px;
  }

  .project-thumb::after {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 52%);
  }

  .project-thumb strong {
    font-size: clamp(2.4rem, 12vw, 4.2rem);
  }

  .project-arrow {
    display: none;
  }

  .project-modal-card {
    max-height: calc(100svh - 28px);
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .project-modal-visual {
    min-height: 260px;
  }

  .project-modal-copy {
    max-height: none;
    overflow: visible;
  }

  .project-modal-list {
    grid-template-columns: 1fr;
  }

  .skills-section {
    padding: 0;
  }

  .skills-chatbox {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    padding: 74px 12px 92px;
  }

  .skills-chat-window {
    width: 100%;
    min-height: 46vh;
  }

  .skill-message {
    max-width: 94%;
  }

  .skills-form {
    width: 100%;
    grid-template-columns: 1fr auto;
  }

  .site-footer {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .me-section {
    padding: 0;
  }

  .me-panel {
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .me-terminal {
    gap: 24px;
    padding: 76px 18px 34px;
  }

  .terminal-answer {
    font-size: 1.08rem;
  }
}

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