/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --secondary-color: #00cc6a;
    --accent-color: #3399ff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f0f0f0;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--text-dark);
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bg-white);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    opacity: 0.9;
}

.nav-link:hover {
    color: var(--secondary-color);
    opacity: 1;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--bg-white);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding-top: 80px;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
}

.hero-image {
    flex-shrink: 0;
}

.profile-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 4px solid var(--bg-white);
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
}

section:nth-child(even) {
    background: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Card Styles */
.about-grid,
.experience-grid,
.education-grid,
.skills-grid,
.projects-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-card,
.experience-card,
.education-card,
.skill-card,
.project-card,
.contact-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.about-card:hover,
.experience-card:hover,
.education-card:hover,
.skill-card:hover,
.project-card:hover,
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
    font-size: 1.5rem;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-company {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.card-body {
    margin-top: 1rem;
}

.card-list {
    list-style: none;
    padding: 0;
}

.card-list li {
    color: var(--text-gray);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.card-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* About Section */
.about {
    background: var(--bg-white);
}

.about-card-centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-card-centered .card-icon {
    margin-left: auto;
    margin-right: auto;
}

.about-card-centered .card-title {
    text-align: center;
}

.about-card-centered .card-description {
    text-align: center;
}

.card-description-justify {
    text-align: justify !important;
}

.card-icon-image {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.icon-image {
    width: 75px;
    height: 75px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow);
}

.about-card-centered .card-list {
    text-align: left;
    display: inline-block;
}

/* Experience Section */
.experience {
    background: var(--bg-light);
}

.experience-card .card-list li {
    text-align: justify;
}

/* Moments Section */
.moments {
    background: var(--bg-light);
}

.moments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 3rem auto 0;
}

.moment-card {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    max-width: 100%;
}

.moment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.moment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.moment-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.moment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.moment-username {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.8rem;
}

.moment-menu {
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
}

.moment-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-light);
}

.moment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.moment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.moment-actions-left {
    display: flex;
    gap: 0.7rem;
}

.moment-action-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moment-action-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.moment-action-btn i.fa-heart:hover {
    color: #e91e63;
}

.moment-content {
    padding: 0.6rem 0.9rem 0.9rem;
}

.moment-likes {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.moment-caption {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.moment-caption strong {
    color: var(--text-dark);
    margin-right: 0.5rem;
}

.moment-comments {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
    cursor: pointer;
}

.moment-comments:hover {
    color: var(--text-gray);
}

.moment-time {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Education Section */
.education {
    background: var(--bg-white);
}

/* Skills Section */
.skills {
    background: var(--bg-light);
    padding: 100px 0;
}

.skills-card-large {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    margin-top: 3rem;
}

.skills-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.skill-item {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-category-name {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    min-width: 220px;
    flex-shrink: 0;
    text-align: left;
}

.skill-list {
    color: var(--text-gray);
    font-weight: 400;
    flex: 1;
    text-align: left;
}

/* Projects Section */
.projects {
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(0, 204, 106, 0.05));
    border-radius: 0 0 50% 50%;
    transform: scaleX(1.5);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.2);
    border-color: var(--primary-color);
}

.project-card .card-header {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(0, 204, 106, 0.08));
    padding: 2rem;
    border-radius: 24px 24px 0 0;
    border-bottom: 2px solid var(--bg-light);
    position: relative;
    overflow: hidden;
}

.project-card .card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.project-card .card-header h3 {
    position: relative;
    z-index: 1;
}

.project-card .card-body {
    padding: 2rem;
    position: relative;
}

.project-card .card-date {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.project-card .card-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card .card-company {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--text-gray);
    font-style: italic;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    background: linear-gradient(135deg, var(--accent-color), #00ff88);
}

.project-link i {
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: var(--bg-light);
}

.contact-grid-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 3rem auto 0;
}

.contact-card-small {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-card-small:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-icon-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.contact-card-small:hover .card-icon-small {
    transform: scale(1.1) rotate(5deg);
}

.card-title-small {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

.contact-link-small {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-link-small:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--text-dark);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--bg-white);
}

.footer .container {
    max-width: 600px;
    margin: 0 auto;
}

.footer p {
    color: var(--bg-white);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-grid-small {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .moments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .hero-wrapper {
        gap: 2rem;
    }

    .profile-img {
        width: 280px;
        height: 280px;
    }

    .skills-card-large {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--text-dark);
        width: 100%;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        margin: 0 auto;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid,
    .experience-grid,
    .education-grid,
    .skills-grid,
    .projects-grid,
    .contact-grid,
    .moments-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-grid-small {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .contact-card-small {
        padding: 1.5rem 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        border-radius: 20px;
    }

    .project-card .card-header {
        border-radius: 20px 20px 0 0;
    }

    .project-card .card-date {
        position: static;
        display: inline-block;
        margin-top: 1rem;
    }

    .skills-card-large {
        padding: 2rem;
        margin-top: 2rem;
    }

    .skill-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .skill-category-name {
        display: block;
        margin-bottom: 0.3rem;
        min-width: auto;
        width: 100%;
    }

    .skill-list {
        display: block;
        width: 100%;
    }

    .contact-form-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .profile-img {
        width: 200px;
        height: 200px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .about-card,
    .experience-card,
    .education-card,
    .skill-card,
    .project-card,
    .contact-card {
        padding: 1.5rem;
    }

    .contact-grid-small {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-card-small {
        padding: 1.5rem;
    }
}
