@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Color Scheme */
:root {
    --pale-gray: #EBEBDF;
    --rich-blue: #191265;
    --dark-accent: #0f0a45;
    --light-accent: #f5f5ed;
    --light-bg: #f8f8f5;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    background-color: var(--light-bg);
    color: var(--rich-blue);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    background: var(--rich-blue);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--pale-gray);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--pale-gray);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    transition: color 0.3s;
    opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--light-accent);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: auto auto;
    gap: 4rem;
    align-items: flex-start;
    margin: 0 auto 4rem auto;
    justify-content: center;
}

.hero-content {
    text-align: left;
}

.hero-right {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Flip Card */
.flip-card {
    width: 280px;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

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

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    background: white;
    border: 4px solid var(--rich-blue);
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(25, 18, 101, 0.15);
}

.flip-card-front img {
    width: 100%;
    height: auto;
    display: block;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: var(--light-bg);
    padding: 1rem;
}

.flip-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--rich-blue);
    opacity: 0.6;
    text-align: center;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--rich-blue);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: flex-start;
}

.button-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cta-buttons > .btn {
    flex: 0 0 auto;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    border: 2px solid var(--rich-blue);
    cursor: pointer;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--rich-blue);
    color: var(--pale-gray);
}

.btn-primary:hover {
    background: var(--dark-accent);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--rich-blue);
}

.btn-outline:hover {
    background: var(--rich-blue);
    color: var(--pale-gray);
    transform: translateY(-2px);
}

/* Projects Section */
.projects-section {
    min-height: 100vh;
    padding: 8rem 5% 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-header p {
    opacity: 0.8;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--rich-blue);
    opacity: 0.6;
    font-size: 1.1rem;
}

.project-card {
    background: white;
    border: 1px solid rgba(25, 18, 101, 0.1);
    transition: all 0.3s;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(25, 18, 101, 0.15);
}

.project-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--rich-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-img {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: white;
    font-weight: 700;
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-info p {
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    min-height: 3em;
}

.project-info .btn {
    align-self: center;
    margin-top: auto;
}

/* Formatted Project Description */
.project-description-formatted {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.8;
}

.project-description-formatted .project-purpose {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--rich-blue);
}

.project-description-formatted .project-tech-stack {
    margin-bottom: 0.8rem;
}

.project-description-formatted .project-tech-stack strong {
    color: var(--rich-blue);
    font-weight: 600;
}

.project-description-formatted .project-what-built {
    margin-bottom: 0.8rem;
}

.project-description-formatted .project-what-built strong {
    color: var(--rich-blue);
    font-weight: 600;
}

.project-description-formatted .project-key-features {
    margin-bottom: 0.5rem;
}

.project-description-formatted .project-key-features strong {
    color: var(--rich-blue);
    font-weight: 600;
}

.project-features-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.project-features-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.4rem;
}

.project-features-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--rich-blue);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
    min-height: 100vh;
    padding: 8rem 5% 4rem;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.contact-intro {
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.8;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h3 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.info-block p {
    font-size: 1rem;
    line-height: 1.8;
}

.contact-form-wrapper h3 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-weight: 400;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 1px solid rgba(25, 18, 101, 0.2);
    color: var(--rich-blue);
    font-size: 0.95rem;
    font-family: inherit;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(25, 18, 101, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rich-blue);
    background: var(--light-accent);
}

/* Brand Container */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--rich-blue);
    width: 100%;
    box-shadow: 0 5px 20px rgba(25, 18, 101, 0.1);
}

.badge {
    background: var(--rich-blue);
    color: var(--pale-gray);
    padding: 0.4rem 1.2rem;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 500;
    align-self: flex-start;
    margin-bottom: 0.5rem;
}

.brand-logo {
    max-width: 80px;
    height: auto;
    transition: transform 0.3s;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-link {
    color: var(--rich-blue);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 0.8rem 2rem;
    border: 1px solid var(--rich-blue);
    transition: all 0.3s;
}

.brand-link:hover {
    background: var(--rich-blue);
    color: var(--pale-gray);
    transform: translateY(-2px);
}

/* Certificates Section */
.certificates-section {
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto;
    overflow: hidden;
}

.certificates-title {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--rich-blue);
    margin-bottom: 2rem;
    font-weight: 500;
}

.certificates-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.certificates-track {
    display: flex;
    gap: 2rem;
    animation: scroll-continuous 15s linear infinite;
    will-change: transform;
}

.certificates-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-continuous {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-25%);
    }
}

.certificate-card {
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
    background: white;
    border: 2px solid var(--rich-blue);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(25, 18, 101, 0.1);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.certificate-card img {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-preview {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rich-blue) 0%, var(--dark-accent) 100%);
}

.pdf-preview i {
    font-size: 4rem;
    color: var(--pale-gray);
}

.certificate-card h4.certificate-title {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--rich-blue);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 0 0.25rem;
}

.certificates-view-all {
    text-align: center;
    margin-top: 2rem;
}

/* Certificates Modal */
.certificates-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificates-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
    padding: 2rem 1rem;
}

.certificates-modal-content {
    background: var(--light-bg);
    max-width: 1400px;
    width: 100%;
    margin: 2rem auto;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.certificates-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--rich-blue);
}

.certificates-modal-header h2 {
    font-size: 1.8rem;
    color: var(--rich-blue);
    font-weight: 500;
    letter-spacing: 2px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--rich-blue);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.certificates-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.certificate-modal-card {
    background: white;
    border: 2px solid var(--rich-blue);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(25, 18, 101, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.certificate-modal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(25, 18, 101, 0.2);
}

.certificate-modal-card img {
    width: 100%;
    height: auto;
    display: block;
}

.certificate-modal-card .pdf-preview {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rich-blue) 0%, var(--dark-accent) 100%);
}

.certificate-modal-card .pdf-preview i {
    font-size: 4rem;
    color: var(--pale-gray);
}

.certificate-modal-card h4.certificate-title {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--rich-blue);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    padding: 0 0.25rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    left: 3%;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
}

.scroll-indicator span {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--rich-blue);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--rich-blue);
}

/* Footer */
.footer {
    background: var(--rich-blue);
    color: var(--pale-gray);
    padding: 3rem 5% 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--pale-gray);
    font-size: 1.5rem;
    transition: all 0.3s;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: var(--light-accent);
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem 4%;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }
    
    .hero-section,
    .projects-section,
    .contact-section {
        padding: 6rem 4% 3rem;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-right {
        width: 100%;
    }
    
    .flip-card {
        width: 250px;
        height: 340px;
    }
    
    .cta-buttons {
        flex-direction: column;
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

