/* Philippines Flag Colors */
:root {
    --philippines-blue: #0038a8;
    --philippines-red: #ce1126;
    --philippines-yellow: #fcd116;
    --philippines-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: radial-gradient(1200px 800px at 10% 10%, rgba(255,255,255,0.08), transparent 60%),
                linear-gradient(135deg, var(--philippines-blue) 0%, var(--philippines-red) 100%);
    min-height: 100vh;
}

/* Starfield background canvas */
#bg-stars {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

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

/* Header Styles */
.header {
    background: var(--philippines-white);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.top-nav {
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    padding-top: 14px;
}

.top-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.top-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--philippines-blue), var(--philippines-yellow), var(--philippines-red));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.top-nav a:hover::after { width: 100%; }

.flag-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, 
        var(--philippines-blue) 0%, 
        var(--philippines-blue) 33%, 
        var(--philippines-red) 33%, 
        var(--philippines-red) 66%, 
        var(--philippines-yellow) 66%, 
        var(--philippines-yellow) 100%);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-image {
    font-size: 80px;
    color: var(--philippines-blue);
}

.profile-info .name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--philippines-blue);
    margin-bottom: 5px;
}

.profile-info .title {
    font-size: 1.2rem;
    color: var(--philippines-red);
    font-weight: 500;
    margin-bottom: 10px;
}

.profile-info .location {
    color: var(--text-light);
    font-size: 1rem;
}

.contact-section {
    text-align: right;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--philippines-blue);
    width: 20px;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--philippines-red);
}

.phone-link {
    font-weight: 500;
}

.whatsapp-section {
    margin-top: 20px;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--philippines-blue), var(--philippines-red));
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), 0 0 0 rgba(252,209,22,0.0);
}

.btn.primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25), 0 0 16px rgba(252,209,22,0.6);
    filter: saturate(1.1);
}

.btn.whatsapp {
    background: #25d366;
    color: #fff;
}
.btn.whatsapp:hover { 
    background: #20ba5a; 
    transform: translateY(-2px); 
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0 90px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.95));
    backdrop-filter: blur(2px);
}

.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-badge { 
    display: inline-block; 
    background: var(--philippines-yellow); 
    color: #1a1a1a; 
    padding: 8px 14px; 
    border-radius: 999px; 
    font-weight: 700; 
    box-shadow: 0 8px 20px rgba(252,209,22,0.35);
}
.hero-title { font-size: 2.2rem; margin: 16px 0 6px; color: var(--philippines-blue); }
.hero-title .highlight { color: var(--philippines-red); text-shadow: 0 4px 16px rgba(206,17,38,0.25); }
.hero-subtitle { color: var(--text-light); margin-bottom: 16px; }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 10px; font-size: 0.9rem; color: var(--text-light); }

/* Flag motifs */
.flag-motifs { position: absolute; inset: 0; pointer-events: none; }
.flag-triangle { position: absolute; width: 0; height: 0; opacity: 0.15; filter: blur(0.5px); }
.flag-triangle-blue { border-left: 240px solid transparent; border-right: 240px solid transparent; border-bottom: 300px solid var(--philippines-blue); top: -80px; left: -60px; transform: rotate(-8deg); }
.flag-triangle-red { border-left: 300px solid transparent; border-right: 300px solid transparent; border-top: 360px solid var(--philippines-red); bottom: -140px; right: -120px; transform: rotate(10deg); }
.flag-sun { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff6b0, var(--philippines-yellow)); top: 20%; right: 12%; box-shadow: 0 0 40px rgba(252,209,22,0.5); opacity: 0.6; }
.flag-star { position: absolute; width: 18px; height: 18px; background: var(--philippines-yellow); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); opacity: 0.7; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }
.flag-star.star-1 { top: 30%; left: 12%; }
.flag-star.star-2 { top: 60%; left: 6%; }
.flag-star.star-3 { top: 65%; right: 18%; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Tilt base effect */
.tilt { transition: transform 0.15s ease, box-shadow 0.15s ease; transform-style: preserve-3d; }
.tilt:hover { box-shadow: 0 12px 26px rgba(0,0,0,0.16); }

/* Parallax base */
.parallax { will-change: transform; }

/* Main Content */
.main-content {
    padding: 60px 0;
}

.section {
    background: var(--philippines-white);
    margin-bottom: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.section-header {
    background: linear-gradient(135deg, var(--philippines-blue), var(--philippines-red));
    color: white;
    padding: 25px 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-content {
    padding: 30px;
}

/* Education Section */
.education-item {
    border-left: 4px solid var(--philippines-yellow);
    padding-left: 25px;
}

.institution h3 {
    color: var(--philippines-blue);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.degree {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.status {
    color: var(--philippines-red);
    font-weight: 500;
    font-style: italic;
}

/* Experience Section */
.experience-item {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f8f9fa;
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.company-info h3 {
    color: var(--philippines-blue);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.duration {
    color: var(--philippines-red);
    font-weight: 500;
    margin-bottom: 15px;
}

.job-description ul {
    list-style: none;
    padding-left: 0;
}

.job-description li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.job-description li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--philippines-yellow);
    font-size: 0.8rem;
}

/* Fun shimmer on skill tags */
.skill-tag { position: relative; overflow: hidden; }
.skill-tag::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent); transform: translateX(-120%); transition: transform 0.6s ease; }
.skill-tag:hover::after { transform: translateX(120%); }

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.cert-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cert-item:hover {
    border-color: var(--philippines-yellow);
    transform: translateY(-3px);
}

.cert-item i {
    font-size: 2.5rem;
    color: var(--philippines-red);
    margin-bottom: 15px;
}

.cert-item h4 {
    color: var(--philippines-blue);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cert-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.skill-category h3 {
    color: var(--philippines-blue);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--philippines-yellow);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: linear-gradient(135deg, var(--philippines-blue), var(--philippines-red));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background: var(--philippines-white);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    color: var(--text-light);
}

.philippines-pride {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--philippines-red);
    font-weight: 500;
}

.philippines-pride i {
    color: var(--philippines-red);
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .contact-section {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-image {
        font-size: 60px;
    }
    
    .profile-info .name {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-content {
        padding: 20px;
    }
    
    .section-header {
        padding: 20px;
    }
}
