/* ===================================
   HOMEPAGE STYLES
   Dark Cyberpunk Theme - Epic Edition
   =================================== */

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0 4rem;
}

/* Hero Background Effects */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.15) 0%, transparent 60%);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--nav-accent), transparent);
    box-shadow: 0 0 20px var(--nav-accent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Hero Text */
.hero-title {
    font-family: var(--font-brand);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--nav-text);
    margin: 0 0 1rem;
    line-height: 1.1;
    letter-spacing: 2px;
}

/* Glitch Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    animation: glitchPulse 8s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    color: #00d4ff;
    text-shadow: -2px 0 #ff006e;
}

.glitch::after {
    animation: glitchBottom 2.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    color: #ff006e;
    text-shadow: 2px 0 #00d4ff;
}

@keyframes glitchTop {

    0%,
    96%,
    100% {
        transform: translate(0);
    }

    97% {
        transform: translate(-5px, 2px);
    }

    98% {
        transform: translate(5px, -2px);
    }

    99% {
        transform: translate(-3px, 3px);
    }
}

@keyframes glitchBottom {

    0%,
    97%,
    100% {
        transform: translate(0);
    }

    98% {
        transform: translate(3px, -3px);
    }

    99% {
        transform: translate(-3px, 2px);
    }
}

@keyframes glitchPulse {

    0%,
    90%,
    100% {
        opacity: 1;
    }

    95% {
        opacity: 0.8;
    }
}

/* Typing Effect Subtitle */
.hero-subtitle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
}

.typing-indicator {
    color: var(--nav-accent);
    font-size: 1.5rem;
    font-weight: bold;
}

.hero-subtitle {
    font-family: 'Courier New', monospace;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--nav-accent);
    font-weight: 600;
    margin: 0;
    min-height: 2.5rem;
}

.cursor {
    color: var(--nav-accent);
    font-size: 1.8rem;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Hero Description */
.hero-description {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--nav-text-dim);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--nav-accent);
    color: #0a0a0f;
    border: 2px solid var(--nav-accent);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--nav-text);
    border: 2px solid var(--nav-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--nav-accent);
    color: var(--nav-accent);
    transform: translateY(-4px);
}

.btn-outline {
    background: transparent;
    color: var(--nav-accent);
    border: 2px solid var(--nav-accent);
}

.btn-outline:hover {
    background: var(--nav-accent);
    color: #0a0a0f;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3);
}

.btn-primary.large,
.btn-outline.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--nav-accent);
    transform: translateY(-4px);
}

.stat-number {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--nav-accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--nav-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Code Window */
.hero-visual {
    position: relative;
}

.code-window {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.window-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--nav-border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.window-title {
    margin-left: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--nav-text-dim);
}

.code-content {
    padding: 2rem;
    overflow: hidden;
}

.code-content pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
}

.code-keyword {
    color: #ff79c6;
}

.code-var {
    color: #50fa7b;
}

.code-property {
    color: #8be9fd;
}

.code-string {
    color: #f1fa8c;
}

.code-function {
    color: #bd93f9;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--nav-text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--nav-accent), transparent);
}

/* ===================================
   FEATURED PROJECTS SECTION
   =================================== */
.featured-projects {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--nav-accent);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-brand);
    font-size: 3rem;
    font-weight: 900;
    color: var(--nav-text);
    margin: 1rem 0;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--nav-accent);
    box-shadow: 0 0 16px var(--nav-accent);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--nav-text-dim);
    margin-top: 2rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.project-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--nav-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--nav-accent) 0%, #00d4ff 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-item:hover::before {
    transform: scaleX(1);
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 255, 136, 0.1);
}

.project-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1));
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: var(--nav-accent);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--nav-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--nav-accent);
    color: #0a0a0f;
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nav-accent);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-title {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-title a {
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-title a:hover {
    color: var(--nav-accent);
}

.project-excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--nav-text-dim);
    line-height: 1.6;
}

/* Section CTA */
.section-cta {
    text-align: center;
    margin-top: 3rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--nav-accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 2rem;
    border: 2px solid var(--nav-accent);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: var(--nav-accent);
    color: #0a0a0f;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3);
}

.view-all-link .arrow {
    transition: transform 0.3s ease;
}

.view-all-link:hover .arrow {
    transform: translateX(4px);
}

/* ===================================
   SKILLS SECTION
   =================================== */
.skills-section {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--nav-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--nav-accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nav-text);
    margin-bottom: 1.5rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.skill-category li {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--nav-text-dim);
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-dot {
    width: 8px;
    height: 8px;
    background: var(--nav-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--nav-accent);
}

/* ===================================
   ABOUT PREVIEW SECTION
   =================================== */
.about-preview {
    padding: 6rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.image-frame img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    border: 2px solid var(--nav-border);
}

.frame-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--nav-accent);
}

.frame-corner.tl {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.frame-corner.tr {
    top: -10px;
    right: -10px;
    border-left: none;
    border-bottom: none;
}

.frame-corner.bl {
    bottom: -10px;
    left: -10px;
    border-right: none;
    border-top: none;
}

.frame-corner.br {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

.about-text h2 {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--nav-text);
    margin: 1rem 0 1.5rem;
}

.about-text p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--nav-text-dim);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-highlights {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--nav-text);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.highlight-icon {
    font-size: 1.3rem;
}

/* ===================================
   CTA SECTION
   =================================== */
.cta-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.2) 0%, transparent 70%);
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid var(--nav-border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cta-title {
    font-family: var(--font-brand);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--nav-text);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cta-text {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--nav-text-dim);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   ANIMATIONS (AOS Alternative)
   =================================== */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        order: -1;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .cta-content {
        padding: 2.5rem 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-highlights {
        flex-direction: column;
    }
}

/* Code window responsive fix */
.hero-content {
    flex-direction: column;
    /* stack on mobile if using flex row */
}

.code-window {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.code-content {
    overflow-x: auto;
    /* allow horizontal scroll inside the window */
    -webkit-overflow-scrolling: touch;
}

.code-content pre {
    white-space: pre;
    /* keep code formatting */
    overflow-x: auto;
    margin: 0;
    font-size: 0.78rem;
    /* slightly smaller on mobile */
}

@media (max-width: 768px) {
    .hero-visual {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .code-window {
        margin: 0;
        border-radius: 8px;
    }

    .code-content pre {
        font-size: 0.72rem;
    }

    .code-content code {
        display: block;
        overflow-x: auto;
    }
}