:root {
    --bg-dim: #232A2E;
    --bg0: #2D353B;
    --bg1: #343F44;
    --bg2: #3D484D;
    --bg3: #475258;
    --bg4: #4F585E;
    --bg5: #56635f;
    --fg: #D3C6AA;
    --red: #E67E80;
    --orange: #E69875;
    --yellow: #DBBC7F;
    --green: #A7C080;
    --aqua: #83C092;
    --blue: #7FBBB3;
    --purple: #D699B6;
    --grey0: #7A8478;
    --grey1: #859289;
    --grey2: #9DA9A0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dim);
    color: var(--fg);
    overflow-x: hidden;
    line-height: 1.6;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.03s ease;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--green);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.05s ease, opacity 0.05s ease;
    opacity: 0.6;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(35, 42, 46, 0.8);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    animation: slideDown 0.8s ease forwards;
    animation-delay: 1.2s;
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

.logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--green);
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(167, 192, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(127, 187, 179, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(214, 153, 182, 0.1) 0%, transparent 60%);
}

.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: var(--green);
    filter: blur(100px);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 250px;
    height: 250px;
    background: var(--blue);
    filter: blur(80px);
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 200px;
    height: 200px;
    background: var(--purple);
    filter: blur(60px);
    top: 50%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    z-index: 1;
    max-width: 1100px;
    padding: 0 2rem;
}

.hero-text {
    text-align: left;
    flex: 1;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--green);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-title span {
    display: inline-block;
    background: linear-gradient(135deg, var(--fg) 0%, var(--green) 50%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--grey2);
    margin: 0 0 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--green);
    color: var(--bg-dim);
}

.btn-primary:hover {
    background: var(--aqua);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(167, 192, 128, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 2px solid var(--bg4);
}

.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
    z-index: 10;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--grey0);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--green), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

section {
    padding: 8rem 4rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: var(--green);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

#about {
    background: var(--bg0);
}

.about-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg1);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--bg3);
}

.about-item {
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.about-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-item:hover {
    background: var(--bg2);
}

.about-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(167, 192, 128, 0.15);
    color: var(--green);
}

.about-item:nth-child(2) .about-icon { background: rgba(100, 149, 237, 0.15); color: #6495ed; }
.about-item:nth-child(3) .about-icon { background: rgba(214, 153, 182, 0.15); color: #d699b6; }
.about-item:nth-child(4) .about-icon { background: rgba(230, 152, 117, 0.15); color: #e69875; }

.about-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-item p {
    color: var(--grey1);
    font-size: 1.1rem;
    line-height: 1.7;
}

#projects {
    background: var(--bg-dim);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg0);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--bg2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(50px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--green);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        rgba(167, 192, 128, 0.1) 0%, 
        rgba(127, 187, 179, 0.1) 50%,
        rgba(214, 153, 182, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.4s ease;
    opacity: 0.6;
}

.project-logo img {
    width: 50px;
    height: 50px;
}

.project-logo img.small {
    width: 35px;
    height: 35px;
}

.project-card:hover .project-logo {
    transform: scale(1.1);
    opacity: 1;
}

.project-content {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.project-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    background: var(--bg2);
    border-radius: 20px;
    color: var(--green);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-description {
    color: var(--grey1);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 1rem;
}

#skills {
    background: var(--bg0);
}

.skills-container {
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    margin-bottom: 1.25rem;
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--fg);
}

.skill-category:nth-child(1) .skill-btn {
    background: rgba(167, 192, 128, 0.15);
    border-color: var(--green);
}

.skill-category:nth-child(2) .skill-btn {
    background: rgba(127, 187, 179, 0.15);
    border-color: var(--blue);
}

.skill-category:nth-child(3) .skill-btn {
    background: rgba(131, 192, 146, 0.15);
    border-color: var(--aqua);
}

.skill-category:nth-child(4) .skill-btn {
    background: rgba(214, 153, 182, 0.15);
    border-color: var(--purple);
}

.skill-category:nth-child(5) .skill-btn {
    background: rgba(230, 152, 117, 0.15);
    border-color: var(--orange);
}

.skill-category:nth-child(6) .skill-btn {
    background: rgba(122, 132, 120, 0.15);
    border-color: var(--grey0);
}

.skill-category:nth-child(6) .skill-btn:hover,
.skill-category:nth-child(6) .skill-btn:focus {
    background: var(--grey0);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--fg);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    text-decoration: none;
    display: inline-block;
}

.skill-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-category:nth-child(1) .skill-btn:hover,
.skill-category:nth-child(1) .skill-btn:focus {
    background: var(--green);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.skill-category:nth-child(2) .skill-btn:hover,
.skill-category:nth-child(2) .skill-btn:focus {
    background: var(--blue);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.skill-category:nth-child(3) .skill-btn:hover,
.skill-category:nth-child(3) .skill-btn:focus {
    background: var(--aqua);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.skill-category:nth-child(4) .skill-btn:hover,
.skill-category:nth-child(4) .skill-btn:focus {
    background: var(--purple);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.skill-category:nth-child(5) .skill-btn:hover,
.skill-category:nth-child(5) .skill-btn:focus {
    background: var(--orange);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg1);
    border: 1px solid var(--bg3);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--grey1);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--fg);
}

#modal-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--green);
}

#modal-text {
    color: var(--grey1);
    line-height: 1.8;
    font-size: 1.15rem;
}

#modal-text a {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid var(--green);
    transition: all 0.3s ease;
}

#modal-text a:hover {
    color: var(--aqua);
    border-color: var(--aqua);
}

#contact {
    background: var(--bg-dim);
    text-align: center;
}

.timeline-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2.5rem;
    border-left: 2px solid var(--bg3);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-year {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--green);
    margin-bottom: 0.75rem;
    background: var(--bg1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.timeline-item p {
    color: var(--grey1);
    font-size: 1.1rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--bg3);
}

.social-link:hover {
    background: var(--green);
    color: var(--bg-dim);
    transform: translateY(-5px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

footer {
    background: var(--bg0);
    padding: 2rem 4rem;
    text-align: center;
    border-top: 1px solid var(--bg2);
}

footer p {
    color: var(--grey0);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
    .scroll-indicator {
        display: flex;
        flex-direction: row;
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        bottom: auto;
    }
    .scroll-indicator span {
        display: none;
    }
    .scroll-line {
        height: 30px;
        width: 2px;
        background: linear-gradient(to bottom, var(--green), transparent);
    }
    nav {
        padding: 1rem 2rem;
    }
    .nav-links {
        display: none;
    }
    section {
        padding: 5rem 2rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--green), var(--aqua), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--aqua), var(--blue));
    z-index: 10000;
    width: 0%;
    transition: width 0.1s ease;
}

.hero-profile {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid var(--green);
    box-shadow: 0 0 60px rgba(167, 192, 128, 0.2);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
    }

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

    .hero-profile {
        width: 180px;
        height: 180px;
        border-radius: 50%;
    }
}
