/* style.css */
/* CSS Variables for Theme */
:root {
  --bg-color: #000;
  --text-color: #fff;
  --header-bg: transparent;
  --header-backdrop: none;
  --accent-color: #1E40AF;
  --project-card-bg: rgba(255, 255, 255, 0.03);
  --project-card-hover-bg: rgba(255, 255, 255, 0.05);
  --project-placeholder-bg: rgba(255, 255, 255, 0.05);
  --footer-color: #fff;
  --nav-link-color: #fff;
  --nav-link-hover: rgba(255, 255, 255, 0.7);
  --section-bg: transparent;
  --title-color: #fff;
  --subtitle-color: rgba(255, 255, 255, 0.8);
  --about-content-color: rgba(255, 255, 255, 0.9);
  --construction-banner-color : #fff;
  --grid-lines-color: rgba(255, 255, 255, 0.1);
  --grid-dots-color: rgba(255, 255, 255, 0.14);
  --stars-color: #fff;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-color: #fff;
  --text-color: #000;
  --header-bg: transparent;
  --header-backdrop: none;
  --accent-color: #1E40AF;
  --project-card-bg: rgba(0, 0, 0, 0.03);
  --project-card-hover-bg: rgba(0, 0, 0, 0.05);
  --project-placeholder-bg: rgba(0, 0, 0, 0.05);
  --footer-color: #000;
  --nav-link-color: #000;
  --nav-link-hover: rgba(0, 0, 0, 0.7);
  --section-bg: transparent;
  --title-color: #000;
  --subtitle-color: rgba(0, 0, 0, 0.8);
  --about-content-color: rgba(0, 0, 0, 0.9);
  --construction-banner-color : #000;
  --grid-lines-color: rgba(0, 0, 0, 0.1);
  --grid-dots-color: rgba(0, 0, 0, 0.14);
  --stars-color: #000;
}

/* Ensure default dark theme values are properly set */
[data-theme="dark"] {
  --header-bg: transparent;
  --header-backdrop: none;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Ez grid */
body {
    background-size: 40px 40px; 
    background-image: 
    linear-gradient(to right, var(--grid-lines-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-lines-color) 1px, transparent 1px),
    radial-gradient(circle, var(--grid-dots-color) 2px, transparent 1px);
    background-position: 0 0, 0 0, 20px 20px;
    font-family: 'Handjet', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Star Animation Styles */
main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

main div {
    background-color: var(--stars-color);
    width: 2px;
    height: 2px;
    border-radius: 50%;
    /* Add glow effect */
    box-shadow: 0 0 4px var(--stars-color), 0 0 8px var(--stars-color);
    /* Make glow more intense for larger stars */
    transition: box-shadow 0.1s ease;
}

/* Shooting Stars Styles */
#shootingStars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.shooting-star {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: goldenrod;
    border-radius: 50%;
    box-shadow: 
        0 0 10px 2px goldenrod,
        0 0 20px 4px goldenrod,
        0 0 30px 6px goldenrod;
    animation: shootingStar 2s linear forwards;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.7;
}

@keyframes shootingStar {
    0% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) scale(0);
        opacity: 0;
    }
}


/* Layout */
.screen {
    position: relative;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    backdrop-filter: var(--header-backdrop);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    backdrop-filter: var(--header-backdrop);
    -webkit-backdrop-filter: var(--header-backdrop);
}

.logo {
    padding: 10px 20px;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.nav a:hover {
    opacity: var(--nav-link-hover);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 0;
}

.title {
    font-size: 80px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--title-color);
}

.rotating-word {
    display: inline-block;
    color: var(--accent-color);
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-color);
    position: relative;
    vertical-align: baseline;
    line-height: 1.2;
    min-width: 100px; /* Ensure consistent width */
    height: 1.2em; /* Match line height */
    margin: 0 5px; /* Add some spacing */
    font-size: 48px; /* Match the title font size */
    font-weight: 700;
    /* Ensure perfect alignment */
    transform: translateY(0);
    /* Make sure it doesn't affect line height */
    line-height: inherit;
}

/* The typewriter animation is handled by JavaScript */
.rotating-word.typing {
    border-right: 2px solid var(--accent-color);
    animation: none;
}

.rotating-word.typed {
    animation: none;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--footer-color);
}

/* Section Styles */
.section {
    padding: 80px 0;
    width: 100%;
    background: var(--section-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.5px;
    color: var(--title-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 30px;
    color: var(--about-content-color);
}
.about-content a {
    text-decoration: none;
    color: var(--text-color)
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Mobile responsiveness for projects grid */
@media screen and (max-width: 700px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--project-card-bg);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    background: var(--project-card-hover-bg);
}

.project-placeholder {
    width: 100%;
    height: 200px;
    background: var(--project-placeholder-bg);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

/* Ensure proper layering of overlays */
.project-placeholder .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.project-placeholder .noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.project-placeholder .project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    filter: blur(50px); /* Aggressive blur for mysterious effect */
}

/* Gradient overlay for project cards */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(45deg, 
        #ff0000, #ff8000, #ffff00, #80ff00, 
        #00ff00, #00ff80, #00ffff, #0080ff, 
        #0000ff, #8000ff, #ff00ff, #ff0080);
    background-size: 1200% 1200%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.8;
}

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

/* Additional gradient variations for different project cards */
.project-card:nth-child(1) .gradient-overlay {
    background: linear-gradient(45deg, 
        #ff6b6b, #ffa500, #ffd166, #06d6a0, 
        #118ab2, #073b4c, #8338ec, #e63946);
    background-size: 1200% 1200%;
    animation: gradientShift 20s ease infinite;
}

.project-card:nth-child(2) .gradient-overlay {
    background: linear-gradient(45deg, 
        #00c9ff, #92fe9d, #f093fb, #f5576c, 
        #ff6b6b, #ffa500, #ffd166, #06d6a0);
    background-size: 1200% 1200%;
    animation: gradientShift 18s ease infinite;
}

.project-card:nth-child(3) .gradient-overlay {
    background: linear-gradient(45deg, 
        #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb, 
        #84fab0, #8fd3f4, #a1c4fd, #c2e9fb);
    background-size: 1200% 1200%;
    animation: gradientShift 22s ease infinite;
}

.project-card:nth-child(4) .gradient-overlay {
    background: linear-gradient(45deg, 
        #d4fc79, #96e6a1, #a1c4fd, #c2e9fb, 
        #84fab0, #8fd3f4, #a1c4fd, #c2e9fb);
    background-size: 1200% 1200%;
    animation: gradientShift 16s ease infinite;
}


.project-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--title-color);
}

.project-description {
    font-size: 20px;
    opacity: 0.8;
    line-height: 1.6;
    color: var(--text-color);
}

/* Style for general paragraph elements */
p {
    font-size: 32px;
    line-height: 1.6;
    margin-bottom: 15px;
}


/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Construction Banner Styles */
.construction-banner {
    background-color: transparent;
    color: var(--construction-banner-color);
    padding: 8px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: transparent;
    z-index: 1000;
    margin: 0;
    padding: 8px 0;
}

.construction-text {
    display: inline-block;
    animation: scrollText 45s linear infinite;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1px;
    text-align: center;
    min-width: 240%; /* Single width */
    font-family: 'Cairo', sans-serif;
}

.subtitle {
    font-size: 40px;
    opacity: 0.8;
    max-width: 900px;
    margin-bottom: 40px;
    color: var(--subtitle-color);
    font-family: 'Cairo', 'Handjet', sans-serif;
}

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

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
