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

body {
    font-family: 'Arial', sans-serif;
    color: white;
    background-color: #4b5563;
    line-height: 1.6;
}
/* Additional styles for the projects page */

.page-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

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

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-content {
    padding: 20px;
}

.project-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-title h2 {
    font-size: 24px;
    font-weight: bold;
}

.github-link {
    font-size: 24px;
    color: #d1d5db;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: white;
}

.project-description {
    color: #d1d5db;
    margin-bottom: 12px;
}

.project-source {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 16px;
}

.view-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d1d5db;
    font-size: 16px;
    transition: color 0.3s ease;
}

.view-project-btn:hover {
    color: white;
}

nav .active {
    color: #f3f4f6;
    font-weight: bold;
    position: relative;
}

nav .active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    min-height: 100vh;
}

a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #d1d5db;
}

/* Network Background */
.network-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('network-bg.svg');
    background-size: cover;
    opacity: 0.2;
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.download-cv a {
    background-color: #6b7280;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.download-cv a:hover {
    background-color: #4b5563;
}

/* Back Link */
.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #d1d5db;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    color: white;
}

/* Project Header */
.project-header {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.project-header-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 768px) {
    .project-header-content {
        flex-direction: row;
    }

    .project-info {
        width: 66.666%;
    }

    .project-image {
        width: 33.333%;
    }
}

.project-info h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.project-description {
    color: #d1d5db;
    font-size: 18px;
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.tag {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 14px;
}

.tag-blue {
    background-color: rgba(37, 99, 235, 0.3);
    color: #bfdbfe;
}

.tag-green {
    background-color: rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.tag-purple{
    background-color: rgba(176, 18, 233, 0.3);
    color: #a7f3d0;
}

.tag-yellow{
    background-color: rgba(204, 225, 13, 0.3);
    color: #a7f3d0;
}

.tag-red{
    background-color: rgba(205, 25, 25, 0.3);
    color: #a7f3d0;
}
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

#iiot {
    text-decoration: underline;
}
.btn {
    background-color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #4b5563;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Project Details Grid */
.project-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .project-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.detail-card {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header i {
    font-size: 20px;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.project-section {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.project-section h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-header i {
    font-size: 24px;
}

.project-content p {
    margin-bottom: 16px;
}

.project-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.project-content ul,
.project-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.project-content li {
    margin-bottom: 8px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.results-card {
    background-color: rgba(55, 65, 81, 0.5);
    border-radius: 8px;
    padding: 20px;
}

.results-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.metrics-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-value {
    font-family: monospace;
}

/* Code Block */
.code-block {
    background-color: rgba(17, 24, 39, 0.5);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.code-block pre {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #d1d5db;
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    font-size: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    nav ul {
        gap: 16px;
    }

    .project-header-content {
        flex-direction: column;
    }

    .project-info, .project-image {
        width: 100%;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        gap: 8px;
    }

    .project-links {
        flex-direction: column;
    }
}   

.page-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

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

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-content {
    padding: 20px;
}

.project-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-title h2 {
    font-size: 24px;
    font-weight: bold;
}

.github-link {
    font-size: 24px;
    color: #d1d5db;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: white;
}

.project-description {
    color: #d1d5db;
    margin-bottom: 12px;
}

.project-source {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 16px;
}

.view-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d1d5db;
    font-size: 16px;
    transition: color 0.3s ease;
}

.view-project-btn:hover {
    color: white;
}

nav .active {
    color: #f3f4f6;
    font-weight: bold;
    position: relative;
}

nav .active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
}

/* Challenges Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .challenges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.challenge-card {
    background-color: rgba(55, 65, 81, 0.5);
    border-radius: 8px;
    padding: 20px;
}

.challenge-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f3f4f6;
}

.challenge-card p {
    margin-bottom: 12px;
    font-size: 15px;
}

.challenge-card strong {
    color: #e5e7eb;
}

/* Additional icon styles */
.fa-exclamation-triangle {
    color: #fcd34d; /* yellow color */
}

.fa-microchip {
    color: #a78bfa; /* purple color */
}

/* Enhance code block styling */
.code-block {
    position: relative;
}

.code-block::before {
    content: 'Python';
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(55, 65, 81, 0.8);
    padding: 4px 10px;
    border-radius: 0 8px 0 8px;
    font-size: 12px;
    color: #d1d5db;
}

/* Improve the back link visibility */
.back-link a {
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(55, 65, 81, 0.3);
    transition: background-color 0.3s ease;
}

.back-link a:hover {
    background-color: rgba(55, 65, 81, 0.6);
}

/* Responsive Design for Project Pages */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .project-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .project-info {
        order: 2;
        margin-top: 20px;
    }
    
    .project-image {
        order: 1;
        margin-bottom: 20px;
    }
    
    .project-info h1 {
        font-size: 2rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .project-tags {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 4px 8px;
        margin: 2px;
    }
    
    .project-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .project-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-card {
        padding: 20px;
    }
    
    .project-section {
        padding: 30px 0;
    }
    
    .project-section h2 {
        font-size: 1.8rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-card {
        padding: 20px;
    }
    
    .metrics-list li {
        font-size: 0.9rem;
    }
    
    .metric-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .back-link {
        margin-bottom: 15px;
    }
    
    .back-link a {
        font-size: 0.9rem;
    }
    
    .project-info h1 {
        font-size: 1.6rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-tags {
        gap: 5px;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .detail-card {
        padding: 15px;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .card-header i {
        font-size: 1rem;
    }
    
    .project-section h2 {
        font-size: 1.5rem;
    }
    
    .project-content p {
        font-size: 0.9rem;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
    
    .project-content ul,
    .project-content ol {
        padding-left: 20px;
    }
    
    .project-content li {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .results-card {
        padding: 15px;
    }
    
    .results-card h3 {
        font-size: 1.1rem;
    }
    
    .metrics-list li {
        font-size: 0.8rem;
    }
    
    .metric-value {
        font-size: 1rem;
    }
    
    .code-block {
        padding: 15px;
    }
    
    .code-block pre {
        font-size: 0.8rem;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .project-header-content {
        flex-direction: row;
        text-align: left;
    }
    
    .project-info {
        order: 1;
        margin-top: 0;
        flex: 60%;
    }
    
    .project-image {
        order: 2;
        margin-bottom: 0;
        flex: 40%;
    }
    
    .project-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .project-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn:hover {
        transform: none;
    }
}
