/* ===== Resume + 3D Interactive Tools ===== */

.resume-section {
  position: relative;
  overflow: visible;
}

.resume-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.resume-profile {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  transform-style: preserve-3d;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.resume-avatar-3d {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  position: relative;
  transform-style: preserve-3d;
  animation: resume-avatar-float 5s ease-in-out infinite;
}

.resume-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-purple);
  animation: resume-ring-spin 6s linear infinite;
}

.resume-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: #0a0a0f;
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.3);
  transform: translateZ(20px);
  overflow: hidden;
  position: relative;
}

.resume-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.resume-photo.hidden { display: none; }

.resume-photo-fallback.hidden { display: none; }

.resume-photo-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: -8px 0 12px;
  opacity: 0.75;
}

.resume-photo-hint.hidden { display: none; }

/* Honors */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.honor-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.honor-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(168, 85, 247, 0.1);
}

.honor-thumb {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-primary);
}

.honor-thumb-fallback {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  flex-shrink: 0;
}

.honor-body {
  flex: 1;
  min-width: 0;
}

.honor-body h5 {
  font-size: 0.92rem;
  margin-bottom: 6px;
  line-height: 1.45;
  word-break: break-word;
}

.honor-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  word-break: break-word;
}

.honor-meta {
  margin-bottom: 4px;
}

.honor-year {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.honor-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.honors-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

@media (max-width: 968px) {
  .honors-grid { grid-template-columns: 1fr; }
}

@keyframes resume-avatar-float {
  0%, 100% { transform: translateY(0) rotateY(0); }
  50% { transform: translateY(-8px) rotateY(8deg); }
}

@keyframes resume-ring-spin {
  to { transform: rotate(360deg); }
}

.resume-profile h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.resume-profile .resume-role {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.resume-profile .resume-bio {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.resume-tag {
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  transition: transform 0.25s, box-shadow 0.25s;
}

.resume-tag:hover {
  transform: translateY(-3px) translateZ(8px);
  box-shadow: 0 8px 20px rgba(0, 240, 255, 0.2);
}

.resume-download {
  width: 100%;
}

/* Timeline */
.resume-body { display: flex; flex-direction: column; gap: 28px; }

.resume-block h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.resume-block h4::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--gradient-main);
}

.resume-timeline {
  position: relative;
  padding-inline-start: 28px;
}

.resume-timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
  transform-style: preserve-3d;
  transition: transform 0.3s;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  inset-inline-start: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-item:hover {
  transform: translateX(-4px) translateZ(12px);
}

[dir="ltr"] .timeline-item:hover { transform: translateX(4px) translateZ(12px); }

.timeline-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
}

.timeline-item .tl-date {
  font-size: 0.78rem;
  color: var(--accent-purple);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-item h5 { font-size: 1rem; margin-bottom: 4px; }
.timeline-item p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* 3D Skill bars */
.skills-3d-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.skill-3d {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.skill-3d:hover {
  transform: translateZ(14px) rotateX(4deg);
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 240, 255, 0.08);
}

.skill-3d-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.skill-3d-head span:last-child {
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.skill-3d-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: translateZ(8px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-3d-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-main);
  width: 0;
  transition: width 1.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.skill-3d.visible .skill-3d-fill { width: var(--pct); }

/* 3D Tools strip */
.tools-3d-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.tools-3d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tool-3d-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform 0.3s, box-shadow 0.3s;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.tool-3d-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-3deg);
  box-shadow: var(--depth-shadow);
}

.tool-3d-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-3d-card > p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Project Estimator */
.estimator-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.estimator-opt {
  padding: 8px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
}

.estimator-opt:hover,
.estimator-opt.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.estimator-result {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(0, 240, 255, 0.15);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.estimator-result.flipped {
  animation: estimator-flip 0.6s ease;
}

@keyframes estimator-flip {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}

.estimator-price {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.estimator-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 3D Cube stats */
.stats-cube-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  perspective: 400px;
  min-height: 140px;
}

.stats-cube {
  width: 100px;
  height: 100px;
  position: relative;
  transform-style: preserve-3d;
  animation: stats-cube-spin 12s linear infinite;
}

.stats-cube:hover { animation-play-state: paused; }

@keyframes stats-cube-spin {
  from { transform: rotateX(-18deg) rotateY(0); }
  to { transform: rotateX(-18deg) rotateY(360deg); }
}

.stats-cube-face {
  position: absolute;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 24, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  backface-visibility: hidden;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stats-cube-face strong {
  font-size: 1.4rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-cube-face:nth-child(1) { transform: rotateY(0) translateZ(50px); }
.stats-cube-face:nth-child(2) { transform: rotateY(90deg) translateZ(50px); }
.stats-cube-face:nth-child(3) { transform: rotateY(180deg) translateZ(50px); }
.stats-cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(50px); }
.stats-cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(50px); }
.stats-cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(50px); }

/* Flip skill cards */
.flip-cards-3d {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
}

.flip-card-3d {
  perspective: 600px;
  height: 72px;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.flip-card-3d:hover .flip-card-inner,
.flip-card-3d.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.flip-card-front {
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent-cyan);
}

.flip-card-back {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  transform: rotateY(180deg);
  font-size: 0.72rem;
}

.resume-location {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  margin: 4px 0 10px;
}

.resume-lang-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resume-lang-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 968px) {
  .resume-grid { grid-template-columns: 1fr; }
  .resume-profile { position: static; }
  .tools-3d-grid { grid-template-columns: 1fr; }
  .skills-3d-grid { grid-template-columns: 1fr; }
  .flip-cards-3d { grid-template-columns: repeat(2, 1fr); }
}
