/* ==========================================
   p9r.dev - Holographic Dreamscape for Developers
   ==========================================
   Palette:
     Deep Void:        #0C0C1A
     Prismatic Cyan:   #00D4FF
     Prismatic Magenta:#FF00AA
     Prismatic Lime:   #AAFF00
     Frost White:      #F0F0FF
   Fonts:
     JetBrains Mono (headings, code, nav)
     Inter (body prose)
   ========================================== */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #F0F0FF;
    background: #0C0C1A;
    overflow-x: hidden;
}

/* === Holographic Gradient Utility === */
.holo-gradient-text {
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Navigation (Frosted-glass) === */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: #F0F0FF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.nav-links a:hover {
    color: #00D4FF;
}

/* === Sections (Stacked) === */
.section {
    min-height: 80vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section-dark {
    background: #0C0C1A;
}

.section-light {
    background: #F0F0FF;
    color: #0C0C1A;
}

/* Prismatic edge effects for light sections */
.section-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00D4FF, #FF00AA, #AAFF00, #00D4FF);
    background-size: 200% 100%;
    animation: prismatic-edge-shift 6s linear infinite;
}

.section-light::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #AAFF00, #00D4FF, #FF00AA, #AAFF00);
    background-size: 200% 100%;
    animation: prismatic-edge-shift 6s linear infinite reverse;
}

/* Iridescent accent lines for dark sections */
.section-dark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00D4FF, #FF00AA, #AAFF00, transparent);
    opacity: 0.3;
}

@keyframes prismatic-edge-shift {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.section-content {
    max-width: 720px;
    width: 100%;
    padding: 6rem 1.5rem;
    margin: 0 auto;
}

/* === Hero Section === */
.hero-section {
    min-height: 100vh;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
}

.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.6rem);
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: hero-spring-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #F0F0FF;
    opacity: 0.85;
    margin-bottom: 2rem;
    animation: hero-spring-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s both;
}

.hero-seed-icon {
    opacity: 0.7;
    animation: hero-spring-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s both;
}

@keyframes hero-spring-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hero background mesh */
.hero-bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 79px,
            rgba(0, 212, 255, 0.03) 79px,
            rgba(0, 212, 255, 0.03) 80px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 79px,
            rgba(255, 0, 170, 0.03) 79px,
            rgba(255, 0, 170, 0.03) 80px
        );
    pointer-events: none;
}

/* === Section Titles === */
.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Spring-in Animation (applied by JS) === */
.spring-in {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spring-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* === About Section === */
.about-bio {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #F0F0FF;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

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

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: #F0F0FF;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-image: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00) 1;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background 0.3s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.07);
}

.skill-icon {
    flex-shrink: 0;
}

/* === Projects Section === */
.project-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.project-card {
    position: relative;
    padding: 1px;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: scale(1.03) translateY(-4px);
}

.project-card-inner {
    background: #F0F0FF;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0C0C1A;
    margin-bottom: 0.75rem;
}

.project-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #0C0C1A;
    opacity: 0.8;
    flex: 1;
    margin-bottom: 1rem;
}

.project-tech {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #FF00AA;
    letter-spacing: 0.05em;
}

/* === Writing Section === */
.writing-list {
    list-style: none;
}

.writing-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(240, 240, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.writing-entry:hover {
    transform: translateX(6px);
}

.writing-entry:last-child {
    border-bottom: none;
}

.writing-seed {
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.writing-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.writing-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #F0F0FF;
}

.writing-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #F0F0FF;
    opacity: 0.45;
}

/* === Contact Section === */
.contact-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #0C0C1A;
    opacity: 0.8;
    max-width: 480px;
    margin-bottom: 2rem;
}

.contact-email {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-email:hover {
    transform: scale(1.05);
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* === Light Section Title Override === */
.section-light .section-title {
    background: linear-gradient(135deg, #00D4FF, #FF00AA, #AAFF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Responsive === */
@media (max-width: 640px) {
    #nav-bar {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.7rem;
    }

    .section-content {
        padding: 4rem 1.25rem;
    }

    .project-cards {
        grid-template-columns: 1fr;
    }

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }
}
