/**
 * AlexDev Custom Styles
 *
 * All custom CSS from the original template + WordPress overrides
 * Loaded after the main stylesheet
 *
 * @package AlexDev
 * @version 1.0.0
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

/* ==========================================================================
   CUSTOM SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a12;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f0ff, #a855f7);
    border-radius: 3px;
}

/* ==========================================================================
   NOISE OVERLAY
   ========================================================================== */

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   ANIMATED GRID BACKGROUND
   ========================================================================== */

.cyber-grid {
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% {
        background-size: 60px 60px;
        opacity: 0.5;
    }
    50% {
        background-size: 65px 65px;
        opacity: 0.8;
    }
}

/* ==========================================================================
   NEON GLOW EFFECTS
   ========================================================================== */

.neon-glow {
    box-shadow:
        0 0 5px rgba(0, 240, 255, 0.5),
        0 0 20px rgba(0, 240, 255, 0.3),
        0 0 40px rgba(0, 240, 255, 0.1);
}

.neon-text {
    text-shadow:
        0 0 5px rgba(0, 240, 255, 0.8),
        0 0 20px rgba(0, 240, 255, 0.5),
        0 0 40px rgba(0, 240, 255, 0.3);
}

.neon-border {
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow:
        inset 0 0 20px rgba(0, 240, 255, 0.05),
        0 0 20px rgba(0, 240, 255, 0.1);
}

/* ==========================================================================
   FLOATING ORB ANIMATION
   ========================================================================== */

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 20s ease-in-out infinite;
}

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

/* ==========================================================================
   TERMINAL CURSOR
   ========================================================================== */

.cursor::after {
    content: '█';
    animation: blink 1s step-end infinite;
    color: #00f0ff;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ==========================================================================
   GLITCH TEXT EFFECT
   ========================================================================== */

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch1 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    color: #ff00e5;
}

.glitch::after {
    animation: glitch2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    color: #00ff88;
}

@keyframes glitch1 {
    0%, 100% {
        transform: translate(0);
    }
    10% {
        transform: translate(-3px, 2px);
    }
    20% {
        transform: translate(3px, -2px);
    }
    30% {
        transform: translate(-2px, 3px);
    }
    40% {
        transform: translate(2px, -3px);
    }
}

@keyframes glitch2 {
    0%, 100% {
        transform: translate(0);
    }
    15% {
        transform: translate(2px, 3px);
    }
    25% {
        transform: translate(-3px, -2px);
    }
    35% {
        transform: translate(3px, 2px);
    }
    45% {
        transform: translate(-2px, -3px);
    }
}

/* ==========================================================================
   HEXAGON PATTERN
   ========================================================================== */

.hex-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2300f0ff' fill-opacity='0.05'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   SKILL BAR ANIMATION
   ========================================================================== */

.skill-bar {
    position: relative;
    overflow: hidden;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.skill-fill {
    width: 0;
    transition: width 1.5s ease-out;
}

/* ==========================================================================
   CARD HOVER EFFECT
   ========================================================================== */

.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 240, 255, 0.15),
        0 0 100px rgba(168, 85, 247, 0.1);
}

.card-hover:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   FLOATING PARTICLES
   ========================================================================== */

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================================================
   MAGNETIC BUTTON EFFECT
   ========================================================================== */

.magnetic-btn {
    position: relative;
    overflow: hidden;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0,240,255,0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.magnetic-btn:hover::before {
    width: 300%;
    height: 300%;
}

/* ==========================================================================
   SECTION REVEAL ANIMATION
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   TYPING ANIMATION
   ========================================================================== */

.typing-text {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end) infinite;
}

@keyframes typing {
    0% {
        width: 0;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0;
    }
}

/* ==========================================================================
   MARQUEE ANIMATION
   ========================================================================== */

.marquee {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   PULSE RING EFFECT
   ========================================================================== */

.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: inherit;
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* ==========================================================================
   NAVIGATION ACTIVE LINK
   ========================================================================== */

.nav-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00f0ff, #a855f7);
}

/* ==========================================================================
   INPUT FOCUS GLOW
   ========================================================================== */

.input-glow:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow:
        0 0 0 3px rgba(0, 240, 255, 0.1),
        0 0 30px rgba(0, 240, 255, 0.2);
}

/* ==========================================================================
   TILT CARD EFFECT
   ========================================================================== */

.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ==========================================================================
   COUNTER ANIMATION
   ========================================================================== */

.counter {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   SCAN LINE EFFECT
   ========================================================================== */

.scan-line::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    animation: scanLine 4s linear infinite;
    z-index: 9999;
    opacity: 0.3;
}

@keyframes scanLine {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

/* ==========================================================================
   LOADING ANIMATION
   ========================================================================== */

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid transparent;
    border-top-color: #00f0ff;
    border-right-color: #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   RIPPLE EFFECT
   ========================================================================== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 200%;
    height: 200%;
}

/* ==========================================================================
   GLASS EFFECT
   ========================================================================== */

