/* ============================================
   Neumorphic Profile - Custom Styles
   ============================================ */

:root {
    --primary-color: #605652;
    --bg-color: #F5EFEA;
}

/* ============================================
   Neumorphic Components
   ============================================ */

.neu-card {
    background: rgba(255, 253, 251, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        8px 8px 16px rgba(188, 175, 166, 0.45),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.neu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    pointer-events: none;
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.7),
        inset -3px -3px 7px rgba(206, 195, 186, 0.25);
    opacity: 0.5;
}

.neu-card-inner {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.neu-button {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1rem;
    background: rgba(255, 253, 251, 0.4);
    box-shadow:
        8px 8px 16px rgba(188, 175, 166, 0.45),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
}

.neu-button:hover {
    transform: translateY(-2px);
}

.neu-button:active {
    transform: scale(0.98);
    box-shadow:
        inset 4px 4px 8px rgba(188, 175, 166, 0.45),
        inset -4px -4px 8px rgba(255, 255, 255, 0.9);
}

/* ============================================
   Marquee Text Animation (for long text)
   ============================================ */

.marquee-container {
    overflow: hidden;
    position: relative;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
}

.marquee-text.animate {
    animation: marquee 8s linear infinite alternate;
}

@keyframes marquee {

    0%,
    20% {
        transform: translateX(0);
    }

    80%,
    100% {
        transform: translateX(calc(-100% + 100cqw));
    }
}

/* ============================================
   Flip Card Animation
   ============================================ */

.flip-card {
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Flip Up Animation */
.flip-card.flipped .flip-card-inner.flip-up {
    transform: rotateX(180deg);
}

.flip-card-inner.flip-up .flip-card-back {
    transform: rotateX(180deg);
}

/* Fade Animation */
.flip-card-inner.fade {
    transition: none;
}

.flip-card-inner.fade .flip-card-back {
    transform: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 5;
}

.flip-card.flipped .flip-card-inner.fade .flip-card-back {
    opacity: 1;
}

.social-item.flip-card .flip-card-front,
.social-item.flip-card .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

/* Project card specific - front is relative, back is absolute overlay */
.project-item.flip-card .flip-card-front {
    position: relative;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
}

.project-item.flip-card .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
}

.flip-card-front {
    z-index: 2;
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 253, 251, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        8px 8px 16px rgba(188, 175, 166, 0.45),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    padding: 12px;
    text-align: center;
}

.flip-card-back .back-content {
    font-size: 12px;
    font-weight: 600;
    color: #605652;
    word-break: break-all;
    line-height: 1.4;
}

.flip-card-back .back-link {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flip-card-back .back-link i {
    font-size: 12px;
}

/* Press animation for cards */
.flip-card:active:not(.flipped) .flip-card-inner {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-left: 4px;
}

.section-header-title {
    font-weight: 700;
    color: #605652;
    transition: all 0.2s;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Theme: Glass (Glassmorphism)
   ============================================ */

.theme-glass {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-glass .neu-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.theme-glass .neu-card::before {
    display: none;
}

.theme-glass .neu-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2);
}

.theme-glass .neu-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-glass .neu-button:active {
    box-shadow: inset 0 2px 8px 0 rgba(31, 38, 135, 0.3);
}

.theme-glass #profile-name,
.theme-glass #profile-title,
.theme-glass #copyright,
.theme-glass h2,
.theme-glass .section-header-title {
    color: white;
}

.theme-glass .text-text-main {
    color: white;
}

.theme-glass .text-text-sub {
    color: rgba(255, 255, 255, 0.7);
}

.theme-glass .flip-card-back {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2);
}

.theme-glass .flip-card-back .back-content {
    color: white;
}

.theme-glass .flip-card-back .back-link {
    color: #a5d8ff;
}

/* ============================================
   Admin Panel - Override glass theme
   ============================================ */

#admin-panel .neu-card-inner {
    background: rgba(255, 255, 255, 0.5) !important;
}

#admin-panel h2,
#admin-panel h3,
#admin-panel label,
#admin-panel p,
#admin-panel span {
    color: #605652 !important;
}

#admin-panel .text-text-main {
    color: #605652 !important;
}

#admin-panel .text-text-sub {
    color: #9E948F !important;
}

#admin-panel input[type="text"],
#admin-panel input[type="password"],
#admin-panel select {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

#admin-panel input[type="text"]::placeholder,
#admin-panel input[type="password"]::placeholder {
    color: #999 !important;
}

#admin-panel .theme-btn {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #605652 !important;
    border: 1px solid #ddd !important;
}

#admin-panel .theme-btn:hover {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* ============================================
   Grid System & Drag n Drop
   ============================================ */

.col-span-1 {
    grid-column: span 1 / span 1;
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

.col-span-4 {
    grid-column: span 4 / span 4;
}

.row-span-2 {
    grid-row: span 2 / span 2;
}

.sortable-ghost {
    opacity: 0.4;
    background: #f0f0f0;
    border: 2px dashed #ccc;
}

.sortable-drag {
    cursor: grabbing;
}

/* Delete Button on Hover */
.delete-btn-overlay {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.group:hover .delete-btn-overlay {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   Icon Picker
   ============================================ */

.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.icon-item:hover {
    background-color: #f3f4f6;
}

.icon-item.selected {
    background-color: #e0e7ff;
    border-color: #6366f1;
    color: #4f46e5;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.neu-card {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 400px) {
    .neu-card {
        border-radius: 1rem;
    }

    .neu-button {
        border-radius: 0.75rem;
    }
}
/* Fix for full image alignment in cards */
.neu-card.full-image-mode::before {
    display: none !important;
    box-shadow: none !important;
}

.neu-card.full-image-mode {
    border: none !important;
}

