@charset "UTF-8";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #007bff; /* sininen perusväri */
  --secondary-color: #6c757d; /* harmaa */
  --background-color: #f8f9fa; /* vaalean harmaa taus */
  --text-color: #343a40; /* tummanharmaa teksti */
  --light-text-color: #ffffff;
  --border-color: #dee2e6;
  --link-hover-color: #0056b3;
  --card-bg-color: #ffffff;
  --header-footer-bg: #343a40;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --base-font-size: 16px;
  --line-height: 1.6;
}

body {
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Saavutettavusspesiaali === */
.sr-only { /* Screen reader only teksti */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* === Layout === */
.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 0;
}

/* === Header & navigaatio === */
.site-header {
  background-color: var(--header-footer-bg);
  padding: 1rem 0;
  border-bottom: 3px solid var(--primary-color);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--light-text-color);
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
}
.main-nav li {
  margin-left: 20px;
}
.main-nav a {
  color: var(--light-text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.main-nav a:hover, .main-nav a:focus {
  background-color: var(--primary-color);
  color: var(--light-text-color);
}
.main-nav a[aria-current=page] {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  font-weight: bold;
}

/* === Pääsisältö === */
main {
  flex-grow: 1;
}

.page-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.hero {
  background-color: var(--secondary-color);
  color: var(--light-text-color);
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.content-section {
  background-color: var(--card-bg-color);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.content-section h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.content-section h3 {
  font-size: 1.4rem;
  color: var(--text-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.content-section p, .content-section ul, .content-section dl {
  margin-bottom: 1rem;
}
.content-section ul {
  list-style-position: inside;
  padding-left: 0;
}
.content-section ul li {
  margin-bottom: 0.5rem;
}
.content-section a {
  color: var(--primary-color);
  text-decoration: none;
}
.content-section a:hover, .content-section a:focus {
  text-decoration: underline;
  color: var(--link-hover-color);
}

/* CV -osio */
.cv-section {
  margin-bottom: 2rem;
}

.cv-item dt {
  font-weight: bold;
  color: var(--primary-color);
}
.cv-item dd {
  margin-left: 0; /* Reset default margin */
  margin-bottom: 0.5em;
}
.cv-item dd ul li {
  list-style: none;
}
.cv-item .date {
  font-style: italic;
  color: var(--secondary-color);
  font-size: 0.9em;
}

/* Projekti-osio */
.projects .cv-item ol {
  margin-left: 1.5rem;
}

/* Linkkisivu */
.link-list {
  list-style: none;
}
.link-list li {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: #fdfdfd;
}
.link-list li a {
  font-weight: bold;
  font-size: 1.1rem;
}
.link-list li p {
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--secondary-color);
}

/* === Footer === */
.site-footer {
  background-color: var(--header-footer-bg);
  color: var(--light-text-color);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
}

/* === responsiivisuus === */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: center;
  }
  .main-nav {
    margin-top: 1rem;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }
  .main-nav li {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }
  .main-nav a {
    display: block;
    width: 100%;
    text-align: center;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .page-title {
    font-size: 2rem;
  }
  .content-section {
    padding: 1.5rem;
  }
}