/* --- Perusasetukset ja Globaalit tyylit --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root {
    --color-bg: #1A1A2E;
    --color-surface: rgba(38, 38, 61, 0.6);
    --color-surface-solid: #26263D;
    --color-accent: #00F0B5;
    --color-text-header: #F0F0F0;
    --color-text-body: #A0A0B4;
    --font-main: 'Inter', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-main);
    color: var(--color-text-header);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3rem; text-align: center; }
h2 { font-size: 2.2rem; margin-bottom: 3rem; text-align: center; }
p { font-size: 1.1rem; }
section { padding: 80px 0; }
a { color: var(--color-accent); text-decoration: none; }

/* --- Navigaatio --- */
.navbar {
    padding: 20px 0;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-header);
}
.nav-links a {
    color: var(--color-text-body);
    font-weight: 500;
    margin-left: 25px;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--color-text-header);
}

/* --- Sankariosio --- */
.hero {
    padding: 80px 0 40px 0;
}
.hero p {
    max-width: 600px;
    margin: 1rem auto 0 auto;
    text-align: center;
    font-size: 1.2rem;
}

/* --- Projektit --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}
.project-card {
    background-color: var(--color-surface);
    border: 1px solid #33334f;
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 240, 181, 0.1);
}
.project-image {
    width: 100%;
    height: 250px;
    background-color: #333;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 1px solid #444;
}
.project-card h3 {
    margin-top: 0;
    font-size: 1.8rem;
}
.project-tags {
    margin: 1rem 0;
}
.project-tags span {
    background-color: rgba(0, 240, 181, 0.1);
    color: var(--color-accent);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 8px;
}
.project-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-bg);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease;
}
.project-button:hover {
    background-color: #33ffe0;
}

/* --- Yhteydenotto-osio --- */
.contact-section {
    background-color: var(--color-surface-solid);
    text-align: center;
    border-radius: 12px;
    padding: 4rem 2rem;
}

/* --- Lomakkeiden tyylit (Kirjautuminen & Modaali) --- */
.login-box,
.modal-content {
    max-width: 450px;
    margin: 100px auto;
    padding: 2rem 2.5rem;
    background-color: var(--color-surface-solid);
    border: 1px solid #33334f;
    border-radius: 12px;
    text-align: center;
}
.modal-content {
    max-width: 550px;
}
.login-box h2,
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.login-box p,
.modal-content p {
    margin-bottom: 2rem;
    color: var(--color-text-body);
}
.login-form {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-header);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: var(--color-bg);
    color: var(--color-text-header);
    font-family: var(--font-main);
    font-size: 1rem;
    box-sizing: border-box;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 240, 181, 0.2);
}
.login-form .project-button {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}
.error-message {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
}

/* --- Yhteydenotto-modaalin tyylit --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(26, 26, 46, 0.8);
    align-items: center;
    justify-content: center;
}
.modal-content {
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}
.close-button {
    color: var(--color-text-body);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
}
.close-button:hover,
.close-button:focus {
    color: var(--color-text-header);
    text-decoration: none;
    cursor: pointer;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Responsiivisuus --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    .projects-grid { grid-template-columns: 1fr; }
}