/* ==============================
   ðŸŽ® PERSONA 3 RELOAD â€” DESIGN TOKENS
   Angular, geometric, bold blues
   ============================== */
:root {
    /* P3R Colors â€” deep blues, electric accents */
    --bg-primary: #04060e;
    --bg-secondary: #0a0f1e;
    --bg-tertiary: #111833;
    --surface: rgba(10, 20, 50, 0.6);
    --surface-hover: rgba(15, 30, 70, 0.7);
    --border: rgba(0, 180, 255, 0.12);
    --border-hover: rgba(0, 180, 255, 0.3);

    --text-primary: #e4eaf8;
    --text-secondary: #8899bb;
    --text-muted: #4a5a80;

    --accent-cyan: #00b4ff;
    --accent-blue: #2060ff;
    --accent-red: #ff2050;
    --accent-gold: #ffcc00;
    --accent-purple: #8040ff;

    --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    --gradient-secondary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    --gradient-accent: linear-gradient(135deg, var(--accent-red), var(--accent-gold));

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1100px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Angular radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
}

/* ==============================
   ðŸ”„ RESET & BASE
   ============================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* P3R diagonal line pattern overlay */
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 80px,
            rgba(0, 180, 255, 0.015) 80px,
            rgba(0, 180, 255, 0.015) 81px
        );
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none; /* Disabled in favor of multi-layered parallax background */
    z-index: -2;
    pointer-events: none;
}

/* ========== LAYERED PARALLAX BACKGROUND ========== */
.layered-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3; /* Positioned behind main canvas elements */
    pointer-events: none;
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

.bg-layer-sky {
    z-index: 1;
    height: 100%;
    opacity: 1;
}

.bg-layer-cloud1 {
    z-index: 2;
    background-repeat: repeat-x;
    animation: lofi-cloud-scroll-1 150s linear infinite;
    opacity: 1;
}

.bg-layer-cloud2 {
    z-index: 3;
    background-repeat: repeat-x;
    animation: lofi-cloud-scroll-2 100s linear infinite;
    opacity: 1;
}

.bg-bird {
    position: absolute;
    left: 0;
    bottom: 70%; /* Perfect position inside the train window */
    width: 65px;
    height: auto;
    z-index: 5; /* In front of Front.png (z-index 4) but behind Front2.png (z-index 6) */
    pointer-events: none;
    opacity: 0; /* Hidden by default when not flying */
    will-change: transform;
    transition: opacity 0.1s ease;
}

.bg-bird.flying {
    opacity: 1;
    animation: lofi-bird-fly 2s linear forwards;
}

.bg-layer-front {
    z-index: 4;
    background-position: center bottom;
    opacity: 1;
}

.bg-layer-front2 {
    z-index: 6;
    background-position: center bottom;
    opacity: 1;
}

.bg-overlay-dim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 9, 22, 0.90); /* Darkened deep lofi blue overlay */
    z-index: 7; /* Placed in front of all layers to dim the entire background stack */
    pointer-events: none;
}

/* Endless rightward scrolling cloud animations with vertical bobbing wave */
@keyframes lofi-cloud-scroll-1 {
    0% { background-position: 0px 100%; }
    25% { background-position: 500px 98.2%; }
    50% { background-position: 1000px 100%; }
    75% { background-position: 1500px 98.2%; }
    100% { background-position: 2000px 100%; }
}

@keyframes lofi-cloud-scroll-2 {
    0% { background-position: 0px 100%; }
    25% { background-position: 500px 96.5%; }
    50% { background-position: 1000px 100%; }
    75% { background-position: 1500px 96.5%; }
    100% { background-position: 2000px 100%; }
}

/* Endless horizontal flying bird animation with vertical gliding float */
@keyframes lofi-bird-fly {
    0% {
        transform: translate(105vw, 0);
    }
    100% {
        transform: translate(-100px, 0);
    }
}

body.loading {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding);
    position: relative;
    overflow-x: hidden;
}

/* P3R geometric accent lines on sections */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 255, 0.2), transparent);
}

/* ==============================
   â³ PAGE LOADER
   ============================== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-circle {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 180, 255, 0.15);
    border-top-color: var(--accent-cyan);
    animation: spin 0.8s linear infinite;
    /* P3R angular spinner */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ==============================
   âœ¨ PARTICLE CANVAS
   ============================== */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ==============================
   ðŸ”® CURSOR GLOW
   ============================== */
#cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover #cursor-glow {
    opacity: 1;
}

/* ==============================
   ðŸ§­ P3R TOP BAR â€” Minimal
   ============================== */
.p3r-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
}

.p3r-topbar.scrolled {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    padding: 12px 40px;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1001;
    position: relative;
}

.logo-bracket {
    color: var(--accent-cyan);
}

/* P3R Menu Trigger â€” now the hero content area */
.p3r-menu-trigger {
    display: none;
}

.trigger-line {
    display: none;
}

/* Mobile menu button (hidden on desktop) */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: rgba(4, 6, 14, 0.8);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    transition: all var(--transition-fast);
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.mobile-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent-cyan);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10040;
}
.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ==============================
   ðŸŽ® P3R HERO NAVIGATION (inline)
   ============================== */

/* Left-side nav container */
.p3r-hero-nav {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    z-index: 3;
}

/* Menu list */
.p3r-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Menu item */
.p3r-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 24px 6px 20px;
    cursor: pointer;
    outline: none;
    overflow: hidden;
    /* Staggered entrance on page load */
    animation: p3r-item-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateX(-40px);
}

.p3r-menu-item:nth-child(1) { animation-delay: 0.6s; }
.p3r-menu-item:nth-child(2) { animation-delay: 0.7s; }
.p3r-menu-item:nth-child(3) { animation-delay: 0.8s; }
.p3r-menu-item:nth-child(4) { animation-delay: 0.9s; }
.p3r-menu-item:nth-child(5) { animation-delay: 1.0s; }
.p3r-menu-item:nth-child(6) { animation-delay: 1.1s; }

@keyframes p3r-item-enter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Item index number */
.p3r-item-index {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 180, 255, 0.3);
    letter-spacing: 2px;
    min-width: 24px;
    transition: color var(--transition-fast);
}

/* Item text */
.p3r-item-text {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: color var(--transition-fast), text-shadow var(--transition-fast), transform var(--transition-fast);
    position: relative;
    z-index: 2;
}

/* Diagonal accent stripe behind item â€” P3R signature */
.p3r-item-stripe {
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 100, 255, 0.15) 0%,
        rgba(0, 180, 255, 0.25) 50%,
        rgba(0, 100, 255, 0.15) 100%
    );
    transform: skewX(-12deg) scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-left: 3px solid var(--accent-cyan);
}

/* Hover / Focus / Focused state */
.p3r-menu-item:hover .p3r-item-stripe,
.p3r-menu-item.focused .p3r-item-stripe {
    transform: skewX(-12deg) scaleX(1);
}

.p3r-menu-item:hover .p3r-item-text,
.p3r-menu-item.focused .p3r-item-text {
    color: #fff;
    text-shadow: 0 0 30px rgba(0, 180, 255, 0.6), 0 0 60px rgba(0, 180, 255, 0.3);
    transform: translateX(6px);
}

.p3r-menu-item:hover .p3r-item-index,
.p3r-menu-item.focused .p3r-item-index {
    color: var(--accent-cyan);
}

/* Active indicator (current section) */
.p3r-menu-item.active .p3r-item-text {
    color: var(--accent-cyan);
}

.p3r-menu-item.active .p3r-item-index {
    color: var(--accent-cyan);
}

/* Glowing dot for active */
.p3r-menu-item.active::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transform: translateY(-50%);
    box-shadow: 0 0 12px var(--accent-cyan);
    z-index: 2;
}

/* Key hints footer */
.p3r-menu-footer {
    display: flex;
    gap: 24px;
    padding-left: 24px;
    opacity: 0;
    animation: p3r-item-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1.3s forwards;
}

.p3r-key-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.p3r-key-hint kbd {
    font-family: var(--font-heading);
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(0, 180, 255, 0.08);
    border: 1px solid rgba(0, 180, 255, 0.2);
    color: var(--accent-cyan);
    clip-path: polygon(3px 0%, 100% 0%, calc(100% - 3px) 100%, 0% 100%);
}

/* ==============================
   ðŸš€ HERO SECTION
   ============================== */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 90px 40px 80px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 560px;
    text-align: right;
}

.hero-greeting {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
    position: relative;
    padding-right: 32px;
}

/* P3R accent bar after greeting (right-aligned) */
.hero-greeting::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 20px;
    height: 2px;
    background: var(--accent-cyan);
    transform: translateY(-50%);
}

