/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: var(--dark);
    transition: var(--transition);
}

/* Hero */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 3.3rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--gray);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--gray);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);

}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

/* About */
.about {
    background: white;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--light);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1rem;
    color: var(--gray);
}

/* Skills */
.skills {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.skill-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
}

/* Projects */
.projects {
    background: white;
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--light);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 200px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 20px;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-description {
    color: var(--gray);
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: var(--light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* Experience */
.experience {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.timeline-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: white;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--primary);
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;
}

.timeline-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Education */
.education {
    background: white;
}

.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.education-card {
    background: var(--light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.education-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.education-degree {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.education-school {
    font-weight: 600;
    margin-bottom: 5px;
}

.education-year {
    color: var(--gray);
    margin-bottom: 15px;
}

.education-details {
    list-style: none;
}

.education-details li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.education-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Contact */
.contact {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
}

.contact-details h3 {
    margin-bottom: 5px;
}

.contact-form {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Response Design */
@media (max-width: 992px) {

    .hero-container,
    .about-content,
    .contact-container {
        flex-direction: column;
    }

    .hero-image {
        order: -1;
        margin-bottom: 30px;
    }

    .image-placeholder {
        width: 250px;
        height: 250px;
        font-size: 5rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-content::after {
        left: -10px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(30deg);
    background: var(--primary-dark);
}

/* Dark Mode Styles - DEFAULT NA */
body {
    background: #0f172a;
    color: #e2e8f0;
}

nav {
    background: rgba(15, 23, 42, 0.95);
}

.nav-menu a {
    color: #e2e8f0;
}

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.about,
.projects,
.education {
    background: #1e293b;
}

.skills,
.experience,
.contact {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.stat-card,
.skill-category,
.project-card,
.timeline-content,
.education-card,
.contact-form {
    background: #334155;
    color: #e2e8f0;
}

.form-control {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

footer {
    background: #0f172a;
}

/* Light Mode Styles - ito yung mag-aapply pag may light-mode class */
body.light-mode {
    background-color: var(--light);
    color: var(--dark);
}

body.light-mode nav {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .nav-menu a {
    color: var(--dark);
}

body.light-mode .nav-menu {
    background: rgba(255, 255, 255, 0.98);
}

body.light-mode .hamburger .bar {
    background: var(--dark);
}

body.light-mode .hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

body.light-mode .about,
body.light-mode .projects,
body.light-mode .education {
    background: white;
}

body.light-mode .skills,
body.light-mode .experience,
body.light-mode .contact {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

body.light-mode .stat-card,
body.light-mode .skill-category,
body.light-mode .project-card,
body.light-mode .timeline-content,
body.light-mode .education-card,
body.light-mode .contact-form {
    background: white;
    color: var(--dark);
}

body.light-mode .form-control {
    background: white;
    border-color: #e2e8f0;
    color: var(--dark);
}

body.light-mode footer {
    background: var(--dark);
}

.animated-word {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: inline-block;
    margin-right: 0.25em;
    /* space para sa words */
}

.animated-word.visible {
    opacity: 1;
}

/* avoid flash*/
#hero-content {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#hero-content.visible {
    opacity: 1;
}