/* Common Styles for Portfolio Project Pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kalam', cursive;
    background: #2d2d2d;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 50%, #0d0d0d 100%);
    min-height: 100vh;
    color: #f0f0f0;
    overflow-x: hidden;
    /* animation: subtleGradientShift 45s cubic-bezier(0.4, 0.0, 0.6, 1.0) infinite alternate; */
}

@keyframes subtleGradientShift {
    0% { background: linear-gradient(135deg, #424242 0%, #2e2e2e 50%, #222222 100%); }
    25% { background: linear-gradient(135deg, #424242 0%, #2e2e2e 50%, #222222 100%); }
    40% { background: linear-gradient(135deg, #222222 0%, #404040 50%, #303030 100%); }
    60% { background: linear-gradient(135deg, #222222 0%, #404040 50%, #303030 100%); }
    75% { background: linear-gradient(135deg, #303030 0%, #1c1c1c 50%, #454545 100%); }
    100% { background: linear-gradient(135deg, #303030 0%, #1c1c1c 50%, #454545 100%); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Floating elements animation */
.floating-element {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-25px) rotate(180deg) scale(1.2);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(0.8);
    }
    50% {
        transform: translateY(-15px) rotate(-180deg) scale(1.1);
    }
}

.floating-element:nth-child(1) {
    top: 8%;
    left: 12%;
    opacity: 0.08;
    animation: float1 7.2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-element:nth-child(2) {
    top: 15%;
    right: 8%;
    opacity: 0.12;
    animation: float2 5.8s ease-in-out infinite;
    animation-delay: 1.8s;
}

.floating-element:nth-child(3) {
    bottom: 18%;
    left: 25%;
    opacity: 0.09;
    animation: float1 6.5s ease-in-out infinite;
    animation-delay: 3.2s;
}

.floating-element:nth-child(4) {
    top: 45%;
    right: 3%;
    opacity: 0.11;
    animation: float2 8.1s ease-in-out infinite;
    animation-delay: 0.8s;
}

.floating-element:nth-child(5) {
    bottom: 12%;
    right: 28%;
    opacity: 0.07;
    animation: float1 4.9s ease-in-out infinite;
    animation-delay: 2.7s;
}

/* Back Button */
.back-btn {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 0.8rem 1.5rem;
    background: #176964;
    color: white;
    text-decoration: none;
    border-radius: 25px 10px 25px 10px;
    font-weight: 600;
    transform: rotate(-1deg);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.back-btn:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.back-btn i {
    margin-right: 0.5rem;
}

/* Project Header */
.project-header {
    text-align: center;
    margin: 2rem 0 3rem 0;
    transform: rotate(-0.5deg);
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 3px 3px 0px #ff6b6b;
    margin-bottom: 1rem;
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-0.5deg);
    }
    25% {
        transform: rotate(-1deg);
    }
    75% {
        transform: rotate(0deg);
    }
}

.project-subtitle {
    font-size: 1.3rem;
    color: #4ecdc4;
    transform: rotate(0.8deg);
}

/* Video Section */
.video-section {
    margin: 3rem 0;
    padding: 1.5rem;
    background: rgba(255, 107, 107, 0.1);
    border: 3px dashed #ff6b6b;
    border-radius: 20px 10px 20px 10px;
    transform: rotate(0.7deg);
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
    transform: rotate(-0.5deg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Live Link Section */
.live-link-section {
    margin: 3rem 0;
    text-align: center;
    transform: rotate(-0.8deg);
}

.live-link {
    display: inline-block;
    padding: 1.2rem 2rem;
    background: #ffd700;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 25px 15px 25px 15px;
    font-weight: 700;
    font-size: 1.2rem;
    transform: rotate(1deg);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 1rem 1rem 0;
}

.live-link:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.4);
}

.live-link.github {
    background: #176964;
    color: white;
    transform: rotate(-1deg);
}

.live-link i {
    margin-right: 0.8rem;
    font-size: 1.1em;
}

/* Story Section */
.story-section {
    margin: 4rem 0;
    padding: 2.5rem;
    background: rgba(78, 205, 196, 0.1);
    border: 3px solid #4ecdc4;
    border-radius: 25px 10px 25px 10px;
    /* transform: rotate(0.5deg); */
}

.story-title {
    font-size: 2.2rem;
    color: #4ecdc4;
    margin-bottom: 1.5rem;
    text-align: center;
    transform: rotate(-0.8deg);
}

.story-content {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #f0f0f0;
}

.story-content p {
    margin-bottom: 1.5rem;
}

.story-content a {
    color: #ffd700;
    font-weight: 600;
    text-decoration: underline dotted #ffd700;
    border-radius: 6px;
    transition: color 0.2s;
}

.story-content a:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
    text-decoration: underline solid #ff6b6b;
}

.highlight {
    color: #ffd700;
    font-weight: 600;
    background: rgba(255, 215, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.tech-mention {
    color: #ff6b6b;
    font-weight: 600;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    padding: 1.5rem;
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid #4ecdc4;
    border-radius: 15px 8px 15px 8px;
    transform: rotate(var(--card-rotation));
    transition: all 0.3s ease;
}

.feature-card:nth-child(1) { --card-rotation: 1deg; }
.feature-card:nth-child(2) { --card-rotation: -0.8deg; }
.feature-card:nth-child(3) { --card-rotation: 1.2deg; }
.feature-card:nth-child(4) { --card-rotation: -0.5deg; }
.feature-card:nth-child(5) { --card-rotation: 0.7deg; }

.feature-card:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.3);
}

.feature-title {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 0.8rem;
    transform: rotate(-0.3deg);
}

.feature-desc {
    font-size: 1rem;
    line-height: 1.5;
    color: #f0f0f0;
}

/* Project Details */
.project-details {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255, 215, 0, 0.1);
    border: 3px dashed #ffd700;
    border-radius: 15px 25px 15px 25px;
    transform: rotate(-0.3deg);
}

.details-title {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 1.5rem;
    text-align: center;
    transform: rotate(0.5deg);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: #e72e2e;
    color: white;
    border-radius: 20px 10px 20px 10px;
    font-weight: 600;
    transform: rotate(var(--tag-rotation));
    transition: all 0.3s ease;
}

/* Tech tag rotations for different number of children */
.tech-tag:nth-child(1) { --tag-rotation: 2deg; }
.tech-tag:nth-child(2) { --tag-rotation: -1deg; }
.tech-tag:nth-child(3) { --tag-rotation: 1.5deg; }
.tech-tag:nth-child(4) { --tag-rotation: -0.8deg; }
.tech-tag:nth-child(5) { --tag-rotation: 0.7deg; }
.tech-tag:nth-child(6) { --tag-rotation: -1.2deg; }
.tech-tag:nth-child(7) { --tag-rotation: 0.9deg; }
.tech-tag:nth-child(8) { --tag-rotation: -0.6deg; }

.tech-tag:hover {
    transform: rotate(0deg) scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .project-title {
        font-size: 2.2rem;
    }

    .video-section {
        padding: 1.5rem;
    }

    .story-section {
        padding: 1.5rem;
    }

    .story-content {
        font-size: 1.1rem;
    }

    .story-content a {
        color: #ffd700;
        font-weight: 600;
        text-decoration: underline dotted #ffd700;
        border-radius: 6px;
        transition: color 0.2s;
    }

    .story-content a:hover {
        color: #ff6b6b;
        background: rgba(255, 107, 107, 0.08);
        text-decoration: underline solid #ff6b6b;
    }

    .tech-stack {
        flex-direction: column;
        align-items: center;
    }

    .live-link {
        margin: 0.5rem;
        display: block;
        margin: 0.5rem auto;
        text-align: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Walmart-specific project title sizing */
.walmart-project .project-title {
    font-size: 2.8rem;
}

@media (max-width: 768px) {
    .walmart-project .project-title {
        font-size: 2rem;
    }
}