/*
Theme Name: Bilal Portfolio Child Theme
Theme URI: https://flatlogic.com/
Description: A custom child theme for Bilal Taha's Portfolio.
Author: Flatlogic
Template: twentytwentyfive
Version: 1.0.0
*/

:root {
    --wp--preset--color--vibrant-blue: #007bff;
    --wp--preset--color--soft-gray: #f8f9fa;
    --transition-speed: 0.4s;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 20px 40px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    scroll-behavior: smooth;
}

/* Hero Section */
.is-style-rounded img {
    border-radius: 50%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    transition: transform 0.5s ease;
}

.is-style-rounded img:hover {
    transform: scale(1.02) rotate(2deg);
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Card Styles */
.wp-block-column, .wp-block-group.has-border-color {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wp-block-column:hover, .wp-block-group.has-border-color:hover {
    transform: translateY(-10px);
    border-color: var(--wp--preset--color--vibrant-blue);
    box-shadow: var(--card-shadow-hover);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.wp-block-group > * {
    /* Removing default animation to use Intersection Observer */
}

/* Dark Mode Toggle & Back to Top */
#dark-mode-toggle, #back-to-top {
    position: fixed;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--wp--preset--color--vibrant-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 20px;
}

#dark-mode-toggle { bottom: 30px; }
#back-to-top { 
    bottom: 95px;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#dark-mode-toggle:hover, #back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

/* Floating Action Button (Telegram) */
.fab-telegram {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #24A1DE;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 24px;
}

.fab-telegram:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--wp--preset--color--vibrant-blue);
    z-index: 9999;
}

/* Dark Mode Overrides */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .wp-block-column, 
body.dark-mode .wp-block-group.has-border-color,
body.dark-mode .wp-block-query.alignwide .wp-block-group {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark-mode .wp-block-group.has-base-background-color {
    background-color: #121212 !important;
}

body.dark-mode .wp-block-group.has-base-2-background-color {
    background-color: #1a1a1a !important;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: #fff; }
body.dark-mode p { color: #aaa; }

/* Skills Grid (Custom Class) */
.skills-grid .wp-block-column {
    text-align: center;
}

.skills-grid .skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Testimonials Decoration */
.wp-block-column p[style*="font-style:italic"]::before {
    content: "“";
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: -10px;
    opacity: 0.1;
    color: var(--wp--preset--color--vibrant-blue);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--wp--preset--color--vibrant-blue) !important;
    border-radius: 30px !important;
}

.newsletter-section input[type="email"] {
    border-radius: 50px;
    padding: 15px 25px;
    border: none;
    width: 100%;
    max-width: 400px;
}

/* Projects Grid */
.wp-block-query.alignwide .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Work Process Step */
.process-step {
    position: relative;
    padding: 40px;
}

.process-step::after {
    content: "→";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--wp--preset--color--vibrant-blue);
    opacity: 0.3;
}

.wp-block-column:last-child .process-step::after {
    display: none;
}

@media (max-width: 781px) {
    .process-step::after {
        content: "↓";
        right: 50%;
        bottom: -20px;
        top: auto;
        transform: translateX(50%);
    }
}

.process-number {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.05;
    color: var(--wp--preset--color--vibrant-blue);
}

/* Service Card Fixes */
.service-card {
    border-top: 5px solid var(--wp--preset--color--vibrant-blue) !important;
}