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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

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

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.circuit-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    text-align: left;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Circuit Board Animation */
.hero-visual {
    position: relative;
    height: 400px;
}

.circuit-board {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.component {
    position: absolute;
    border-radius: 5px;
    animation: componentGlow 3s ease-in-out infinite;
}

.resistor {
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, #8B4513, #D2691E, #8B4513);
    top: 30%;
    left: 20%;
}

.capacitor {
    width: 30px;
    height: 50px;
    background: linear-gradient(180deg, #4169E1, #1E90FF);
    top: 50%;
    right: 30%;
}

.led {
    width: 25px;
    height: 25px;
    background: radial-gradient(circle, #ff4444, #aa0000);
    border-radius: 50%;
    bottom: 30%;
    left: 50%;
    box-shadow: 0 0 20px #ff4444;
}

@keyframes componentGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.trace {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.4);
    opacity: 0.4;
}

.trace-1 {
    width: 2px;
    height: 150px;
    top: 10%;
    left: 40%;
    animation: traceFlow 2s ease-in-out infinite;
}

.trace-2 {
    width: 200px;
    height: 2px;
    top: 50%;
    left: 10%;
    animation: traceFlow 2.5s ease-in-out infinite;
}

.trace-3 {
    width: 2px;
    height: 100px;
    bottom: 10%;
    right: 25%;
    animation: traceFlow 3s ease-in-out infinite;
}

@keyframes traceFlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    z-index: 10;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

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

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Projects Section */
.recent-projects,
.projects-section,
.schematics-section {
    padding: 100px 0;
}

.recent-projects {
    background-color: white;
}

.projects-section {
    background-color: var(--bg-light);
}

.schematics-section {
    background-color: var(--bg-light);
}

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

.project-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image.placeholder span {
    font-size: 4rem;
    color: white;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

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

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 5px 12px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0 80px;
    text-align: center;
    color: white;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filters */
.filters {
    padding: 2rem 0;
    background-color: white;
}

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

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-item {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 300px 1fr;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.project-thumbnail {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.placeholder-img {
    font-size: 5rem;
    color: white;
}

.project-details {
    padding: 2rem;
}

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

.project-header h2 {
    color: var(--text-color);
    font-size: 1.8rem;
}

.difficulty {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty.beginner {
    background-color: #dcfce7;
    color: #16a34a;
}

.difficulty.intermediate {
    background-color: #dbeafe;
    color: #2563eb;
}

.difficulty.advanced {
    background-color: #fee2e2;
    color: #dc2626;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-specs {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.spec {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.spec strong {
    color: var(--primary-color);
    font-weight: 600;
}

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

.schematic-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.schematic-preview {
    background-color: var(--bg-light);
    padding: 2rem;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-schematic {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schematic-info {
    padding: 1.5rem;
}

.schematic-info h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.schematic-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.schematic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.downloads {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Tutorials Section */
.tutorials-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.tutorials-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tutorial-category {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.tutorial-category h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.tutorial-list {
    display: grid;
    gap: 1.5rem;
}

.tutorial-item {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.tutorial-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.tutorial-item h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tutorial-item p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.tutorial-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

.level {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Learning Path */
.learning-path {
    padding: 100px 0;
    background-color: white;
}

.path-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.path-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.path-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    z-index: 1;
}

.step-content {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    flex: 1;
    box-shadow: var(--shadow);
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
}

/* Resources Section */
.calculators-section,
.reference-tables,
.tools-software,
.links-section,
.schematic-tools {
    padding: 100px 0;
}

.calculators-section {
    background-color: var(--bg-light);
}

.reference-tables {
    background-color: white;
}

.tools-software {
    background-color: var(--bg-light);
}

.links-section {
    background-color: white;
}

.schematic-tools {
    background-color: white;
}

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

.calculator-card,
.software-card,
.links-card,
.tool-card {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.reference-tables .calculator-card,
.reference-tables .table-card,
.tools-software .software-card,
.links-section .links-card {
    background-color: var(--bg-light);
}

.calculator-card:hover,
.software-card:hover,
.links-card:hover,
.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.calculator-card h3,
.software-card h3,
.links-card h3,
.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.calculator-content {
    color: var(--text-light);
}

.calculator-content p {
    margin-bottom: 1rem;
}

.resistor-visual {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.resistor-body {
    width: 200px;
    height: 60px;
    background: linear-gradient(90deg, #D2B48C, #F5DEB3, #D2B48C);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    position: relative;
}

.resistor-body::before,
.resistor-body::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--text-light);
}

.resistor-body::before {
    left: -30px;
}

.resistor-body::after {
    right: -30px;
}

.band {
    width: 12px;
    height: 100%;
    border-radius: 2px;
}

.formula-visual {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.formula {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    text-align: center;
    padding: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.calculator-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    color: var(--text-light);
    line-height: 1.8;
}

.calculator-info strong {
    color: var(--primary-color);
}

/* Tables */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.table-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.table-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.data-table th {
    color: var(--primary-color);
    font-weight: 600;
    background-color: white;
}

.data-table td {
    color: var(--text-light);
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.values-grid span {
    background-color: white;
    color: var(--primary-color);
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.table-note {
    margin-top: 1rem;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* Software Cards */
.software-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.software-card ul,
.links-card ul,
.tool-card ul {
    list-style: none;
}

.software-card li,
.links-card li,
.tool-card li {
    color: var(--text-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.software-card li::before,
.links-card li::before,
.tool-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.software-card strong {
    color: var(--text-color);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9ca3af;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-visual {
        height: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .project-item {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

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

    .path-timeline::before {
        left: 15px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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