/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables */
:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --primary-green: #10b981;
    --secondary-green: #34d399;
    --primary-yellow: #fbbf24;
    --secondary-yellow: #fcd34d;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --medium-text: #475569;
    --light-text: #94a3b8;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    color: var(--dark-text);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 5%;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 5px;
    transition: var(--transition);
}

/* Project Container */
.project-container {
    max-width: 1400px;
    margin: 100px auto 0;
    padding: 0;
    display: flex;
    gap: 0;
    background-color: transparent;
}

.project-main-content {
    width: 80%;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem 0 0 1rem;
    box-shadow: var(--shadow-lg);
}

.project-main-content::-webkit-scrollbar {
    width: 8px;
}

.project-main-content::-webkit-scrollbar-track {
    background: var(--light-bg);
}

.project-main-content::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.project-main-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

.project-sidebar {
    width: 20%;
    background-color: var(--light-bg);
    padding: 2rem 1.5rem;
    border-radius: 0 1rem 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
    align-self: flex-start;
    min-height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}


.project-sidebar::-webkit-scrollbar {
    width: 6px;
}

.project-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.project-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

/* Project Header */
.project-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-bg);
}

/* Compact Navigation */
.project-navigation {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    z-index: 100;
    transition: var(--transition);
}

/* Compact Project Navigation */
.project-navigation.compact {
    padding: 0;
    width: 60px;
    height: 50px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #9aade9, #c7d2fe);
}

.project-navigation.compact ul {
    display: none;
}

.project-nav-toggle {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.project-navigation.compact .project-nav-toggle {
    display: flex;
}

.project-nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: var(--transition);
}

.project-navigation.compact:hover,
.project-navigation.compact.expanded {
    width: auto;
    min-width: 300px;
    height: auto;
    padding: 1rem 1.5rem;
}

.project-navigation.compact:hover ul,
.project-navigation.compact.expanded ul {
    display: flex;
}

.project-navigation.compact:hover .project-nav-toggle,
.project-navigation.compact.expanded .project-nav-toggle {
    display: none;
}

.project-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.project-navigation li {
    display: inline-block;
}

.project-navigation a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 1.5rem;
    transition: var(--transition);
    display: block;
    background-color: rgba(255, 255, 255, 0.6);
}

.project-navigation a:hover {
    background-color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.project-navigation a.active {
    background-color: var(--primary-blue);
    color: white;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: var(--medium-text);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    width: 18px;
    height: 18px;
    fill: var(--primary-blue);
}

/* Share Section */
.share-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}


.share-btn {
    width: 100%;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
}

.section-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--medium-text);
    text-align: left;
}

.section-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
    text-justify: inter-word;
}

.section-content ul {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 2;
}

.section-content ul li {
    margin-bottom: 0.8rem;
    color: var(--medium-text);
}

.section-content ul li::marker {
    color: var(--primary-blue);
}

/* Components Table */
.components-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.components-table thead {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    color: white;
}

.components-table th,
.components-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.components-table th:last-child,
.components-table td:last-child {
    border-right: none;
}

.components-table tbody tr:hover {
    background-color: var(--light-bg);
    transition: var(--transition);
}

.components-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.components-table tbody tr:nth-child(odd) {
    background-color: var(--white);
}

.components-table tbody tr:last-child td {
    border-bottom: none;
}