.hero-greeting::before {
    display: none;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(52px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 500;
    margin-bottom: 24px;
    min-height: 36px;
}

.hero-prefix {
    color: var(--text-secondary);
}

/* ---- Glitch Swap â€” P3R themed ---- */
.word-rotator {
    display: inline-block;
    position: relative;
    vertical-align: baseline;
}

.rotator-text {
    display: inline-block;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-weight: 700;
    white-space: nowrap;
    position: relative;
}

/* Glitch active state */
.rotator-text.glitching {
    animation: p3r-glitch 0.45s steps(1) forwards;
}

@keyframes p3r-glitch {
    0%   {
        text-shadow: 2px 0 var(--accent-red), -2px 0 var(--accent-cyan);
        clip-path: inset(0 0 80% 0);
        transform: skewX(-8deg) translateX(3px);
        opacity: 1;
    }
    12%  {
        clip-path: inset(30% 0 40% 0);
        transform: skewX(6deg) translateX(-4px);
        text-shadow: -3px 0 var(--accent-red), 3px 0 var(--accent-cyan);
    }
    24%  {
        clip-path: inset(60% 0 10% 0);
        transform: skewX(-4deg) translateX(5px);
        text-shadow: 4px 0 var(--accent-purple), -4px 0 var(--accent-red);
    }
    36%  {
        clip-path: inset(10% 0 50% 0);
        transform: skewX(10deg) translateX(-2px);
        text-shadow: -2px 0 var(--accent-cyan), 2px 0 var(--accent-gold);
        opacity: 0.7;
    }
    48%  {
        clip-path: inset(75% 0 5% 0);
        transform: skewX(-6deg) translateX(6px);
        text-shadow: 3px 0 var(--accent-red), -3px 0 var(--accent-purple);
        opacity: 0.5;
    }
    60%  {
        clip-path: inset(0 0 0 0);
        transform: skewX(0) translateX(0);
        text-shadow: none;
        opacity: 0;
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: skewX(0) translateX(0);
        text-shadow: none;
        opacity: 0;
    }
}

/* Snap-in of new word */
.rotator-text.glitch-in {
    animation: p3r-glitch-in 0.35s steps(1) forwards;
}

@keyframes p3r-glitch-in {
    0% {
        opacity: 0;
        transform: skewX(-6deg) translateX(-4px);
        text-shadow: 3px 0 var(--accent-red), -3px 0 var(--accent-cyan);
        clip-path: inset(50% 0 20% 0);
    }
    25% {
        opacity: 0.6;
        transform: skewX(4deg) translateX(3px);
        text-shadow: -2px 0 var(--accent-purple), 2px 0 var(--accent-cyan);
        clip-path: inset(10% 0 60% 0);
    }
    50% {
        opacity: 0.85;
        transform: skewX(-2deg) translateX(-1px);
        text-shadow: 1px 0 var(--accent-red);
        clip-path: inset(0 0 0 0);
    }
    75% {
        transform: skewX(1deg) translateX(1px);
        text-shadow: none;
    }
    100% {
        opacity: 1;
        transform: skewX(0) translateX(0);
        text-shadow: none;
        clip-path: inset(0 0 0 0);
    }
}

.hero-description {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 36px;
    margin-left: auto;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Hero socials â€” right-aligned */
.hero-socials {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Menu hint */
.hero-menu-hint {
    display: block;
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    animation: p3r-hint-pulse 2s ease-in-out infinite;
}

@keyframes p3r-hint-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ==============================
   P3R BUTTONS â€” Angular cut
   ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    /* P3R angular cut */
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}

.btn-icon {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-base);
}

.btn:hover .btn-icon {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 180, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 180, 255, 0.5);
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.btn-outline {
    background: transparent;
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}

.btn-outline:hover {
    background: rgba(0, 180, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 180, 255, 0.2);
}

/* Social links â€” P3R angular boxes */
.hero-socials {
    display: flex;
    gap: 8px;
}

.social-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition-base);
    /* P3R angular cut */
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    background: var(--surface);
}

.social-link:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 180, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 180, 255, 0.2);
}

.social-link svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
}

