/* ============================================
   PROJECTS — STICKY SPLIT-SCROLL LAYOUT
   ============================================ */

/* Split-scroll container */
.projects-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  position: relative;
}

/* Left column: sticky text panel */
.projects-text {
  position: sticky;
  top: 120px;
  align-self: start;
  min-height: 300px;
}

/* Individual project text blocks — stacked, fading in/out */
.project-text {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.15s ease-out,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* First text block establishes height for the sticky container */
.project-text:first-child {
  position: relative;
}

.project-text.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.3s ease-in 0.15s,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

/* Right column: scrollable images */
.projects-images {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Individual image blocks — start hidden, fade in via IntersectionObserver */
.image-block {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.image-block img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-block.active img {
  transform: scale(1.02);
}

/* File Converter pipeline placeholder — standard image block treatment */
.placeholder-system {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.05), rgba(100, 255, 218, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.05);
  aspect-ratio: 16 / 10;
  transform: scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.placeholder-system.active {
  transform: scale(1.02);
}

/* Pipeline flow visualization */
.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 20px;
}

.pipeline-step {
  color: var(--accent);
  background: rgba(100, 255, 218, 0.06);
  border: 1px solid rgba(100, 255, 218, 0.15);
  padding: 8px 16px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  font-weight: 500;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.pipeline-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0.5;
  animation: arrowPulse 2.5s ease-in-out infinite;
}

.pipeline-arrow:nth-child(4) {
  animation-delay: 0.3s;
}

.pipeline-arrow:nth-child(6) {
  animation-delay: 0.6s;
}

.pipeline-arrow:nth-child(8) {
  animation-delay: 0.9s;
}



.project-overline {
  color: var(--accent);
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
}

.project-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.project-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.project-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-style: italic;
  margin-top: 8px;
}

.project-built-with {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.project-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.project-description p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
}

.project-tags li {
  color: var(--text-muted);
  font-size: 0.8125rem;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.project-tags li:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.project-link {
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

.project-link:hover {
  color: var(--accent);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px 40px;
}

/* ============================================
   DUAL-MODE SKILLS TOGGLE
   ============================================ */
.skills-view-toggle {
  display: flex;
  gap: 16px;
  font-size: 0.8125rem;
  margin-left: 24px;
}

.toggle-btn {
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.toggle-btn:hover {
  color: var(--text-secondary);
}

.toggle-btn.active {
  color: var(--accent);
}

#skills {
  padding-top: 80px;
  padding-bottom: 80px;
}

/* View Containers */
.skills-container {
  position: relative;
  width: 100%;
}

.skills-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(10px) scale(0.98);
}

.skills-view.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
  padding-top: 0;
  transform: translateY(0) scale(1);
}

.skills-grid {
  margin-top: 40px;
}

/* ============================================
   SKILLS GLOBE (Canvas-based 3D)
   ============================================ */
.skills-globe {
  position: relative;
  width: 100%;
  height: clamp(500px, 55vh, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  margin-top: 20px;
  overflow: visible;
  padding: 0;
}

#skills-globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.globe-tooltip {
  position: absolute;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  white-space: nowrap;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.globe-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.skill-category {
  display: flex;
  flex-direction: column;
}

.skill-category-title {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0.95;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s ease;
}

.skill-category:hover .skill-category-title {
  opacity: 1;
}

.skill-category:hover .skill-status {
  opacity: 1;
}

.skill-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-list li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding-left: 28px;
  position: relative;
  transition: padding-left 0.25s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
}

.skill-name {
  display: flex;
  align-items: baseline;
  transition: color 0.25s var(--ease-out);
}

.skill-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), max-height 0.25s var(--ease-out), margin-top 0.25s var(--ease-out);
  margin-top: 0;
  line-height: 1.5;
}

.skill-list li:hover,
.skill-list li.expanded {
  padding-left: 34px;
}

.skill-list li:hover .skill-name,
.skill-list li.expanded .skill-name {
  color: var(--text-primary);
}

.skill-list li:hover .skill-desc,
.skill-list li.expanded .skill-desc {
  opacity: 1;
  max-height: 48px;
  transform: translateY(0);
  margin-top: 6px;
}

.skill-list li::before {
  content: '├─';
  font-family: var(--font-mono);
  position: absolute;
  left: 0;
  color: rgba(100, 255, 218, 0.4);
  font-size: 0.85rem;
  top: 1px;
}

.skill-list li:last-child::before {
  content: '└─';
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.75em;
  opacity: 0.45;
  margin-left: 6px;
  pointer-events: none;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* Dev-style code snippet */
.about-snippet {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  overflow-x: auto;
}

.about-snippet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.about-snippet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.about-snippet-dot:nth-child(1) {
  background: #ff5f57;
}

.about-snippet-dot:nth-child(2) {
  background: #febc2e;
}

.about-snippet-dot:nth-child(3) {
  background: #28c840;
}

.about-snippet-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.about-snippet pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  white-space: pre;
}

.about-snippet .code-keyword {
  color: #c792ea;
}

.about-snippet .code-key {
  color: var(--text-primary);
}

.about-snippet .code-string {
  color: #c3e88d;
}

.about-snippet .code-bracket {
  color: var(--accent);
}

.about-snippet .code-array {
  color: #89ddff;
}

.typing-cursor {
  display: inline-block;
  width: 8px;
  animation: blinkCursor 1.06s steps(2, start) infinite;
  color: var(--text-primary);
  opacity: 1;
}

@keyframes blinkCursor {
  to {
    opacity: 0;
  }
}

/* Section depth transition */
section {
  transform-origin: center center;
  transition: opacity 0.6s ease;
}

section.section-depth-active {
  opacity: 0.98;
}

/* ============================================
   CURRENTLY BUILDING
   ============================================ */
.building-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.building-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  padding: 28px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: inset 3px 0 8px rgba(100, 255, 218, 0.06);
  position: relative;
  overflow: hidden;
}

.building-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
  animation: shimmerBar 3s ease-in-out infinite;
}

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

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

.building-card:hover {
  border-color: var(--border-hover);
  box-shadow: inset 3px 0 8px rgba(100, 255, 218, 0.06), 0 8px 32px rgba(0, 0, 0, 0.15);
}

.building-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  color: var(--accent);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(100, 255, 218, 0.4);
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(100, 255, 218, 0.3);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.6), 0 0 20px rgba(100, 255, 218, 0.2);
  }
}

.building-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.building-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
  padding-bottom: 80px;
}

.contact-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin: 12px 0 20px;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  padding: 24px var(--container-padding);
  text-align: center;
  border-top: 1px solid var(--border);
}

#footer p {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ============================================
   CONVERSION CTA & BUTTON EMPHASIS
   ============================================ */
.projects-cta {
  margin-top: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.projects-cta p {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}