/* --- PERUSASETUKSET --- */
body {
    background-color: #ffffff;
    color: #000000;
    font-family: "Georgia", "Times New Roman", serif;
    margin: 0;
    padding: 20px; /* Hieman kasvatettu suoja-aluetta mobiiliin */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    max-width: 600px;
    width: 100%;
}

h1 {
    font-size: 2.6rem; /* Hieman pienennetty, jotta mahtuu paremmin 200% suurennuksella */
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* --- TASAISET KEHYKSET --- */
.main-frame {
    background: #ffffff;
    border: 5px solid #000000;
    padding: 35px 30px;
}


ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 24px;
}

li:last-child {
    margin-bottom: 0;
}

.email-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.label {
    font-size: 0.9rem; /* Nostettu luettavuuden parantamiseksi harmaalla tekstillä */
    font-weight: bold;
    text-transform: uppercase;
    color: #444444; /* Tummennettu WCAG 4.5:1 kontrastisuhteen varmistamiseksi */
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

/* --- WCAG 2.2 LINKKITYYLIT JA KOHDISTUSALUEET --- */
a {
    color: #000000;
    font-weight: normal;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    word-break: break-all;
    display: inline-block;
    
    /* WCAG 2.2 (2.5.8 Target Size): Varmistetaan pystysuuntainen 24px kosketusalue lisäämällä paddingia */
    padding: 6px 0; 
    
    transition: background-color 0.1s ease, color 0.1s ease;
}

a:hover {
    text-decoration-thickness: 2px;
}

/* WCAG 2.2: Erittäin selkeä näppäimistökohdistus (Focus Visible & Appearance) */
a:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 3px;
    background-color: #f5f5f5;
    border-radius: 2px;
}

a:active {
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
}

/* --- FOOTER --- */
.portfolio-footer {
    margin-top: 40px;
    text-align: center;
}

.portfolio-footer p {
    font-size: 0.9rem; /* Nostettu 0.8rem -> 0.9rem */
    color: #444444; /* Tummennettu harmaata riittävän kontrastin saamiseksi */
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}



.footer-link {
    color: #444444;
    font-weight: normal;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    word-break: break-all;
    display: inline-block;
    
    /* WCAG 2.2 (2.5.8 Target Size): Varmistetaan pystysuuntainen 24px kosketusalue lisäämällä paddingia */
    padding: 6px 0; 
    
    transition: background-color 0.1s ease, color 0.1s ease;
}

/* --- VAIN RUUDUNLUKUOHJELMILLE TARKOITETUT TEKSTIT --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- MOBIILIOPTIMOINTI & WCAG 2.2 FOCUS NOT OBSCURED --- */
@media (max-width: 480px) {
    body {
        /* Estetään sisällön ja kohdistuksen peittyminen poistamalla 100vh pakotus pienillä näytöillä */
        min-height: auto; 
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    h1 {
        font-size: 2.0rem;
    }
    
    .main-frame {
        padding: 25px 20px;
    }
}