/* Hero Image â€” P3R angular frame */
.hero-image {
    position: relative;
    flex-shrink: 0;
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.12) 0%, rgba(32, 96, 255, 0.08) 40%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.profile-photo {
    width: 260px;
    height: 260px;
    object-fit: cover;
    object-position: top;
    position: relative;
    z-index: 2;
    /* P3R angular crop */
    clip-path: polygon(20px 0%, 100% 0%, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0% 100%, 0% 20px);
    border: 2px solid rgba(0, 180, 255, 0.3);
}

.hero-image-ring {
    position: absolute;
    inset: 10px;
    /* P3R hexagonal ring */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(0, 180, 255, 0.12);
    animation: ring-rotate 20s linear infinite;
}

.hero-image-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.ring-2 {
    inset: -5px;
    border-color: rgba(32, 96, 255, 0.1);
    animation-direction: reverse;
    animation-duration: 25s;
}

.ring-2::before {
    background: var(--accent-blue);
    box-shadow: 0 0 12px var(--accent-blue);
}

@keyframes ring-rotate {
    to { transform: rotate(360deg); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    animation: float-y 2s ease-in-out infinite;
}

.scroll-mouse {
    width: 20px;
    height: 32px;
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-down 1.5s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes float-y {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ==============================
   ðŸ“ SECTION TITLES â€” P3R Style
   ============================== */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 5vw, 38px);
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-number {
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

/* ==============================
   ðŸªŸ GLASS CARD â€” P3R Angular
   ============================== */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-base);
    position: relative;
}

.glass-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

/* P3R corner accent */
.glass-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    pointer-events: none;
    z-index: 1;
}

.glass-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
    pointer-events: none;
    z-index: 1;
}

/* ==============================
   ðŸ‘¤ ABOUT SECTION
   ============================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 40px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
}

.about-text strong {
    color: var(--accent-cyan);
    font-weight: 700;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    /* P3R angular cut */
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.stat-card::before, .stat-card::after { display: none; }

.stat-number {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ==============================
   ðŸƒ SKILLS SECTION â€” P3R Tarot Cards
   ============================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    perspective: 1200px;
}

/* ---- Card Wrapper ---- */
.tarot-card {
    height: 420px;
    cursor: pointer;
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.tarot-card:hover .tarot-card-inner {
    transform: rotateY(180deg);
}

/* ---- Shared Face Styles ---- */
.tarot-card-front,
.tarot-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 4px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background: linear-gradient(160deg, rgba(10, 15, 40, 0.95) 0%, rgba(5, 10, 28, 0.98) 100%);
    clip-path: polygon(16px 0%, 100% 0%, calc(100% - 16px) 100%, 0% 100%);
    overflow: hidden;
}

/* top and bottom decorative line */
.tarot-card-front::before,
.tarot-card-back::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.tarot-card-front::after,
.tarot-card-back::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

/* ---- Front Face ---- */
.tarot-card-back {
    transform: rotateY(180deg);
    justify-content: center;
}


.tarot-big-icon {
    width: 72px;
    height: 72px;
    color: var(--accent-cyan);
    margin: auto 0;
    filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.5));
}

.tarot-big-icon svg {
    width: 100%;
    height: 100%;
}

.tarot-front-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-top: auto;
    text-align: center;
}


/* ---- Back Face ---- */
.tarot-back-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 28px;
    text-align: center;
}

.tarot-skills-list {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tarot-skills-list li {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.04);
    border-left: 2px solid rgba(0, 212, 255, 0.3);
    transition: all 0.25s;
}

.tarot-skills-list li:hover {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--accent-cyan);
    color: var(--text-primary);
    padding-left: 18px;
}

.tarot-skill-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-cyan);
    opacity: 0.7;
    flex-shrink: 0;
}

.tarot-skill-icon svg {
    width: 100%;
    height: 100%;
}

/* ==============================
   ðŸ“‚ PROJECTS SECTION â€” P3R Cards
   ============================== */
.projects-carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.projects-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 24px;
    padding: 20px 4px 28px;
    width: 100%;
    /* Hide scrollbars across all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.projects-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 15, 35, 0.85);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
}
.carousel-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 16px rgba(0, 180, 255, 0.4);
}
.carousel-btn.prev {
    left: -22px;
}
.carousel-btn.next {
    right: -22px;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }
}

.project-card {
    flex: 0 0 min(350px, 85%);
    scroll-snap-align: start;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    /* P3R angular cut */
    clip-path: polygon(16px 0%, 100% 0%, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0% 100%, 0% 16px);
}

.project-card.clickable-card {
    cursor: pointer;
}

