/* Base typography */
body { font-family: 'DM Sans', sans-serif; }
.font-serif { font-family: 'Cormorant Garamond', serif; }

/* Subtle paper grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Active nav link */
.nav-link.active { color: #b08d57; }

/* Timeline */
.timeline-line { position: relative; }
.timeline-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #b08d57;
  opacity: 0.4;
}
.timeline-dot {
  width: 9px;
  height: 9px;
  background: #b08d57;
  border-radius: 50%;
  position: absolute;
  left: -36.5px;
  top: 8px;
}

/* Skill bar animation */
.skill-bar {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-bar.in-view { transform: scaleX(1); }

/* Project card hover */
.project-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.08);
}

/* Project modal */
#project-modal {
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

#modal-card {
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  opacity: 0;
}
#project-modal.is-open #modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Scrollbar styling for modal */
#modal-card::-webkit-scrollbar {
  width: 4px;
}
#modal-card::-webkit-scrollbar-track {
  background: transparent;
}
#modal-card::-webkit-scrollbar-thumb {
  background: #b08d57;
  border-radius: 2px;
}

/* Nav arrows */
.modal-arrow {
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 246, 243, 0.2);
  color: #f8f6f3;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
  cursor: pointer;
}
.modal-arrow:hover {
  border-color: #b08d57;
  color: #b08d57;
  background: rgba(26, 26, 46, 0.7);
}

/* Modal content transitions */
#modal-content {
  transition: opacity 0.2s ease;
}
#modal-content.is-switching {
  opacity: 0;
}

/* Lock body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}
