/* Snake animation (banner-only) */
:root {
  --snake-color: #E45B27;
  --snake-food: #4ade80;
}

#snake-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Banner: continuous right-to-left scroll, faster */
.banner-slide-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 400%;
  height: 100%;
  animation: bannerSlide 24s linear infinite;
  z-index: 0;
}

.banner-slide {
  flex: 0 0 25%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@keyframes bannerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Soft fade on left and right edges */
#snake-banner {
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* No white overlay – banner images show at full strength */
#snake-banner::before {
  display: none;
}

#snake-banner-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 12px 14px;
  opacity: 0.55;
  /* keep center clean for avatar overlap */
  mask-image: radial-gradient(ellipse 65% 55% at 50% 60%, transparent 0%, transparent 40%, rgba(15, 23, 42, 0.8) 76%, #0F172A 92%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 60%, transparent 0%, transparent 40%, rgba(15, 23, 42, 0.8) 76%, #0F172A 92%);
}

.snake-banner-row {
  display: flex;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
}

.snake-banner-char {
  display: inline-block;
  color: rgba(35, 31, 32, 0.82);
  opacity: 0.02;
  /* hidden */
  transition: opacity 0.05s linear;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
}

#snake-banner-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  z-index: 2;
  opacity: 0.55;
}

/* Top gradient: commented out for now (bottom gradient only)
.relative.bg-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top-gradient-height, 400px);
  z-index: -100;
  pointer-events: none;
  background-image:
    radial-gradient(at 50% 0%, rgba(228, 91, 39, 0.24) 0%, transparent 55%),
    radial-gradient(at 50% 0%, rgba(249, 115, 22, 0.14) 0%, transparent 62%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 74%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 74%, rgba(0, 0, 0, 0) 100%);
}
*/

/* Bottom gradient: from last project card to footer – commented out
.relative.bg-background::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-gradient-height, 500px);
  z-index: -100;
  pointer-events: none;
  background-image:
    radial-gradient(at 50% 100%, rgba(228, 91, 39, 0.22) 0%, transparent 58%),
    radial-gradient(at 50% 100%, rgba(37, 107, 250, 0.16) 0%, transparent 60%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 1) 100%);
}
*/

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Remove background and gradient from Experience and Projects tab sections */
[role="tablist"] {
  background: transparent !important;
  background-image: none !important;
}

[role="tab"] {
  background: transparent !important;
  background-image: none !important;
}

[role="tab"].bg-background,
[role="tablist"].bg-background {
  background: transparent !important;
  background-image: none !important;
}

/* Remove gradient overlay from tab sections */
[role="tablist"]::before,
[role="tablist"]::after,
[role="tab"]::before,
[role="tab"]::after {
  display: none !important;
}

/* Remove divider from footer */
footer {
  border-top: none !important;
  border-bottom: none !important;
}

footer::before,
footer::after {
  display: none !important;
}

/* CSS custom property for animated border */
@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0turn;
}

/* Experience card (Tigat, EOTC): orange tint + orange border like skill button */
.experience-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  opacity: 1;
  transform: translateY(0);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: rgba(228, 91, 39, 0.12) !important;
  background-color: rgba(228, 91, 39, 0.12) !important;
  border: 1px solid rgba(228, 91, 39, 0.3);
  border-radius: 20px !important;
  min-width: 550px;
  margin-inline: auto;
  color: var(--text-main);
}

/* Project cards (Ruminate, Balageru, etc.): dark gray background, no border */
.project-item .experience-card {
  min-height: 320px;
  min-width: 550px;
  margin-inline: auto;
  overflow: hidden;
  background: #2d2d2d !important;
  background-color: #2d2d2d !important;
  border: none !important;
  color: #F9FAFB;
}

.project-item .experience-card:hover {
  background: #383838 !important;
  background-color: #383838 !important;
  border: none !important;
}

#projects-container,
[id^="radix-"][id$="-content-experience"] {
  display: flex;
  flex-direction: column;
  align-items: center;
}



/* No spinning border on cards – simple orange border like skill button */
.experience-card::before {
  display: none;
}

/* Project screenshots container - match the old Kemer look (padded + un-cropped) */
.project-screenshots {
  display: flex;
  gap: 12px;
  padding: 0;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  inset: 0;
  z-index: 10;
}

.project-screenshots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: #FAFBF9;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* For single-image projects that should feel "wide" like Kemer */
.project-screenshots--wide {
  overflow-x: hidden;
  justify-content: stretch;
}

.project-screenshots--wide img {
  width: 100%;
  height: 100%;
}

/* Wide like Kemer/Ruminate/Balageru, but DON'T crop (keeps Kemer feel) */
.project-screenshots--wide-contain {
  overflow-x: hidden;
  justify-content: stretch;
}