.project-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-thumb-img {
    transform: scale(1.05) rotate(0.5deg);
}

.project-card::before, .project-card::after { display: none; }

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.uas-placeholder {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.uas-placeholder-text {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 4px;
    opacity: 0.8;
}

.project-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.project-placeholder-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.4;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 14, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link-btn {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    transform: translateY(16px);
    opacity: 0;
    background: rgba(0, 180, 255, 0.1);
    border: 1px solid var(--border);
    /* P3R angular */
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.project-card:hover .project-link-btn {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover .project-link-btn:nth-child(2) {
    transition-delay: 0.08s;
}

.project-link-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

.project-link-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

.project-info {
    padding: 24px;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    font-size: 11px;
    padding: 4px 14px;
    background: rgba(0, 180, 255, 0.08);
    color: var(--accent-cyan);
    font-weight: 700;
    border: 1px solid rgba(0, 180, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* P3R angular */
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

/* ==============================
   ðŸ“… EXPERIENCE / TIMELINE â€” P3R
   ============================== */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-blue), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 24px;
    width: 16px;
    height: 16px;
    background: var(--bg-primary);
    border: 3px solid var(--accent-cyan);
    z-index: 1;
    box-shadow: 0 0 16px rgba(0, 180, 255, 0.3);
    /* P3R diamond */
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.timeline-content {
    padding: 28px;
}

.timeline-content::before, .timeline-content::after { display: none; }

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 10px;
    text-transform: uppercase;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==============================
   ✉️ CONTACT SECTION
   ============================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    margin-top: 40px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Glassmorphic link cards */
.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 0; /* Allow flex item to shrink below content size */
}

.contact-link:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 180, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 180, 255, 0.15);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 180, 255, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 180, 255, 0.18);
    transition: all 0.3s ease;
}

.contact-link:hover .contact-icon {
    color: #fff;
    background: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 180, 255, 0.5);
    border-color: var(--accent-cyan);
}

.contact-link div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* Allow flex child to shrink and wrap */
}

.contact-link-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.contact-link-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    word-break: break-all; /* Force long URLs/emails to wrap on mobile */
}

.contact-link:hover .contact-link-value {
    color: var(--accent-cyan);
}

/* Glassmorphic Contact Form */
.contact-form {
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: none;
}

/* Floating Label styling */
.form-group label {
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left top;
}

/* Move label up on focus or when input has content */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-24px) scale(0.85);
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Neon expanding underline */
.form-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.5);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

/* Align and style submit button */
.contact-form .btn-submit {
    align-self: flex-start;
    margin-top: 8px;
}

.contact-form .btn-submit .btn-icon {
    transition: transform 0.3s ease;
}

.contact-form .btn-submit:hover .btn-icon {
    transform: translate(3px, -3px);
}

/* ---- Responsive adaptation ---- */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .contact-form {
        padding: 30px 24px;
    }
}

@media (max-width: 480px) {
    .contact-link {
        padding: 12px 16px;
        gap: 14px;
    }
    .contact-link-value {
        font-size: 13.5px;
    }
    .contact-icon {
        width: 40px;
        height: 40px;
    }
}

