/* Base Styles */
:root {
    --primary-color: #00FF00;
    --primary-color-rgb: 0, 255, 0;
    --text-color: #00FF00;
    --bg-color: #000;
    --header-bg: #000;
    --header-text: #00FF00;
    --footer-bg: #000;
    --footer-text: #00FF00;
    --border-color: #00FF00;
}

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

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    opacity: 0.8;
}

/* Header */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible; /* Allow satellite to extend outside */
    min-height: 60px; /* Ensure enough height for satellite */
    /* Prevent content from being placed under z-position: absolute elements */
    transform: translateZ(0);
}

header .container {
    display: flex;
    flex-direction: column;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 10;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Active state for mobile toggle */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.main-nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.main-nav li {
    margin: 0 0.75rem;
}

.main-nav a {
    color: var(--header-text);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
    display: block;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

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

.main-nav a:hover, .main-nav .active a {
    color: var(--primary-color);
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 120px - 80px); /* Viewport height minus header and footer */
}

/* Intro Text Section */
.intro-text {
    margin-bottom: 2rem;
    max-width: 800px;
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.2);
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    background-color: #000;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--primary-color);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* Terminal effect */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero h1::after {
    content: '_';
    animation: blink 1s infinite;
    font-weight: normal;
}

/* Section */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-link {
    margin-top: 2.5rem;
    text-align: center;
    clear: both;
    padding: 1rem 0;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    background-color: #000;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.5rem;
}

.card-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-meta .category {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.2rem 0.5rem;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Category Filter */
.category-filter {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
}

.category-filter a {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.category-filter a.active,
.category-filter a:hover {
    background-color: var(--primary-color);
    color: #111;
}

/* Portfolio Detail */
.portfolio-detail {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-header {
    margin-bottom: 2rem;
}

.portfolio-meta {
    color: #666;
    margin-bottom: 1rem;
}

.portfolio-image {
    margin-bottom: 2rem;
}

.portfolio-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.portfolio-description {
    margin-bottom: 2rem;
}

.portfolio-content {
    margin-bottom: 2rem;
}

.portfolio-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Photo Link */
.photo-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.photo-link img {
    transition: transform 0.5s;
}

.photo-link:hover img {
    transform: scale(1.03);
}

.photo-link:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-link:hover:after {
    opacity: 1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    color: var(--primary-color);
    background-color: #000;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.25);
    outline: none;
}

button,
.btn {
    display: inline-block;
    background-color: #000;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover,
.btn:hover {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

/* Contact */
.contact-form {
    max-width: 100%;
}

.contact-terminal {
    max-width: 600px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.5);
    background-color: #000;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-terminal:hover {
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.7);
}

.contact-terminal .terminal-content {
    padding: 1.5rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0;
    margin-top: 2rem;
    position: relative;
    border-top: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-access {
    position: absolute;
    left: 15px;
    bottom: 15px;
}

.admin-access a {
    color: var(--footer-text);
    display: inline-flex;
    align-items: center;
    transition: color 0.3s, opacity 0.3s, transform 0.3s;
}

.admin-access a:hover {
    color: var(--primary-color);
}

#admin-icon {
    opacity: 0.3;
    transition: transform 0.3s, opacity 0.3s;
}

#admin-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Admin */
.admin-header {
    background-color: #000;
    color: var(--primary-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-radius: 0;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.admin-nav {
    background-color: #000;
    padding: 0.8rem 0;
    border-radius: 0;
    margin-bottom: 2rem;
    border: 1px solid var(--primary-color);
}

.admin-nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.admin-nav li {
    margin-right: 1.5rem;
}

.admin-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    font-weight: 500;
}

.admin-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

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

.admin-nav a:hover, .admin-nav a.active {
    color: var(--primary-color);
}

.admin-content {
    background-color: #000;
    border-radius: 0;
    padding: 2rem;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    color: var(--primary-color);
}

.btn-secondary {
    background-color: #000;
    color: #aaa;
    border-color: #888;
}

.btn-secondary:hover {
    background-color: #888;
    color: #000;
    box-shadow: 0 0 10px rgba(136, 136, 136, 0.8);
}

.btn-edit {
    background-color: #000;
    color: #00aaff;
    border-color: #00aaff;
}

.btn-delete {
    background-color: #000;
    color: #ff4444;
    border-color: #ff4444;
}

.btn-edit:hover {
    background-color: #00aaff;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.8);
    opacity: 1;
}

.btn-delete:hover {
    background-color: #ff4444;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    opacity: 1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.table th,
.table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.table th {
    background-color: #f5f5f5;
    text-align: left;
}

.table tr:hover {
    background-color: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        width: 100%;
    }
    
    .main-nav.active {
        max-height: 300px;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0;
    }
    
    .main-nav li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .main-nav a {
        padding: 0.5rem 0;
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    /* Stack fixes for home page */
    .stacked-container {
        height: auto !important;
        padding-bottom: 30px;
        margin-top: 3rem;
        min-height: unset !important;
    }
    
    .stacked-container .terminal-window {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 2.5rem;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        overflow: hidden !important;
    }
    
    /* Ensure buttons and text are always visible */
    .terminal-window .btn {
        position: relative;
        z-index: 5;
        margin-top: 0.5rem;
    }
    
    /* Ensure proper spacing between stacked sections */
    .section {
        margin-bottom: 4rem;
    }
    
    /* Button adjustments */
    .btn-photo-request {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    /* About page adjustments */
    .about-section {
        padding: 0 1rem;
    }
    
    /* Form adjustments */
    .form-group {
        margin-bottom: 1rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .admin-nav ul {
        flex-direction: column;
    }
    
    .admin-nav li {
        margin: 0.5rem 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero-action {
        margin-top: 1.5rem;
    }
    
    .btn-photo-request {
        width: 100%;
    }
}