/* Circuit Images */
.circuit-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.circuit-image {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.circuit-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Media Gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.media-tile {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.media-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.media-tile img,
.media-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-tile .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Modal for Media Zoom */
.media-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.media-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.media-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.close-modal:hover {
    color: var(--primary-green);
}

/* References Section */
.references-list {
    list-style: none;
    padding: 0;
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.references-list li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--white);
    border-radius: 0.3rem;
    color: var(--medium-text);
    box-shadow: var(--shadow-sm);
}

.references-list li:last-child {
    margin-bottom: 0;
}

.references-list li:last-child {
    border-bottom: none;
}

.references-list a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

.references-list a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* Suggested Projects */
.suggested-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.suggested-card {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

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

.suggested-card h4 {
    font-size: 1.2rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.suggested-card p {
    font-size: 0.9rem;
    color: var(--medium-text);
}

/* Comments Section */
/* Comments Section */
.comments-section {
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comments-section h3 {
    margin-bottom: 1rem;
    color: var(--dark-text);
    font-size: 1.2rem;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.comment-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.comment-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.comment-submit {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.existing-comments {
    margin-top: 2rem;
}

.comment {
    background-color: var(--white);
    padding: 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.comment-text {
    color: var(--medium-text);
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-text);
    color: var(--white);
    margin-top: 3rem;
}

/* Back Button */
.back-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    color: white;
    padding: 1rem;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 100;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* LinkedIn Embed Container */
.linkedin-embed-container {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--white);
}

.linkedin-embed-container iframe {
    display: block;
    width: 100%;
    min-height: 500px;
    border: none;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding: 2rem 0;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
    
    .burger {
        display: block;
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .project-container {
        flex-direction: column;
        margin: 100px 1rem 0;
    }

    .project-main-content {
        width: 100%;
        border-radius: 1rem 1rem 0 0;
        max-height: none;
        padding: 1.5rem;
    }

    .project-sidebar {
        width: 100%;
        border-radius: 0 0 1rem 1rem;
        max-height: none;
        position: relative;
        top: 0;
        min-height: auto;
    }

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

    .project-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .components-table {
        font-size: 0.9rem;
        overflow-x: auto;
        display: block;
    }

    .components-table th,
    .components-table td {
        padding: 0.6rem;
    }

    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .media-tile {
        height: 150px;
    }

    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .back-button {
        bottom: 1rem;
        right: 1rem;
    }

    /* Force compact project navigation on mobile always */
    .project-navigation {
        padding: 0;
        width: 60px;
        height: 50px;
        border-radius: 0.5rem;
        overflow: hidden;
        background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    }

    .project-navigation ul {
        display: none;
    }

    .project-nav-toggle {
        display: flex !important;
        width: 100%;
        height: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        cursor: pointer;
    }

    .project-navigation.expanded {
        width: auto;
        min-width: 250px;
        height: auto;
        padding: 1rem 1.5rem;
    }

    .project-navigation.expanded ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .project-navigation.expanded .project-nav-toggle {
        display: none !important;
    }

    .project-navigation.expanded a {
        text-align: center;
        width: 100%;
    }

    .linkedin-post-card {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .linkedin-header {
        padding: 1rem;
    }
    
    .linkedin-content {
        padding: 1rem;
    }

    .share-section {
        padding: 1rem;
    }

    .comments-section {
        padding: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .project-title {
        font-size: 1.7rem;
    }

    .section-content {
        font-size: 1rem;
    }

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

    .media-gallery {
        grid-template-columns: 1fr;
    }

    .media-tile {
        height: 200px;
    }

    .project-main-content {
        padding: 1rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .components-table {
        font-size: 0.85rem;
    }

    .circuit-images {
        grid-template-columns: 1fr;
    }

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

/* Attachments Section */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.attachment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.attachment-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-icon.arduino {
    background: linear-gradient(135deg, #00979d, #00bec7);
}

.attachment-icon.github {
    background: linear-gradient(135deg, #24292e, #3d444d);
}

.attachment-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.attachment-content {
    flex: 1;
}

.attachment-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0 0 0.25rem 0;
}

.attachment-content p {
    font-size: 0.85rem;
    color: var(--medium-text);
    margin: 0;
}

.attachment-action {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.attachment-action svg {
    width: 100%;
    height: 100%;
    fill: var(--light-text);
    transition: var(--transition);
}

.attachment-card:hover .attachment-action svg {
    fill: var(--primary-blue);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-card {
        padding: 1.25rem;
    }
    
    .attachment-icon {
        width: 48px;
        height: 48px;
    }
    
    .attachment-icon svg {
        width: 24px;
        height: 24px;
    }
}
.signal-term {
    color: #0066cc;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    border-left: 3px solid #0066cc;
}