/* ==============================
   ðŸ¦¶ FOOTER
   ============================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.footer-socials {
    display: flex;
    gap: 8px;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.heart {
    color: var(--accent-red);
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}

/* ==============================
   ðŸŽ­ REVEAL ANIMATIONS
   ============================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

/* ==============================
   ðŸ“± RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
    .hero {
        padding: 90px 24px 80px;
        gap: 40px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tarot-card { height: 380px; }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero {
        flex-direction: column;
        z-index: auto;
    }
    .mobile-menu-btn {
        display: inline-flex;
    }
    .p3r-hero-nav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        padding: 100px 20px 40px;
        background: rgba(4, 6, 14, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transform: translateX(-110%);
        transition: transform var(--transition-base);
        z-index: 10050;
        align-items: flex-start;
        gap: 20px;
        pointer-events: none;
    }
    .p3r-hero-nav.open {
        transform: translateX(0);
        pointer-events: auto;
    }
    .p3r-hero-nav.open .p3r-menu-list,
    .p3r-hero-nav.open .p3r-menu-item {
        pointer-events: auto;
    }
    .p3r-hero-nav {
        touch-action: pan-y;
    }
    .p3r-menu-list {
        width: 100%;
        max-width: 100%;
    }
    .p3r-menu-item {
        justify-content: flex-start;
        padding: 8px 12px;
    }
    .p3r-item-index {
        min-width: 24px;
    }
    .p3r-item-text {
        letter-spacing: 2px;
        text-align: left;
    }

    .p3r-menu-content {
        padding: 80px 24px 60px;
        align-items: center;
    }
    .p3r-menu-footer {
        padding-left: 12px;
        opacity: 1;
        animation: none;
    }
    .p3r-menu-overlay.open .p3r-menu-footer {
        transform: none;
    }
    .p3r-item-text {
        font-size: clamp(22px, 6vw, 32px);
    }
    .hero {
        justify-content: center;
        text-align: center;
        padding: 80px 20px 60px;
        gap: 40px;
    }
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-greeting { padding-right: 0; }
    .hero-greeting::after { display: none; }
    .hero-title-wrapper { justify-content: center; }
    .hero-description { max-width: 100%; margin-left: 0; }
    .hero-cta { justify-content: center; }
    .hero-socials { justify-content: center; }
    .scroll-indicator { display: none; }
    .skills-grid { grid-template-columns: 1fr; }
    .tarot-card { height: 360px; }
    .contact-strip { padding: 22px 20px; gap: 16px; }
    .projects-grid { display: flex; }
    .p3r-topbar { padding: 14px 20px; }
    .p3r-topbar.scrolled { padding: 12px 20px; }
    .timeline { padding-left: 32px; }
    .timeline-dot { left: -32px; }
}

@media (max-width: 480px) {
    .p3r-menu-list {
        max-width: 100%;
    }
    .p3r-menu-item {
        padding: 8px 10px;
    }
    .p3r-item-text {
        font-size: clamp(18px, 6vw, 24px);
        letter-spacing: 1.5px;
    }
    .hero-name { font-size: 40px; }
    .section-title { font-size: 24px; }
    .about-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 18px 12px; }
    .stat-number { font-size: 28px; }
    .btn { padding: 12px 22px; font-size: 12px; }
    .strip-value { font-size: 14px; }
    .contact-strip { padding: 18px 16px; gap: 12px; clip-path: none; }
}

/* ==============================
   âš¡ INTERACTIVE OVERLAY CANVASES
   ============================== */
#lanyard-canvas,
#sparkle-canvas,
#gravity-canvas,
#audio-reactive-canvas,
#dvd-canvas,
#vortex-canvas {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    display: none;
}

#lanyard-canvas.active {
    display: block;
    pointer-events: auto;
}

#sparkle-canvas.active {
    display: block;
}

#gravity-canvas.active {
    display: block;
    pointer-events: auto;
}
#audio-reactive-canvas.active {
    display: block;
}
#dvd-canvas.active {
    display: block;
    pointer-events: auto;
}
#vortex-canvas.active {
    display: block;
    pointer-events: auto;
}

/* ==============================
   âš¡ INTERACTIVE TOGGLE PANEL â€” P3R
   ============================== */
/* ==============================
   ðŸ“± PHONE UI
   ============================== */

/* Backdrop */
.phone-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.phone-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ======================================================
   📱 PHONE PANEL — COZY BLUE POLAROID WIDGET (OPTION C.3)
   ====================================================== */

/* Panel container */
.phone-panel {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* ── Cozy PC Trigger ── */
.pc-trigger {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    background: rgba(26, 32, 54, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: rgba(96, 165, 250, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(96, 165, 250, 0.03);
    position: relative;
    z-index: 2;
    text-decoration: none;
}

.pc-trigger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 40px rgba(96, 165, 250, 0.25), inset 0 0 12px rgba(96, 165, 250, 0.08);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.45);
}

.pc-trigger:active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.6);
    color: #60a5fa;
}

/* ── Cozy Phone Trigger: Rounded Glow Capsule ── */
.phone-trigger {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    background: rgba(26, 32, 54, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: rgba(96, 165, 250, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(96, 165, 250, 0.03);
    position: relative;
    z-index: 2;
}

.phone-trigger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 40px rgba(96, 165, 250, 0.25), inset 0 0 12px rgba(96, 165, 250, 0.08);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.45);
}

.phone-trigger.active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.6);
    color: #60a5fa;
    box-shadow: 0 0 24px rgba(96, 165, 250, 0.3), inset 0 0 12px rgba(96, 165, 250, 0.1);
}

