/* Koza Personal Site - Main Stylesheet */

/* CSS Variables - Matching Admin Theme */
:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --bg-dark: #0f172a;
    --bg-darker: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #10b981;
    --error: #ef4444;
    --shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    --border: #334155;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--secondary-color);
}

/* Navigation */
.navbar {
    background: var(--bg-darker);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

.nav-login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-login-btn:hover {
    color: var(--text-primary);
}

.nav-login-btn i {
    font-size: 1.1rem;
}

.nav-login-btn.admin-active {
    color: var(--accent);
}

.nav-login-btn.admin-active:hover {
    color: #3aa76d;
}

.nav-login-btn.admin-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px var(--accent);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 10px var(--accent);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* Interactive Background Canvas */
#interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(114, 137, 218, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(67, 181, 129, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-darker);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--bg-card);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Section */
.projects {
    background: var(--bg-dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Section Divider */
.section-divider {
    max-width: 600px;
    margin: 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-color);
}

/* Discord Section */
.discord-section {
    background: var(--bg-card);
}

.discord-card {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
}

.discord-avatar {
    position: relative;
}

.discord-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
}

.status-online {
    background: var(--accent);
}

.status-offline {
    background: #747f8d;
}

.status-idle {
    background: #faa61a;
}

.status-dnd {
    background: var(--error);
}

.discord-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.discord-status {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.status-text {
    font-weight: 700;
    display: inline-block;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-text.status-online {
    color: var(--accent) !important;
    background: rgba(67, 181, 129, 0.1);
}

.status-text.status-idle {
    color: #faa61a !important;
    background: rgba(250, 166, 26, 0.1);
}

.status-text.status-dnd {
    color: #f04747 !important;
    background: rgba(240, 71, 71, 0.1);
}

.status-text.status-offline {
    color: #747f8d !important;
    background: rgba(116, 127, 141, 0.1);
}

.discord-activity {
    background: var(--bg-darker);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.discord-activity i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.activity-details {
    flex: 1;
}

.activity-details strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.15rem 0;
}

.discord-widget {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.discord-server-info {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
    padding: 2rem;
    background: var(--bg-dark);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.discord-server-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.discord-server-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.discord-server-info .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Social Section */
.social {
    background: var(--bg-dark);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    min-width: 120px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-link:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.social-link i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.social-link span {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Recent Posts Section */
.recent-posts {
    background: var(--bg-dark);
}

.recent-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    gap: 0.75rem;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.recent-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.recent-post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.recent-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recent-post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.recent-post-featured {
    color: #fbbf24;
    font-size: 1.25rem;
}

.recent-post-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.recent-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.recent-post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.recent-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Contact Page */
.contact-page {
    min-height: 100vh;
    padding-top: 100px;
    background: var(--bg-dark);
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.login-prompt i {
    font-size: 3rem;
    color: #5865f2;
    margin-bottom: 1rem;
}

.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.user-profile-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.05));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.user-info {
    flex: 1;
}

.user-info h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.user-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-logout {
    padding: 0.75rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

.contact-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form-card,
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.contact-form-card h2,
.contact-info-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-form .form-control {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-form textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.char-counter {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.contact-method:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    color: white;
    font-size: 1.5rem;
}

.contact-method-info h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-method-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.response-time {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
}

.response-time i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.response-time p {
    margin: 0;
    font-size: 0.9rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: var(--accent);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: var(--error);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.admin-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.admin-link:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 968px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1rem;
        font-size: 0.9rem;
        padding-top: 1rem;
    }

    .nav-actions {
        order: 2;
    }

    .nav-login-btn span {
        display: none;
    }

    .nav-login-btn i {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .discord-card {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        gap: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
    }

    .recent-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-form-card,
    .contact-info-card {
        padding: 1.5rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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