/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #6E6F71 0%, #6B8A3C 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --linkedin-color: #0077b5;
    --whatsapp-color: #25d366;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --backdrop-blur: blur(10px);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(-45deg, #000000, #6B8A3C, #6E6F71, #6B8A3C);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Section */
.header-section {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

.profile-image-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.3);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.profile-image:hover {
    -webkit-transform: translateY(-8px) scale(1.1) translateZ(0);
    transform: translateY(-8px) scale(1.1) translateZ(0);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.brand-description {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.highlight {
    font-weight: 600;
    color: var(--text-primary);
}

/* Projects Section */
.projects-section {
    margin-bottom: 3rem;
}

.projects-container {
    max-width: 800px;
    margin: 0 auto;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    -webkit-transform: translateY(-8px) translateZ(0);
    transform: translateY(-8px) translateZ(0);
    box-shadow: var(--card-shadow-hover);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-logo {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.project-card:hover .project-logo {
    -webkit-transform: scale(1.05) translateZ(0);
    transform: scale(1.05) translateZ(0);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.iec-logo {
    background: #000000 !important;
}

.project-card:hover .iec-logo {
    background: #000000 !important;
}

.project-info {
    flex-grow: 1;
    text-align: left;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.project-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

.external-link-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: bold;
}

.project-card:hover .external-link-icon {
    opacity: 1;
    -webkit-transform: translateX(-4px);
    transform: translateX(-4px);
}

/* Social Section */
.social-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 2px solid transparent;
}

.social-btn i {
    font-size: 1.3rem;
    transition: var(--transition);
}

.linkedin-btn {
    background: rgba(0, 119, 181, 0.15);
    color: #ffffff;
    border-color: rgba(0, 119, 181, 0.3);
}

.linkedin-btn:hover {
    background: var(--linkedin-color);
    color: #ffffff;
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 119, 181, 0.4);
    border-color: var(--linkedin-color);
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.15);
    color: #ffffff;
    border-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: var(--whatsapp-color);
    color: #ffffff;
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
    border-color: var(--whatsapp-color);
}

.social-btn:hover i {
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
}

.contact-text {
    display: inline;
}

.contact-phone {
    display: none;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-brand {
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .project-logo {
        width: 130px;
        height: 130px;
        padding: 18px;
    }
    
    .project-card {
        padding: 1.75rem;
        gap: 1.75rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem 0.75rem;
    }
    
    .header-section {
        padding: 2rem 0;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .project-card {
        margin-bottom: 1.25rem;
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        border-radius: 20px;
    }
    
    .project-info {
        text-align: center;
    }
    
    .project-logo {
        width: 160px;
        height: 160px;
        padding: 24px;
        border-radius: 20px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    }
    
    .project-card:hover .project-logo {
        -webkit-transform: scale(1.08) translateZ(0);
        transform: scale(1.08) translateZ(0);
    }
    
    .project-info h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    
    .project-info p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .external-link-icon {
        top: 1.25rem;
        right: 1.25rem;
        font-size: 1.3rem;
    }
    
    .social-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 25px;
    }
    
    .contact-text {
        display: none;
    }
    
    .contact-phone {
        display: inline;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .main-container {
        padding: 0.75rem 0.5rem;
    }
    
    .brand-title {
        font-size: 1.75rem;
    }
    
    .project-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        gap: 1.25rem;
    }
    
    .project-logo {
        width: 180px;
        height: 180px;
        padding: 28px;
        border-radius: 24px;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .project-info p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .social-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .external-link-icon {
        font-size: 1.2rem;
    }
}

/* Extra Small Screens */
@media (max-width: 360px) {
    .project-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .project-logo {
        width: 200px;
        height: 200px;
        padding: 32px;
        border-radius: 28px;
    }
    
    .project-info h3 {
        font-size: 1.25rem;
    }
    
    .project-info p {
        font-size: 0.85rem;
    }
    
    .social-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .brand-title {
        font-size: 1.6rem;
    }
}

/* Large Mobile Screens (iPhone Pro Max, etc.) */
@media (max-width: 430px) and (min-width: 361px) {
    .project-logo {
        width: 190px;
        height: 190px;
        padding: 30px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        -webkit-transform: scale(0.9);
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* Accessibility */
.social-btn:focus,
.project-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Safari-specific optimizations */
@supports (-webkit-appearance: none) {
    .project-logo img {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    .project-card {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .project-card,
    .social-btn {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}