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

:root {
    /* Color palette - soft and modern */
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
}

.profile-section {
    background: var(--background);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: 0 4px 6px var(--shadow-light), 0 1px 3px var(--shadow-medium);
    border: 1px solid var(--border);
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.avatar i {
    font-size: 3rem;
    color: white;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.name {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.title {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.canonical-logo {
    height: 20px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(220deg) brightness(90%) contrast(91%);
}

.description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main content */
.main-content {
    flex: 1;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Links section */
.links-section {
    margin-bottom: var(--spacing-xl);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-icon.linkedin {
    background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.social-icon.github {
    background: linear-gradient(135deg, #333, #24292e);
}

.social-icon.launchpad {
    background: linear-gradient(135deg, #e95420, #772953);
}

.social-icon.resume {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* Skills section */
.skills-section {
    margin-bottom: var(--spacing-2xl);
}

.skill-category {
    margin-bottom: var(--spacing-xl);
}

.category-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 3px solid var(--primary-color);
    text-align: left;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.skill-item {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    min-height: 120px;
    justify-content: center;
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
    border-color: var(--primary-light);
}

.skill-item i {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.skill-item span {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
}

/* Enhanced Kubernetes with CNI grid */
.kubernetes-container {
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    min-height: 120px;
    justify-content: center;
}

.kubernetes-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border);
}

.kubernetes-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.kubernetes-header span {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.cni-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.cni-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.cni-item:hover {
    background: var(--background);
    transform: translateY(-1px);
}

.cni-item i {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.cni-item span {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

/* CNI specific colors */
.cni-item:nth-child(1) i {
    color: #ff6600; /* Calico orange */
}

.cni-item:nth-child(2) i {
    color: #0066cc; /* Cilium blue */
}

.cni-item:nth-child(3) i {
    color: #00cc66; /* Kube-ovn green */
}

/* Technology-specific colors */
.skill-item.aws i {
    color: #ff9900;
}

.skill-item.gcp i {
    color: #4285f4;
}

.skill-item.docker i {
    color: #2496ed;
}

.skill-item.python i {
    color: #3776ab;
}

.skill-item.linux i {
    color: #fcc624;
}

.skill-item.ansible i {
    color: #ee0000;
}

.skill-item.terraform i {
    color: #623ce4;
}

.skill-item.mysql i {
    color: #4479a1;
}

.skill-item.postgresql i {
    color: #336791;
}

.skill-item.golang i {
    color: #00add8;
}

.skill-item.bash i {
    color: #4eaa25;
}

.skill-item.prometheus i {
    color: #e6522c;
}

.skill-item.grafana i {
    color: #f46800;
}

.skill-item.kafka i {
    color: #231f20;
}

.kafka-logo {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

/* Technology logos */
.tech-logo {
    height: 2rem;
    width: auto;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
}

/* Default skill item colors for technologies without specific brand colors */
.skill-item:not(.aws):not(.gcp):not(.docker):not(.python):not(.linux):not(.ansible):not(.terraform):not(.mysql):not(.postgresql):not(.golang):not(.bash):not(.prometheus):not(.grafana):not(.kafka) i {
    color: var(--primary-color);
}

/* International Background section */
.international-section {
    margin-bottom: var(--spacing-2xl);
}

.international-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.international-item {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.international-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
    border-color: var(--primary-light);
}

.country-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.flag-emoji {
    font-size: 2rem;
    line-height: 1;
}

.country-content {
    flex: 1;
}

.country-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.country-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* Education section */
.education-section {
    margin-bottom: var(--spacing-2xl);
}

/* Certifications section */
.certifications-section {
    margin-bottom: var(--spacing-2xl);
}

.education-item {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow-light);
}

.institution-with-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.institution-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.degree {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.institution-period {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}

.institution {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--primary-color);
}

.education-description {
    color: var(--text-secondary);
    font-style: italic;
}

.certifications {
    background: transparent;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
    box-shadow: none;
}

.cert-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: all 0.3s ease;
    text-align: center;
}

.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.cert-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs);
}

.cert-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* New certification logo container for uniform sizing */
.cert-logo-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    background: var(--background);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 6px var(--shadow-light);
}

.cert-logo-container img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.cert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cert-name {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.cert-provider {
    font-size: var(--font-size-xs);
    color: var(--primary-color);
    font-weight: 500;
}

.cert-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 600;
}

/* Company/Provider specific colors */
.cert-logo.nvidia {
    background: linear-gradient(135deg, #76b900, #00a86b);
}

.cert-logo.hashicorp {
    background: linear-gradient(135deg, #623ce4, #7c3aed);
}

.cert-logo.google {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.cert-logo.linux-foundation {
    background: linear-gradient(135deg, #003366, #0066cc);
}

.cert-logo.canonical {
    background: linear-gradient(135deg, #e95420, #772953);
}

.cert-logo.aws {
    background: linear-gradient(135deg, #ff9900, #ff6600);
}

.cert-logo.stanford {
    background: linear-gradient(135deg, #8c1515, #b83a4b);
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 1;
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: 0 -2px 4px var(--shadow-light);
}

.footer p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }
    
    .profile-section {
        padding: var(--spacing-lg);
    }
    
    .name {
        font-size: var(--font-size-3xl);
    }
    
    .title {
        font-size: var(--font-size-lg);
    }
    
    .description {
        font-size: var(--font-size-base);
    }
    
    .link-card {
        padding: var(--spacing-md);
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: var(--spacing-xs);
    }
    
    .skill-item {
        padding: var(--spacing-sm);
    }

    .skill-item i {
        font-size: 1.25rem;
    }

    .skill-item span {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .avatar i {
        font-size: 2.5rem;
    }
    
    .name {
        font-size: var(--font-size-2xl);
    }
    
    .link-card {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .link-arrow {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-xs);
    }

    .category-title {
        font-size: var(--font-size-base);
    }

    .cert-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

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

    .international-item {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }

    .country-flag {
        margin-bottom: var(--spacing-sm);
    }

    .institution-period {
        flex-direction: column;
        align-items: flex-start;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cni-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }
}

/* Animation for smooth loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section,
.links-section,
.skills-section {
    animation: fadeInUp 0.6s ease forwards;
}

.links-section {
    animation-delay: 0.2s;
}

.skills-section {
    animation-delay: 0.4s;
}

/* Focus styles for accessibility */
.link-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.link-card:focus:not(:focus-visible) {
    outline: none;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
    }
    
    .link-card:hover {
        transform: none;
        box-shadow: 0 2px 4px var(--shadow-light);
    }
}

/* Collapsible functionality */
.collapsible {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

.collapsible:hover {
    background-color: var(--background-secondary);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: var(--text-secondary);
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.skills-content {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.skills-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow-light);
    z-index: 100;
    margin-bottom: var(--spacing-xl);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-lg);
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.nav-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--background-secondary);
}

.nav-item.active {
    color: var(--accent);
    background-color: var(--accent-bg);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 1px;
}

@media (max-width: 768px) {
    .nav-container {
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .nav-item {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}