body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: #b8b7b7;
    color: #222;
}

header {
    background: #222;
    color: #fff;
    padding: 1rem 0;
    /*margin-top: 1rem;*/
    /*margin-top: 2rem;*/
    border-radius: 0 0 12px 12px;
    margin: 0 auto;
    width: 100%;
}

nav ul {
    display: flex;
    /*justify-content: right;*/
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    /*background: #222;*/
}

nav li {
    margin: 1rem; 
    padding: 0;
    background: #222;

}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #00bfae;
}

main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section[aria-label="Hero"] {
    text-align: center;
    padding: 2rem 0;
    background: #e0f7fa;
    border-radius: 12px;
    margin-bottom: 2rem;
}

section[aria-label="Hero"] img {
    border-radius: 50%;
    margin-top: 1rem;
}

section[aria-label="About Me"] {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.about-text {
    flex: 1;
}


section[aria-label="About Me"] img {
    border-radius: 12px;
    max-width: 200px;
}

section[aria-label="Projects"] {
    margin-bottom: 2rem;
}

section[aria-label="Projects"] h2 {
    margin-bottom: 1.5rem;
}

section[aria-label="Projects"] {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}


section[aria-label="Projects"] .projects-grid {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    flex-wrap: nowrap;      /* atspējo pārnesi */
    overflow-x: auto;       /* pievieno horizontālo ritināšanu */
    scroll-snap-type: x mandatory; /* pēc izvēles — vienmērīga ritināšana */
    max-width: calc(300px * 3 + 2rem * 2); /* platums 3 elementu parādīšanai */  
    padding-bottom: 1rem;
    align-items: stretch; /* pievienojiet */
}

section[aria-label="Projects"] article {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
    flex: 0 0 300px; /* fiksēts platums katram elementam. */
    scroll-snap-align: start; /* pēc vēlēšanās — lai nodrošinātu vienmērīgu ritināšanu */
}


section[aria-label="Projects"] article:hover {
    box-shadow: 0 4px 16px rgba(0,191,174,0.12);
}

section[aria-label="Projects"] img {
    border-radius: 8px;
    margin-bottom: 1rem;
    max-width: 100%;
    height: auto;
}

section[aria-label="Projects"] h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    text-align: center;
}

section[aria-label="Projects"] p {
    font-size: 1rem;
    text-align: center;
}

section[aria-label="Projects"] a {
    margin-top: 0.5rem;
    color: #00bfae;
    text-decoration: none;
    font-weight: 500;
}

section[aria-label="Projects"] a:hover {
    text-decoration: underline;
}

section[aria-label="Contact"] {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
    margin: 1rem auto;
}
/*------*/
.row {
    display: flex;
    gap: 0.75rem;
}
.field {
    flex: 1;
    display: flex;
    flex-direction: column;
}
/*------*/
input, textarea {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    /*---*/
    width:100%;
    box-sizing: border-box;
    /*---*/
}

input[type="submit"] {
    background: #00bfae;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

input[type="submit"]:hover {
    background: #009e8e;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    border-radius: 0 0 12px 12px;
}

@media (max-width: 700px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    main {
        padding: 0 0.5rem;
    }
    section[aria-label="About Me"] {
        flex-direction: column;
        align-items: flex-start;        
    }
}

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





section[aria-label="Hero"] h1,
section[aria-label="Hero"] p {
    opacity: 0;
    animation: fadeInHero 1.2s ease-out forwards;
}

section[aria-label="Hero"] h1 {
    animation-delay: 0.2s;
}

section[aria-label="Hero"] p {
    animation-delay: 0.7s;
}

/* Floating Back to Top Button */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background: #00bfae;
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}

.back-to-top:hover {
    opacity: 1;
    background: #009e8e;
}

.logo-nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.logo {
    display: block;
    height: 80px;
    width: 80px;
    object-fit: cover;
}



