:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #ff6b6b;
    --accent-2: #4ecdc4;
    --accent-3: #ffe66d;
    --text: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

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

/* Background SVG Animation */
.background-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(40px); }
}

@keyframes float-3 {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(20px); }
}

@keyframes rotate-1 {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

.float-1 { animation: float-1 6s ease-in-out infinite; }
.float-2 { animation: float-2 8s ease-in-out infinite; }
.float-3 { animation: float-3 7s ease-in-out infinite; }
.rotate-1 { animation: rotate-1 6s ease-in-out infinite; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-content {
    text-align: left;
}

.name-with-portrait {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.portrait {
    width: 300px;
    height:300px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0);
    flex-shrink: 0;
    animation: slideDown 0.8s ease-out 0.05s backwards;
}

.hero-graphics {
    display: flex;
    justify-content: center;
    align-items: center;
}

.title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0;
    animation: slideDown 0.8s ease-out;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 25px;
    opacity: 0.95;
    animation: slideDown 0.8s ease-out 0.1s backwards;
    font-weight: 600;
}

.description {
    font-size: 1rem;
    max-width: 100%;
    margin: 0 0 40px 0;
    opacity: 0.9;
    animation: slideDown 0.8s ease-out 0.2s backwards;
    line-height: 1.7;
}

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

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    margin-bottom: 0;
    animation: slideDown 0.8s ease-out 0.3s backwards;
}

.btn {
    padding: 14px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* Hero Icons */
.hero-icons {
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    align-items: center;
    animation: slideDown 0.8s ease-out 0.4s backwards;
    width: 100%;
}

.hero-icon {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1)) brightness(0) invert(1);
}

.hero-icon:nth-child(1) {
    animation: 3Dprint 0.5s steps(2) infinite;
    animation-delay: 0s;
}

.hero-icon:nth-child(2) {
    animation: sway 3s ease-in-out infinite;
    animation-delay: 0s;
}

.hero-icon:nth-child(3) {
    animation: orbit 4s ease-in-out infinite;
    animation-delay: 0s;
}

@keyframes 3Dprint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

@keyframes sway {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@keyframes orbit {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-15px) translateX(15px); }
    50% { transform: translateY(0) translateX(0); }
    75% { transform: translateY(15px) translateX(-15px); }
    100% { transform: translateY(0) translateX(0); }
}

/* Skills Section */
.skills {
    padding: 120px 0;
    background: var(--bg-light);
    position: relative;
    z-index: 2;
}

.skills h2,
.projects h2,
.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(84%) saturate(1205%) hue-rotate(234deg) brightness(99%) contrast(92%);
    transition: filter 0.3s ease;
}

.skill-card:hover .skill-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(49%) saturate(1339%) hue-rotate(259deg) brightness(97%) contrast(93%);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text);
}

.skill-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Projects Section */
.projects {
    padding: 120px 0;
    position: relative;
    z-index: 2;
}

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

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-top: 4px solid;
}

.project-card.software {
    border-top-color: var(--primary);
}

.project-card.making {
    border-top-color: var(--accent-2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.project-icon {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 20px;
}

.project-card.making .project-icon {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 230, 109, 0.1));
}

.project-icon img {
    width: 100px;
    height: 100px;
    filter: brightness(0) saturate(100%) invert(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon img {
    transform: scale(1.1);
}

.project-icon-img.sway {
    animation: sway 3s ease-in-out infinite;
}

.project-icon-img.orbit {
    animation: orbit 4s ease-in-out infinite;
}

.project-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.4rem;
    color: var(--text);
}

.project-type {
    padding: 0 20px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card.making .project-type {
    color: var(--accent-2);
}

.project-card p:not(.project-type) {
    padding: 0 20px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.project-tags span {
    background: var(--bg-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-card.making .project-tags span {
    background: rgba(78, 205, 196, 0.1);
    color: var(--accent-2);
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background: var(--bg-light);
    text-align: center;
    position: relative;
    z-index: 2;
}

.contact p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    text-align: center;
    padding: 30px;
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .name-with-portrait {
        justify-content: center;
        flex-direction: column;
        margin-bottom: 25px;
    }

    .cta-buttons {
        justify-content: center;
    }

    .title {
        font-size: 2.5rem;
    }

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

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .nav-menu {
        gap: 20px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero-icons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 30px;
    }

    .hero-icon {
        width: 80px;
        height: 80px;
    }

    .skills h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

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

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .hero-icon {
        width: 60px;
        height: 60px;
    }

    .nav-menu {
        gap: 15px;
        font-size: 0.9rem;
    }
}