/* ── Phone frame — Glassmorphic Capsule with Smooth Slide Transition ── */
.phone-frame {
    position: absolute;
    bottom: 134px;
    right: 0;
    width: 310px;
    /* Deep midnight lofi blue glow background */
    background: radial-gradient(circle at top, rgba(96, 165, 250, 0.08), transparent 75%), 
                linear-gradient(160deg, rgba(20, 26, 46, 0.94) 0%, rgba(12, 16, 28, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(96, 165, 250, 0.04),
        inset 0 0 24px rgba(255, 255, 255, 0.02);

    /* Lag-free optimized translation only (GPU accelerated) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    will-change: transform, opacity;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                visibility 0.3s;
}

.phone-frame.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Status Bar */
.phone-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 6px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    position: relative;
    z-index: 2;
    font-family: 'Outfit', sans-serif;
}

.phone-notch {
    width: 72px;
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-status-icons {
    display: flex;
    gap: 6px;
    color: rgba(255, 255, 255, 0.35);
}

.phone-time {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #60a5fa;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.35);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

/* Glowing night sky crescent moon next to clock */
.phone-time::before {
    content: '🌙';
    font-size: 12px;
    margin-right: 6px;
    color: #60a5fa;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
    display: inline-block;
}

/* Phone content container */
.phone-content {
    padding: 6px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* Home pill bar */
.phone-home-bar {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin: 8px auto 12px;
}

/* ======================================================
   🎵 MEDIA PLAYER — Bedside Polaroid Picture Player
   ====================================================== */
.media-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    border-radius: 20px;
    position: relative;
    overflow: visible; /* Let sticky tape overflow */
}

/* Cozy Polaroid Snapshot frame */
.media-widget-art {
    width: 62px;
    height: 72px; /* Taller than wide like a polaroid */
    border-radius: 4px;
    background: #faf9f6;
    padding: 4px 4px 14px 4px; /* Thick bottom border for snapshot text feel */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.15);
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    position: relative;
    flex-shrink: 0;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

/* Gentle swaying animation from the top sticky tape when music plays */
.media-widget-art.spinning {
    animation: lofi-sway 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes lofi-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.media-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Sticky Tape decoration on polaroid */
.media-widget-art::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 28px;
    height: 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 5;
    pointer-events: none;
}

/* Song info block */
.media-widget-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.media-song-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #f8f9fa;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.media-song-title.marquee { text-overflow: clip; }
.media-song-title.marquee .marquee-inner {
    display: inline-block;
    padding-right: 40px;
    animation: marquee-scroll 8s linear infinite;
}

.media-song-artist {
    font-family: 'Outfit', sans-serif;
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-song-artist.marquee { text-overflow: clip; }
.media-song-artist.marquee .marquee-inner {
    display: inline-block;
    padding-right: 32px;
    animation: marquee-scroll 10s linear infinite;
}

/* Gyro parallax system alignment */
body.gyro-enabled #particle-canvas,
body.gyro-enabled #phone-panel,
body.gyro-enabled .hero {
    will-change: transform;
    transition: transform 0.08s linear;
}

/* Cozy Custom Progress Bar */
.media-progress-wrap { margin-top: 4px; }

.media-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #60a5fa 0%, #60a5fa var(--progress, 0%), rgba(255, 255, 255, 0.08) var(--progress, 0%));
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

/* Slider Thumbs */
.media-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #60a5fa;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
    transition: transform 0.15s ease;
}
.media-progress::-webkit-slider-thumb:hover {
    transform: scale(1.35);
}
.media-progress::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #60a5fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
    transition: transform 0.15s ease;
}
.media-progress::-moz-range-thumb:hover {
    transform: scale(1.35);
}

/* Chrome progress update track */
.media-progress::-webkit-slider-runnable-track {
    background: transparent;
    height: 4px;
}

.media-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 3px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

/* Controls */
.media-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.media-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.media-btn:hover {
    color: #60a5fa;
    background: rgba(255, 255, 255, 0.03);
    filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.4));
}

.media-btn.shuffle-active { 
    color: #60a5fa; 
    filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.5));
}

.media-btn-sm { width: 26px; height: 26px; }

/* Circular glowing play button */
.media-btn-play {
    width: 38px;
    height: 38px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #60a5fa;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.1);
}

.media-btn-play:hover {
    background: rgba(96, 165, 250, 0.22);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
    transform: scale(1.05);
}