.glass {
    background: rgba(15, 15, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   GRADIENT TEXT ANIMATION
   ========================================================================== */

.gradient-text {
    background: linear-gradient(90deg, #00f0ff, #a855f7, #ff00e5, #00ff88);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
}

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

/* ==========================================================================
   FLOAT ANIMATION (for floating stats)
   ========================================================================== */

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

.float-anim {
    animation: float 4s ease-in-out infinite;
}

/* ==========================================================================
   WORDPRESS SPECIFIC OVERRIDES
   ========================================================================== */

/* WordPress alignment */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* WordPress caption */
.wp-caption {
    max-width: 100%;
}

.wp-caption img {
    max-width: 100%;
    height: auto;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--void-400, #6868a0);
    text-align: center;
    margin-top: 0.5rem;
}

/* WordPress gallery caption */
.gallery-caption {
    font-size: 0.875rem;
    color: var(--void-400, #6868a0);
}

/* WordPress blockquote */
blockquote {
    border-left: 4px solid var(--neon-cyan, #00f0ff);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--void-300, #9090b0);
}

blockquote cite {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: var(--void-400, #6868a0);
    font-style: normal;
}

/* WordPress pre/code */
pre {
    background: var(--void-800, #0f0f20);
    border: 1px solid var(--void-700, #1a1a35);
    border-radius: 0.75rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

code {
    background: var(--void-800, #0f0f20);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--neon-cyan, #00f0ff);
}

pre code {
    background: transparent;
    padding: 0;
    color: var(--void-200, #c0c0d5);
}

/* WordPress table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th,
table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--void-700, #1a1a35);
    text-align: left;
}

table th {
    background: var(--void-800, #0f0f20);
    color: var(--neon-cyan, #00f0ff);
    font-weight: 600;
}

table tr:nth-child(even) {
    background: rgba(15, 15, 32, 0.3);
}

/* WordPress search form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--void-950, #050508);
    border: 1px solid var(--void-700, #1a1a35);
    border-radius: 0.75rem;
    color: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form .search-field:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.search-form .search-submit {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00f0ff, #a855f7);
    border: none;
    border-radius: 0.75rem;
    color: #050508;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form .search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

/* WordPress comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--void-800, #0f0f20);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--void-800, #0f0f20);
}

.comment-body {
    display: flex;
    gap: 1rem;
}

.comment-author {
    flex-shrink: 0;
}

.comment-author img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-content-wrap {
    flex: 1;
}

.comment-meta-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-author .fn {
    font-weight: 600;
    color: white;
    font-style: normal;
}

.comment-metadata {
    font-size: 0.75rem;
    color: var(--void-500, #4a4a7a);
}

.comment-text {
    color: var(--void-300, #9090b0);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.comment-text p {
    margin-bottom: 0.75rem;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 0.5rem;
}

.comment-reply-link {
    font-size: 0.75rem;
    color: var(--neon-cyan, #00f0ff);
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-reply-link:hover {
    color: white;
}

/* Comment form */
.comment-respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    font-size: 0.875rem;
    color: var(--void-300, #9090b0);
    margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--void-950, #050508);
    border: 1px solid var(--void-700, #1a1a35);
    border-radius: 0.75rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form p {
    margin-bottom: 1rem;
}

.form-submit .submit {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #00f0ff, #a855f7);
    border: none;
    border-radius: 0.75rem;
    color: #050508;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

/* WordPress pagination */
.pagination,
.post-navigation,
.comments-pagination {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--void-800, #0f0f20);
}

.pagination .nav-links,
.post-navigation .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.pagination .page-numbers,
.post-navigation .post-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--void-900, #0a0a12);
    border: 1px solid var(--void-700, #1a1a35);
    border-radius: 0.5rem;
    color: var(--void-300, #9090b0);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: linear-gradient(135deg, #00f0ff, #a855f7);
    border-color: transparent;
    color: #050508;
    font-weight: 700;
}

/* WordPress admin bar spacing */
.admin-bar #navbar {
    top: 32px;
}

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .glitch::before,
    .glitch::after {
        display: none;
    }

    .scan-line::after {
        display: none;
    }

    .admin-bar #navbar {
        top: 46px;
    }
}

@media (max-width: 480px) {
    .admin-bar #navbar {
        top: 0;
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   PROSE / CONTENT STYLES (for blog posts)
   ========================================================================== */

.prose {
    color: var(--void-300, #9090b0);
    line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: white;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.prose h1 { font-size: 2.5rem; }
.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose p {
    margin-bottom: 1.5rem;
}

.prose a {
    color: var(--neon-cyan, #00f0ff);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.prose a:hover {
    color: white;
    border-color: white;
}

.prose ul,
.prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose strong {
    color: white;
    font-weight: 600;
}

.prose hr {
    border: none;
    border-top: 1px solid var(--void-700, #1a1a35);
    margin: 2rem 0;
}

/* ==========================================================================
   ELEMENTOR COMPATIBILITY FIXES
   ========================================================================== */

.elementor-widget-heading .elementor-heading-title {
    font-family: 'Space Grotesk', sans-serif;
}

.elementor-widget-text-editor {
    font-family: 'Space Grotesk', sans-serif;
}

.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-description {
    font-family: 'Space Grotesk', sans-serif;
}

.elementor-widget-button .elementor-button {
    font-family: 'Space Grotesk', sans-serif;
}

/* ==========================================================================
   LINE CLAMP UTILITIES
   ========================================================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