.project-screenshots--wide-contain img {
  width: 100%;
  height: 100%;
}

/* Placeholder "slides" use the same frame size as images */
.project-screenshots.project-screenshots--placeholder {
  background: linear-gradient(135deg, #E45B27 0%, #FF9068 100%);
  inset: 0;
  padding: 0;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  position: absolute;
}

.project-screenshots.project-screenshots--placeholder svg {
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.project-screenshots.project-screenshots--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: placeholderPulse 4s ease-in-out infinite;
}

/* Card-specific Header section (Absolute revealed on hover) */
.experience-card .project-header {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.experience-card .project-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.experience-card .project-header p {
  font-size: 0.875rem;
  color: var(--text-soft);
  margin: 0;
}

/* Updated Slide Down reveal effect */
.experience-card:hover .project-screenshots {
  transform: translateY(100px);
  /* Reveal the title area – more gap between subtitle and image */
}

.experience-card:hover .project-header {
  opacity: 1;
  transform: translateY(0);
}

.experience-card:hover .project-info {
  opacity: 0;
  pointer-events: none;
}

.experience-card .project-header,
.experience-card .project-screenshots,
.experience-card .project-info {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Project info section */
.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
}

.project-info h3 {
  font-family: 'Flex Sans', sans-serif !important;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.experience-card:nth-child(1) {
  animation-delay: 0.1s;
}

.experience-card:nth-child(2) {
  animation-delay: 0.2s;
}

/* Shimmer effect for experience cards (commented out for now — border animation replaces it)
.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 1.2s;
  z-index: 1;
  pointer-events: none;
}

.experience-card:hover::before {
  left: 100%;
}
*/

/* Rotating border animation from Kigen Get Pro License */
@keyframes spinBorder {
  to {
    --border-angle: 1turn;
  }
}

.experience-card:hover {
  opacity: 1 !important;
  background: rgba(228, 91, 39, 0.2) !important;
  background-color: rgba(228, 91, 39, 0.2) !important;
  border-color: rgba(228, 91, 39, 0.5) !important;
}

.experience-card:hover::before {
  display: none;
}

.project-item .experience-card:hover::before {
  display: none !important;
}


/* Card chips: subtle transparent to match card */
.experience-card span.text-sm {
  background: rgba(255, 255, 255, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: var(--text-main) !important;
  border: 1px solid rgba(228, 91, 39, 0.25);
  font-weight: 500;
}

.experience-card:hover span.text-sm {
  background: rgba(255, 255, 255, 0.25) !important;
  background-color: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(228, 91, 39, 0.4);
}

/* Refined bullet points for experience */
.experience-card ul li span:first-child {
  color: #E45B27 !important;
  font-size: 1.25rem;
  line-height: 0.75rem;
}

.project-card-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translate(-10px, 10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  color: #E45B27;
}

.experience-card:hover .project-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Project filtering */
.project-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-item.hidden {
  display: none;
}


/* Filter tag animations */
@keyframes filterTagFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.9);
  }

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

@keyframes filterTagPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.project-filter-tags {
  display: flex;
  justify-content: flex-start !important; /* force tags themselves align left */
  width: 100%;
  max-width: 550px;           /* match card width */
  margin-inline: 0;           /* left-align the tags container */
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

/* Mobile: cards full width, no min-width overflow */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }
  .experience-card {
    min-width: 0;
    width: 100%;
    margin-inline: 0;
  }
  .project-item .experience-card {
    min-width: 0;
    width: 100%;
    margin-inline: 0;
  }
  .project-item {
    max-width: 100%;
  }
  #projects-container,
  [id^="radix-"][id$="-content-experience"] {
    align-items: stretch;
    width: 100%;
  }
  .project-filter-tags {
    max-width: 100%;
    margin-inline: 0; /* full-width and flush-left on mobile */
  }
  .experience-card:hover .project-screenshots {
    transform: translateY(100px);
  }
}

/* Tag section: same dark gray as project cards */
.filter-tag {
  background: #2d2d2d !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F9FAFB;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: filterTagFadeIn 0.4s ease-out forwards;
  position: relative;
  overflow: hidden;
}

.filter-tag:nth-child(1) {
  animation-delay: 0.05s;
}

.filter-tag:nth-child(2) {
  animation-delay: 0.1s;
}

.filter-tag:nth-child(3) {
  animation-delay: 0.15s;
}

.filter-tag:nth-child(4) {
  animation-delay: 0.2s;
}

/* Shimmer effect for filter tags */
.filter-tag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--border-angle), transparent 20%, #E45B27, #E45B27 99%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.filter-tag:hover::before {
  opacity: 0.85;
  animation: spinBorder 2.5s linear infinite;
}

