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

:root {
    --primary-color: #ff9800;
    --secondary-color: #f57c00;
    --accent-color: #ffc107;
    --success-color: #4caf50;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f3f4f6;
    --bg-dark: #1a1a1a;
    --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 h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo i {
    color: var(--primary-color);
}

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

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

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

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

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

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

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

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

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

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

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

.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 2rem;
    color: white;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image .image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    transition: transform 0.3s;
}

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

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

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

.filter-btn {
    padding: 0.7rem 1.5rem;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--text-color);
}

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

.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;
    display: flex;
    flex-direction: column;
}

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

.project-card.hide {
    display: none;
}

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

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

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

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

.tag {
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s;
}

.project-link:hover {
    gap: 1rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

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

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

.feature-card:hover {
    transform: translateY(-10px);
}

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

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

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

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

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

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

.contact-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    text-align: center;
}

.footer-links-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-links-bar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links-bar a:hover,
.footer-links-bar a.active {
    color: var(--primary-color);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
}

/* Page Header for subpages */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 50%, #e65100 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

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

/* Content Section */
.content-section {
    padding: 4rem 0;
}

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

.intro-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.intro-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.ha-logo-container {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
}

/* HA Features */
.ha-features {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

/* Setup Guide */
.setup-guide {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.guide-steps {
    display: grid;
    gap: 2rem;
}

.step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

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

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.step-content ul {
    list-style-position: inside;
    color: var(--text-light);
}

.step-content ul li {
    margin-bottom: 0.5rem;
}

.step-content code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Integrations */
.integrations {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.integration-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.integration-card:hover {
    transform: translateY(-5px);
}

.integration-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.integration-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

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

/* Automations */
.automations-section {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

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

.automation-card {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.automation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.automation-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.automation-header h3 {
    font-size: 1.3rem;
    color: var(--text-color);
}

.automation-desc {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.automation-triggers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trigger {
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Resources */
.resources-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

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

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

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.resource-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

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

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

/* Detailed Project Cards */
.project-card.detailed {
    max-width: 100%;
}

.project-card.detailed h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 1.5rem 0 0.8rem;
}

.project-card.detailed ul {
    list-style-position: inside;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-card.detailed ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.project-status {
    margin-top: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.completed {
    background-color: #cce5ff;
    color: #004085;
}

.status-badge.wip {
    background-color: #fff3cd;
    color: #856404;
}

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

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

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

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

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

    .about-content {
        grid-template-columns: 1fr;
    }

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

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

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
    }

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

    .step-card {
        grid-template-columns: 1fr;
    }

    .step-number {
        margin: 0 auto;
    }
}
