@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}

.project-card {
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 20px 25px -5px rgba(167, 134, 223, 0.3);
}

.hero-text {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}
.nav-link:hover {
    color: #60a5fa;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.active-nav {
    color: #60a5fa !important;
}

.active-nav::after {
    width: 100% !important;
    background: #60a5fa !important;
}

.prose-invert a {
    color: #60a5fa;
    text-decoration: underline;
}
.prose-invert ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

@media (min-width: 768px) {
    .project-card {
        margin-bottom: 1.5rem;
    }
    .project-card:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 10px 15px -3px rgba(167, 134, 223, 0.2) !important;
    }

    .grid {
        gap: 1.5rem !important;
    }
    
    .project-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
}

nav {
    background: linear-gradient(to bottom, rgba(15, 14, 23, 0.9) 0%, rgba(15, 14, 23, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(167, 134, 223, 0.1);
}

main {
    padding-top: 80px;
    padding-bottom: 40px;
}

.projects-container {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }
    
    main {
        padding-top: 70px;
    }
    
    .project-card {
        margin-bottom: 1rem;
    }
}

.profile-image-container {
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.skill-card {
    background-color: rgba(39, 39, 42, 0.8);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.skill-card:hover {
    box-shadow: 0 10px 15px -3px rgba(167, 134, 223, 0.2);
    transform: translateY(-2px);
}

.skill-progress {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(55, 65, 81, 0.5);
    margin-top: 0.5rem;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #60a5fa 0%, #6b46c1 100%);
    width: 0;
    animation: progress-animate 1.5s ease-out forwards;
}

@keyframes progress-animate {
    from { width: 0; }
    to { width: var(--skill-level); }
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
}

.skill-progress {
    height: 0.5rem;
    background: #2d3748;
    border-radius: 9999px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    width: var(--skill-level);
    background: var(--skill-color);
    transition: width 0.5s ease;
}

#certificateModal {
    transition: opacity 0.3s ease;
}

#certificateImage {
    pointer-events: auto;
}

.text-xs.text-gray-400 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.clock-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.clock-icon svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.clock-icon .hour-hand {
    transform-origin: center;
    animation: rotate-hour 8s linear infinite;
}

.clock-icon .minute-hand {
    transform-origin: center;
    animation: rotate-minute 2s linear infinite;
}

@keyframes rotate-hour {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-minute {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.clock-icon:hover .hour-hand {
    animation: rotate-hour 1s linear infinite;
}

.clock-icon:hover .minute-hand {
    animation: rotate-minute 0.5s linear infinite;
}

.certificate-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(96, 165, 250, 0.2);
}

#certificateModal {
    transition: opacity 0.3s ease;
}

#certificateImage {
    pointer-events: auto;
}

#certificateModal img {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.filter-btn.active[data-filter="favorite"] {
  border-color: #a855f7;
  color: #d8b4fe;
  background-color: rgba(168, 85, 247, 0.1);
}

.filter-btn[data-filter="favorite"]:hover:not(.active) {
  border-color: #a855f7;
  color: #d8b4fe;
}

#mediaModal {
  transition: opacity 0.3s ease;
}

.gallery-item img, 
.gallery-item video {
  transition: transform 0.5s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}

#mediaContainer img,
#mediaContainer video {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.aspect-9-16 {
  position: relative;
  padding-bottom: 177.78%;
  height: 0;
  overflow: hidden;
}

.aspect-9-16 img,
.aspect-9-16 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (min-width: 768px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

.portrait-media {
  width: auto;
  height: 80vh;
  max-width: 100%;
}

@media (min-width: 640px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (min-width: 768px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (min-width: 1024px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.gallery-item {
  transition: all 0.3s ease;
  overflow: hidden;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(96, 165, 250, 0.3);
  z-index: 1;
}

.aspect-2-3 img,
.aspect-2-3 video {
  transition: transform 0.5s ease;
}

.gallery-item:hover .aspect-2-3 img,
.gallery-item:hover .aspect-2-3 video {
  transform: scale(1.05);
}

video {
    transition: all 0.3s ease;
}

video:hover {
    transform: scale(1.02);
}

.gallery-item video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.aspect-2-3 {
  position: relative;
  padding-bottom: 150%;
  height: 0;
  overflow: hidden;
  width: 100%;
}

.aspect-2-3 img,
.aspect-2-3 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (min-width: 768px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (min-width: 1024px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.25rem;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination a:hover {
    background-color: rgba(96, 165, 250, 0.1);
    transform: translateY(-1px);
}

.pagination .active {
    background-color: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border-color: #60a5fa;
    font-weight: 500;
}

@media (max-width: 640px) {
    .pagination a, .pagination span {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }
    
    .pagination .ellipsis {
        display: none;
    }
}

.pagination-top {
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pagination-transition {
    transition: all 0.3s ease;
}

.pagination-mobile-btn:hover {
    transform: scale(1.1);
}