/* 
   Brad Does Tech - Main Stylesheet
   Colors:
   - Orange: #FF7F00 (accent)
   - White: #FFFFFF (backgrounds/text)
   - Dark Grey: #333333 (contrast)
*/

/* ---------- Scroll Progress Indicator ---------- */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    z-index: 2000;
}

.scroll-progress-bar {
    height: 100%;
    background-color: var(--orange);
    width: 0%;
    transition: width 0.1s ease;
}

/* ---------- Base Styles ---------- */
:root {
    /* Light Mode (Default) */
    --orange: #FF7F00;
    --white: #FFFFFF;
    --dark-grey: #333333;
    --light-grey: #F5F5F5;
    --medium-grey: #DDDDDD;
    --text-dark: #222222;
    --text-light: #777777;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Background and Text Colors */
    --bg-primary: var(--white);
    --bg-secondary: var(--light-grey);
    --bg-tertiary: var(--dark-grey);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-light);
    --text-on-dark: var(--white);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --bg-tertiary: #2D2D2D;
    --text-primary: #E0E0E0;
    --text-secondary: #AAAAAA;
    --text-on-dark: #E0E0E0;
    --light-grey: #2D2D2D;
    --medium-grey: #555555;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    line-height: 1.2;
}

p {
    margin-bottom: 15px;
}

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

a:hover {
    color: #E67300; /* Darker orange */
}

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

.btn {
    display: inline-block;
    background-color: var(--orange);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #E67300; /* Darker orange */
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 127, 0, 0.3);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--orange);
}

/* ---------- Header & Navigation ---------- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-tertiary);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-on-dark);
}

.logo img {
    height: 50px;
    margin-right: 12px;
}

.logo span {
    font-size: 24px;
    font-weight: 700;
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    color: var(--text-on-dark);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--orange);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--orange);
}

.theme-toggle {
    font-size: 20px;
    cursor: pointer;
    color: var(--text-on-dark);
    margin-right: 20px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--orange);
    transform: rotate(30deg);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-on-dark);
}

/* ---------- Hero Section ---------- */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 70px; /* Account for fixed header */
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--white);
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-content h1,
.hero-content h2,
.hero-content p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--white);
}

.hero-content h2 {
    font-size: 24px;
    color: var(--orange);
    margin-bottom: 20px;
    min-height: 28px; /* Prevent layout shift during typing */
}

.typed-cursor {
    color: var(--orange);
    font-size: 24px;
    opacity: 1;
    animation: blink 0.7s infinite;
}

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

.hero-content p {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 30px;
}

.hero-content .btn {
    position: relative;
    z-index: 3;
}

/* ---------- Updates/Posts Section ---------- */
#updates {
    background-color: var(--bg-primary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 25px;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-date {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.post h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    font-weight: 600;
    margin-top: 10px;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 10px;
}

/* ---------- Services Section ---------- */
#services {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 127, 0, 0.1) 0%, rgba(255, 255, 255, 0) 75%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service:hover {
    transform: translateY(-5px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service:hover::before {
    opacity: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.service:hover .service-icon {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 127, 0, 0.3);
}

.service-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.service:hover .service-icon::after {
    opacity: 0.3;
}

.service h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* ---------- Projects Section ---------- */
#projects {
    background-color: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.project:nth-child(even) {
    direction: rtl;
}

.project:nth-child(even) .project-info {
    direction: ltr;
}

.project-img {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.project-img img {
    transition: var(--transition);
    width: 100%;
}

.project:hover .project-img img {
    transform: scale(1.05);
}

.project-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.project-tech {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ---------- Testimonials Section ---------- */
#testimonials {
    background-color: var(--bg-secondary);
    position: relative;
}

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.testimonial-fade {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.testimonial-fade.hidden {
    display: none;
}

.testimonial-fade.fade-out {
    opacity: 0;
}

.testimonial-content {
    font-style: italic;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    font-size: 60px;
    color: var(--orange);
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: -15px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.author-name {
    font-weight: 600;
    font-size: 18px;
}

.author-title {
    color: var(--text-secondary);
    font-size: 14px;
}

.rating {
    color: var(--orange);
    margin-top: 5px;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.prev-btn, .next-btn {
    background-color: var(--bg-primary);
    color: var(--orange);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--orange);
    color: var(--white);
}

/* ---------- Contact Section ---------- */
#contact {
    background-color: var(--bg-primary);
}

.contact-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-grey);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--orange);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 127, 0, 0.2);
}

.form-note {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.contact-info {
    padding: 30px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--bg-secondary);
    color: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--orange);
    color: var(--white);
    transform: translateY(-3px);
}

/* ---------- Footer ---------- */
#footer {
    background-color: var(--bg-tertiary);
    color: var(--text-on-dark);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.footer-links h4,
.footer-social h4 {
    color: var(--orange);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--medium-grey);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-social .social-links {
    margin-top: 15px;
}

.footer-social .social-link {
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--medium-grey);
}

.footer-bottom a {
    color: var(--medium-grey);
}

.footer-bottom a:hover {
    color: var(--orange);
}

/* ---------- Back to Top Button ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

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

.back-to-top:hover {
    background-color: #E67300;
    transform: translateY(-5px);
}

/* ---------- Under Construction Overlay ---------- */
.under-construction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    /* The transition is added via JavaScript to prevent the fade effect on initial page load */
}

.under-construction-box {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--orange);
}

.under-construction-box h2 {
    color: var(--orange);
    margin-bottom: 15px;
    font-size: 28px;
}

.under-construction-box p {
    margin-bottom: 20px;
}

.under-construction-box .btn {
    margin-top: 10px;
}

.under-construction-icon {
    font-size: 50px;
    color: var(--orange);
    margin-bottom: 20px;
}

/* ---------- Responsive Styles ---------- */
@media screen and (max-width: 992px) {
    .project {
        grid-template-columns: 1fr;
    }
    
    .project:nth-child(even) {
        direction: ltr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--bg-tertiary);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content h2 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

@media screen and (max-width: 576px) {
    section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-image {
        max-width: 100%;
    }
    
    .posts-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        align-items: center;
    }
}
