/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #483d8b 0%, #2c3e50 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.page-header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #483d8b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.about-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    margin-top: 0;
}

header h1,
.page-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p,
.page-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Carousel container */
.carousel-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

/* Media container */
.media-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-container video,
.media-container iframe,
.media-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cover-image,
.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* External link preview */
.external-link-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.external-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 1;
    transition: background 0.3s ease;
}

.external-link-preview:hover .external-link-overlay {
    background: rgba(0,0,0,0.7);
}

.overlay-title {
    color: white;
    font-size: 2rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(0,0,0,0.8), 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
    padding: 0 20px;
}

.external-link-btn {
    background: #483d8b;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.5);
}

.external-link-btn:hover {
    background: #5a4fa8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* External link without cover image */
.external-link-no-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.external-link-content {
    text-align: center;
    padding: 40px;
}

.external-link-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

/* No media placeholder */
.no-media-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    padding: 40px;
    color: #666;
}

.placeholder-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.placeholder-content p {
    font-size: 1.1rem;
}

/* Description container */
.description-container {
    padding: 40px;
    background: white;
}

.project-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
}

/* Expandable description for mobile */
@media (max-width: 768px) {
    .project-description.expandable .description-content {
        max-height: 7.5em;
        overflow: hidden;
        position: relative;
        transition: max-height 0.3s ease;
    }

    .project-description.expandable .description-content::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2em;
        background: linear-gradient(transparent, white);
        pointer-events: none;
    }

    .project-description.expandable.expanded .description-content {
        max-height: none;
    }

    .project-description.expandable.expanded .description-content::after {
        display: none;
    }

    .expand-btn {
        display: block;
        width: 100%;
        margin-top: 10px;
        background: #f0f0f0;
        border: 1px solid #ddd;
        color: #483d8b;
        font-weight: 500;
        cursor: pointer;
        font-size: 0.95rem;
        padding: 8px 16px;
        border-radius: 6px;
        transition: all 0.3s ease;
        text-align: center;
    }

    .expand-btn:hover {
        background: #e5e5e5;
        border-color: #ccc;
    }

    .project-description.expandable.expanded .expand-btn::after {
        content: ' ▲';
    }

    .project-description.expandable .expand-btn::after {
        content: ' ▼';
    }
}

@media (min-width: 769px) {
    .expand-btn {
        display: none;
    }
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: linear-gradient(135deg, #483d8b, #2c3e50);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Portfolio header with navigation buttons */
.portfolio-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.header-nav-btn {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    box-shadow: 0 6px 20px rgba(72, 61, 139, 0.4);
    border: 3px solid white;
}

.header-nav-btn:hover {
    box-shadow: 0 8px 25px rgba(72, 61, 139, 0.5);
    border: 3px solid white;
}

/* Carousel controls */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background: #f8f9fa;
    position: relative;
}

.carousel-controls .carousel-indicators {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-btn {
    background: #483d8b;
    color: white;
    border: 3px solid white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 61, 139, 0.3);
}

.carousel-btn:hover {
    background: #5a4fa8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 61, 139, 0.4);
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Indicators */
.carousel-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #483d8b;
    transform: scale(1.2);
}

.indicator:hover {
    background: #5a4fa8;
}

/* No data state */
.no-data {
    text-align: center;
    padding: 80px 40px;
    color: #666;
}

.no-data h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .portfolio-header-wrapper {
        gap: 10px;
    }

    .header-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .media-container {
        height: 300px;
    }

    .description-container {
        padding: 20px;
    }

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

    .project-description {
        font-size: 1rem;
    }

    .carousel-controls {
        padding: 15px 20px;
        padding-bottom: 50px;
    }

    .carousel-controls .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-controls .carousel-indicators {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .tags {
        gap: 5px;
    }

    .tag {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .media-container {
        height: 250px;
    }

    .description-container {
        padding: 15px;
    }

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

    .carousel-controls {
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        position: relative;
        padding-bottom: 35px;
    }

    .carousel-indicators {
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Content card for static pages */
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 40px;
}

/* Overview page styles */
.overview-section {
    margin-bottom: 40px;
}

.overview-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.overview-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.skill-card p {
    font-size: 1rem;
    color: #666;
}

.inline-link {
    color: #483d8b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.inline-link:hover {
    color: #2c3e50;
}

/* Resume page styles */
.resume-section {
    margin-bottom: 40px;
}

.resume-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #483d8b;
    padding-bottom: 10px;
}

.experience-item,
.education-item {
    margin-bottom: 30px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.experience-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.date-range {
    color: #483d8b;
    font-weight: 500;
}

.company {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.experience-list {
    list-style: none;
    padding-left: 20px;
}

.experience-list li {
    position: relative;
    margin-bottom: 8px;
    color: #666;
    padding-left: 20px;
}

.experience-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #483d8b;
    font-weight: bold;
}

.download-section {
    text-align: center;
    margin-top: 30px;
}

.download-btn {
    background: linear-gradient(135deg, #483d8b, #2c3e50);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(72, 61, 139, 0.4);
}

/* Testimonials page styles */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 20px;
}

.testimonial-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    font-style: italic;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: #483d8b;
    position: absolute;
    top: -10px;
    left: -15px;
    opacity: 0.3;
}

.testimonial-author h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 5px;
}

.author-title {
    color: #483d8b;
    font-size: 0.95rem;
}

/* Contact page styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    font-size: 1.2rem;
    color: #483d8b;
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 1rem;
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #483d8b;
}

.submit-btn {
    background: linear-gradient(135deg, #483d8b, #2c3e50);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(72, 61, 139, 0.4);
}

/* Responsive styles for new pages */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .content-card {
        padding: 20px;
    }

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

    .testimonials-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .skill-card,
    .testimonial-card {
        padding: 20px;
    }
}