/* ======================================================
   🎛️ TOGGLE TILES — Soft Cozy Cards (Mixed Asymmetric Layout)
   ====================================================== */
.phone-toggles-pager {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-snap-stop: always;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}
.phone-toggles-pager::-webkit-scrollbar { display: none; }

.phone-toggles-page {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    scroll-snap-align: start;
}

/* Pager dots */
.phone-toggles-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.phone-dot {
    width: 12px;
    height: 5px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-dot.active {
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
    width: 24px;
}

/* Base Card Style */
.phone-toggle-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 4px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.45);
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.phone-toggle-tile:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

.phone-toggle-tile.active {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.45);
    color: #60a5fa;
    box-shadow: 
        0 4px 16px rgba(96, 165, 250, 0.06), 
        inset 0 0 8px rgba(96, 165, 250, 0.03);
}

.phone-toggle-tile.active .tile-icon svg {
    filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.75));
}

/* Icon */
.tile-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: filter 0.25s ease;
}

/* Soft font style label */
.tile-label {
    font-size: 8.5px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.4px;
    color: inherit;
    font-family: 'Outfit', sans-serif;
    transition: color 0.25s ease;
}

/* ── Mixed Asymmetric Width Targets (Span 2 Grid Cards) ── */
.phone-toggle-tile[data-feature="lanyard"],
.phone-toggle-tile[data-feature="magnetic"],
.phone-toggle-tile[data-feature="trail"],
.phone-toggle-tile[data-feature="glitch"],
.phone-toggle-tile[data-feature="audioReactive"],
.phone-toggle-tile[data-feature="dvd"] {
    grid-column: span 2;
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 14px;
    gap: 12px;
    align-items: center;
}

.phone-toggle-tile[data-feature="lanyard"] .tile-label,
.phone-toggle-tile[data-feature="magnetic"] .tile-label,
.phone-toggle-tile[data-feature="trail"] .tile-label,
.phone-toggle-tile[data-feature="glitch"] .tile-label,
.phone-toggle-tile[data-feature="audioReactive"] .tile-label,
.phone-toggle-tile[data-feature="dvd"] .tile-label {
    font-size: 9.5px;
    letter-spacing: 0.2px;
    text-align: left;
}

/* ---- Responsive Mobile adaptation ---- */
@media (max-width: 480px) {
    .phone-panel { bottom: 16px; right: 16px; gap: 8px; }
    .phone-trigger, .pc-trigger { width: 48px; height: 48px; }
    .phone-frame {
        width: min(92vw, 310px);
        max-height: 74vh;
        border-radius: 24px;
        bottom: 118px;
    }
    .phone-content {
        padding: 6px 12px 6px;
        gap: 10px;
        overflow-y: auto;
        max-height: calc(74vh - 70px);
    }
    .media-widget { padding: 10px; gap: 10px; border-radius: 16px; }
    .media-widget-art { width: 56px; height: 56px; }
    .media-controls { gap: 6px; }
    .media-btn { width: 28px; height: 28px; }
    .media-btn-play { width: 34px; height: 34px; }
    .phone-toggles-page { gap: 6px; }
    
    .phone-toggle-tile { padding: 10px 4px; gap: 4px; border-radius: 12px; }
    .tile-icon { width: 22px; height: 22px; }
    .tile-icon svg { width: 18px; height: 18px; }
    .tile-label { font-size: 7.5px; }

    /* Span 2 horizontal padding fixes on mobile */
    .phone-toggle-tile[data-feature="lanyard"],
    .phone-toggle-tile[data-feature="magnetic"],
    .phone-toggle-tile[data-feature="trail"],
    .phone-toggle-tile[data-feature="glitch"],
    .phone-toggle-tile[data-feature="audioReactive"],
    .phone-toggle-tile[data-feature="dvd"] {
        padding: 8px 10px;
        gap: 8px;
    }
    .phone-toggle-tile[data-feature="lanyard"] .tile-label,
    .phone-toggle-tile[data-feature="magnetic"] .tile-label,
    .phone-toggle-tile[data-feature="trail"] .tile-label,
    .phone-toggle-tile[data-feature="glitch"] .tile-label,
    .phone-toggle-tile[data-feature="audioReactive"] .tile-label,
    .phone-toggle-tile[data-feature="dvd"] .tile-label {
        font-size: 8.5px;
    }
}