/* Filter tag hover effects */
.filter-tag:hover {
  border-color: transparent !important;
}

.filter-tag.active {
  background-color: #E45B27 !important; /* orange pill for active */
  color: #ffffff !important;
  border-color: rgba(228, 91, 39, 0.5) !important;
}

/* Skills: default = orange border + transparent tint (same as link icons hover) */
.tech-badge {
  background: rgba(228, 91, 39, 0.12) !important;
  border: 1px solid rgba(228, 91, 39, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: filterTagFadeIn 0.4s ease-out forwards;
  position: relative;
  overflow: hidden;
  color: #E45B27;
}

.tech-badge:nth-child(1) {
  animation-delay: 0.1s;
}

.tech-badge:nth-child(2) {
  animation-delay: 0.2s;
}

.tech-badge:nth-child(3) {
  animation-delay: 0.3s;
}

/* Skills: no spinning border; hover matches link icons (orange border + transparent tint) */
.tech-badge::before {
  display: none;
}

.tech-badge:hover {
  border-color: rgba(228, 91, 39, 0.5) !important;
  background: rgba(228, 91, 39, 0.2) !important;
}

.tech-badge:hover span {
  color: #E45B27;
  font-weight: 600;
  transition: all 0.3s ease;
}

.icon-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  animation: filterTagFadeIn 0.4s ease-out forwards;
}

.icon-container:nth-child(1) {
  animation-delay: 0.1s;
}

.icon-container:nth-child(2) {
  animation-delay: 0.15s;
}

.icon-container:nth-child(3) {
  animation-delay: 0.2s;
}

.icon-container:nth-child(4) {
  animation-delay: 0.25s;
}

/* Shimmer effect for links */
.icon-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(228, 91, 39, 0.15), transparent);
  transition: left 0.5s;
  z-index: 1;
  pointer-events: none;
}

.icon-container:hover::before {
  left: 100%;
}

.icon-container:hover {
  border: 1px solid rgba(228, 91, 39, 0.3);
  background: rgba(228, 91, 39, 0.12);
}

.icon-container svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-container:hover svg {
  fill: #E45B27 !important;
}

a:hover .icon-container {
  background: rgba(228, 91, 39, 0.12);
}

@keyframes footerDotPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(228, 91, 39, 0.65);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(228, 91, 39, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(228, 91, 39, 0);
  }
}

.skills-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
}

.skills-dropdown.show {
  max-height: 100px;
  margin-top: 12px;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 4px;
}

/* Skills dropdown: orange pill with white text */
.sub-skill-badge {
  font-size: 11px;
  padding: 4px 12px;
  background: #E45B27;
  border: 1px solid rgba(228, 91, 39, 0.5);
  color: #ffffff;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.sub-skill-badge:hover {
  background: #c94f20;
  color: #ffffff;
  border-color: #E45B27;
}

/* SPA Overlay: full-screen layer, modal has 30px gap and rounded corners */
#project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}

#project-overlay.show {
  transform: translateY(0);
  visibility: visible;
}

#project-overlay-modal {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: #2d2d2d;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#project-overlay #overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #e5e5e5;
  color: #E45B27;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#project-overlay #overlay-close:hover {
  background: #d4d4d4;
  transform: scale(1.05);
}

#project-overlay-iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #2d2d2d;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 767px) {
  #project-overlay {
    padding: 16px;
  }
  #project-overlay-modal {
    border-radius: 8px;
  }
  #project-overlay #overlay-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}

body.overlay-open {
  overflow: hidden;
}

/* CTA Buttons - Match skill card styling */
.cta-button {
  position: relative;
  overflow: hidden;
  background: #FAFBF9 !important;
  color: #E45B27 !important;
  z-index: 0;
}

/* Spinning border for CTA buttons */
.cta-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--border-angle), transparent 20%, #E45B27, #FF9068, #E45B27 99%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.cta-button:hover::before {
  opacity: 0.85;
  animation: spinBorder 2.5s linear infinite;
}

.cta-button:hover {
  background: #ffffff !important;
  color: #E45B27 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* TEMP: dark-mode CTAs */
html.dark .cta-button {
  background: #292929 !important;
  color: #F9FAFB !important;
}

html.dark .cta-button:hover {
  background: #343434 !important;
  color: #F9FAFB !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* TEMP: CTA text color only in dark mode */
html.dark .cta-section h2 {
  color: #ffffff !important;
}
html.dark .cta-section p {
  color: var(--text-soft) !important;
}

.cta-button:hover svg {
  color: #E45B27;
  transition: all 0.3s ease;
}

.cta-button svg {
  position: relative;
  z-index: 2;
}


.cta-button>* {
  position: relative;
  z-index: 2;
}
