/* UI Improvements for Portfolio Website */
/* Fixes responsive design, color contrast, and modern styling */

/* ============================================= */
/* MODERN CSS RESET & BASE IMPROVEMENTS */
/* ============================================= */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e4e4e7;
    background-color: #0f1419;
    margin: 0;
    padding: 0;
}

/* Improved page wrapper with dark theme */
#page-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

#page-inner {
    background-color: #0f1419;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    min-height: 500px;
    color: #e4e4e7;
}

/* ============================================= */
/* RESPONSIVE DESIGN FIXES */
/* ============================================= */

/* Fix the video container typo */
@media screen and (max-width: 768px) {
    .video-container {
        display: none !important;
    }

    /* Mobile-optimized padding */
    #page-inner {
        padding: 15px;
    }

    #page-wrapper {
        padding: 10px;
    }

    /* Fix tables on mobile */
    table {
        font-size: 14px;
    }

    /* Stack columns on mobile */
    .col-md-4, .col-sm-4 {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

/* Tablet optimization */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #page-inner {
        padding: 20px;
    }

    nav .navbar-nav {
        font-size: 14px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    /* Touch-friendly spacing */
    .btn, a.btn {
        padding: 12px 20px;
        margin: 5px 0;
    }
}

/* ============================================= */
/* IMPROVED COLOR SCHEME & CONTRAST */
/* ============================================= */

/* Better navbar colors with proper contrast */
.navbar-default {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-default .navbar-nav > li > a {
    color: #ffffff !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.navbar-default .navbar-nav > .active > a {
    background-color: #3498db !important;
    color: #ffffff !important;
}

/* Improved sidebar */
.navbar-side {
    background-color: #2c3e50 !important;
}

.navbar-side .nav > li > a {
    color: #ecf0f1 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.navbar-side .nav > li > a:hover,
.navbar-side .nav > li > a:focus {
    background-color: #34495e !important;
    color: #ffffff !important;
    padding-left: 25px;
}

.navbar-side .nav > li.active > a {
    background-color: #3498db !important;
    color: #ffffff !important;
    border-left: 4px solid #2ecc71;
}

/* Footer improvements */
footer {
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
    padding: 30px 0;
    margin-top: 50px;
}

footer a {
    color: #3498db !important;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #2ecc71 !important;
}

/* ============================================= */
/* TYPOGRAPHY IMPROVEMENTS */
/* ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #f0f0f0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

.page-head-line {
    font-size: 2rem;
    text-transform: none;
    color: #f0f0f0;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-weight: 600;
}

/* ============================================= */
/* BUTTON & CARD IMPROVEMENTS */
/* ============================================= */

.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: #3498db;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background-color: #2ecc71;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #27ae60;
}

/* Card styling - Dark theme */
.card {
    border: 1px solid #2d3748;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background-color: #1a202c;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Well/Panel improvements - Dark theme */
.well {
    background-color: #1a202c;
    border: 1px solid #2d3748;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

.panel {
    border-radius: 8px;
    border: 1px solid #2d3748;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    background-color: #1a202c;
}

.panel-heading {
    background-color: #2d3748 !important;
    border-bottom: 1px solid #4a5568;
    border-radius: 8px 8px 0 0 !important;
}

/* ============================================= */
/* TABLE IMPROVEMENTS */
/* ============================================= */

.table {
    background-color: #1a202c;
    border-radius: 8px;
    overflow: hidden;
    color: #e4e4e7;
}

.table thead {
    background-color: #3498db;
    color: #ffffff;
}

.table thead th {
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover,
.table-hover tbody tr:hover {
    background-color: #1a202c !important;
}

.table tbody tr:hover td,
.table-hover tbody tr:hover td {
    color: #f0f0f0 !important;
}

.table td {
    padding: 12px 15px;
    border-top: 1px solid #2d3748;
}

/* Responsive table wrapper */
.table-responsive {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================= */
/* ACCESSIBILITY IMPROVEMENTS */
/* ============================================= */

/* Focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3498db;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================= */
/* SOCIAL ICONS IMPROVEMENTS */
/* ============================================= */

.social-icons a {
    color: #ffffff !important;
    font-size: 20px;
    margin: 0 10px;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: #3498db !important;
}

/* ============================================= */
/* IMAGE IMPROVEMENTS */
/* ============================================= */

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================= */
/* MODAL IMPROVEMENTS */
/* ============================================= */

.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background-color: #3498db;
    color: #ffffff;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.modal-header .close {
    color: #ffffff;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* ============================================= */
/* UTILITY CLASSES */
/* ============================================= */

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Clean hover effect for cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Mobile container text color fix for dark theme */
.mobile-container h1,
.mobile-container h2,
.mobile-container h3,
.mobile-container p {
    color: #f0f0f0 !important;
}

/* Navbar brand and header text */
.navbar-default .navbar-brand,
.navbar-header a {
    color: #f0f0f0 !important;
}
