html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #1e1e1e;
    color: #dcddde;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    overflow: hidden;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #1e1e1e;
    border-bottom: 1px solid #2f2f2f;
}

nav a.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

nav a.logo:hover {
    opacity: 0.8;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
}

.logo-bazzaz {
    font-size: 1.8rem;
    font-weight: 800;
    color: #dcddde;
    letter-spacing: -0.05em;
}

.logo-tech {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007acc;
    align-self: flex-end;
}

.site-footer {
    background: #181818;
    color: #aaa;
    text-align: center;
    padding: 1.5em 0 1em 0;
    font-size: 1em;
    border-top: 1px solid #2f2f2f;
    margin-top: 3em;
    flex-shrink: 0;
}

.site-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.site-footer .footer-content a:hover {
    color: #dcddde !important;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul li a {
    color: #999;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav ul li a:hover {
    color: #dcddde;
}

main {
    flex: 1;
    padding: 0 2rem 2rem 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center top, rgba(0, 122, 204, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1, .hero p {
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    animation-delay: 0.1s;
}

.hero p {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero, .projects, .contact-form {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    color: #999;
    max-width: 600px;
    margin: 0 auto;
    transition: color 0.3s ease;
}

.hero:hover p {
    color: #b0b0b0;
}

.projects {
    margin-top: 4rem;
}

.projects h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ffffff;
    text-align: center;
}

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

.project-card {
    background-color: #272727;
    border: 1px solid #363636;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.project-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #dcddde;
    font-size: 1.5rem;
}

.screenshot-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    border: 1px dashed #4a4a4a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.coming-soon {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 9/19;
    background: linear-gradient(135deg, #252525, #1e1e1e);
    border: 2px dashed #3a3a3a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto;
}

.contact-form {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2.5rem;
    background-color: #272727;
    border-radius: 8px;
    border: 1px solid #363636;
}

.contact-form h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-form label {
    font-size: 1rem;
    color: #dcddde;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    background-color: #1e1e1e;
    border: 1px solid #4a4a4a;
    color: #dcddde;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #007acc;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button {
    background-color: #007acc;
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.contact-form button:hover {
    background-color: #005999;
}

#form-message {
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

#form-message.success {
    color: #4caf50;
}

#form-message.error {
    color: #f44336;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .app-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .app-info h2 {
        font-size: 1.5rem;
    }

    .app-features {
        margin: 1.5rem 0;
    }

    .app-screenshots {
        max-width: 280px;
    }

    .contact-form {
        padding: 1.5rem;
        margin: 1rem;
    }

    .site-footer .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-bazzaz {
        font-size: 1.5rem;
    }

    .logo-tech {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.875rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

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

/* Navigation Dropdown Styles */
nav ul li {
    position: relative;
}

nav ul li.has-submenu > a.submenu-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.4rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #999;
}

nav ul li.has-submenu > a.submenu-toggle {
    cursor: pointer;
}

nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #252525;
    border: 1px solid #3a3a3a;
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-radius: 8px;
}

nav ul li ul.visible {
    display: flex;
}

nav ul li ul li a {
    padding: 0.65rem 1.25rem;
    display: block;
    color: #dcddde;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}

nav ul li ul li a:hover {
    background-color: #007acc;
    color: #fff;
}

/* App Showcase Styles (Alarm Announcer) */
.app-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.app-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.app-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.app-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.app-features li::before {
    content: "•";
    color: #007acc;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.app-screenshots {
    display: grid;
    grid-template-areas: "stack";
    position: relative;
    max-width: 350px; /* Constrain width for portrait mobile screenshots */
    margin: 0 auto;
}

.app-screenshots img {
    grid-area: stack;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #363636;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.app-screenshots img.active {
    opacity: 1;
}

/* ── Project card enhancements ─────────────────────────────── */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.project-card-screenshot {
    width: calc(100% + 3rem);
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    height: 180px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #181818;
    border-bottom: 1px solid #363636;
    flex-shrink: 0;
}

.project-card-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.project-card-screenshot--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1c1c, #232323);
}

.project-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.project-card-header h3 {
    margin: 0;
}

.project-card-desc {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
    flex: 1;
}

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

.tag {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    color: #777;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
}

.badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.badge-live {
    background: rgba(0, 122, 204, 0.12);
    color: #007acc;
    border: 1px solid rgba(0, 122, 204, 0.25);
}

.badge-soon {
    background: rgba(255, 170, 50, 0.1);
    color: #ffaa32;
    border: 1px solid rgba(255, 170, 50, 0.2);
}

/* ── About section (homepage) ──────────────────────────────── */
.about-section {
    max-width: 1000px;
    margin: 3rem auto 2rem auto;
    text-align: center;
    padding: 2.5rem;
    background: #272727;
    border: 1px solid #363636;
    border-radius: 8px;
}

.about-section h2 {
    font-size: 1.6rem;
    color: #fff;
    margin: 0 0 0.75rem 0;
}

.about-section p {
    color: #999;
    font-size: 0.95rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── CoveSync page ─────────────────────────────────────────── */
.cs-page {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

.cs-section {
    margin-bottom: 3rem;
}

.cs-section h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 0.75rem 0;
}

.cs-section > p {
    color: #999;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.platform-list {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.platform {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #272727;
    border: 1px solid #363636;
    color: #dcddde;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
}

.platform svg {
    color: #0CB8A8;
    flex-shrink: 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: rgba(0, 122, 204, 0.12);
    border: 1px solid rgba(0, 122, 204, 0.25);
    color: #007acc;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.step-content strong {
    color: #dcddde;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.step-content p {
    margin: 0;
    color: #777;
    font-size: 0.875rem;
    line-height: 1.55;
}

.code-preview {
    background: #141414;
    border: 1px solid #2f2f2f;
    border-radius: 6px;
    padding: 1.1rem 1.4rem;
    margin-top: 1rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: #0CB8A8;
    overflow-x: auto;
    line-height: 1.7;
}

.code-comment {
    color: #444;
}

.inline-code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    color: #0CB8A8;
}

.cs-note {
    margin-top: 0.75rem;
    color: #555;
    font-size: 0.85rem;
}
