/* Fonts */
@import url(https://fonts.googleapis.com/css?family=Raleway:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

.stylish-regular {
  font-family: "Stylish", serif;
  font-weight: 400;
  font-style: normal;
}

/* variables */
:root {
  /* Colors */
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #b6c2cf;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;
  --accordion-bg: #f9f9f9;
  --accordion-text: #222222;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

[data-theme="dark"] {
  --primary-color: #ff9800; /* Keeping primary color consistent in dark mode */
  --secondary-color: #ff5722; /* Keeping secondary color consistent in dark mode */
  --bg-primary: #121212; /* A dark background for dark mode */
  --text-color: #e0e0e0; /* A light gray for primary text in dark mode */
  --text-color-two: #ffffff; /* White for secondary text */
  --bg-secondary: #1e1e1e; /* A slightly lighter dark background for secondary elements */
  --card-background: #2c2c2c; /* A dark gray for card backgrounds */
  --bg-secondary-two: #333333; /* A medium gray for secondary elements */
  --accordion-bg: #1e1e1e; /* A slightly lighter dark background for the accordion */
  --accordion-text: #e0e0e0; /* Light gray for text in the accordion */

  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
  --link-color: #e0e0e0; /* Light gray for links in dark mode */
}


html {
  height: 100%;
  margin: 0;
  scroll-behavior: smooth;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main styling */
body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* Header Container */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 8rem;
  padding: 1rem;
}

.header-container > div {
  margin-top: 1rem;
}

.content-text {
  text-align: center;
  margin: 1.5rem 0;
}

.content-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  transition: 0.2s ease-in-out;
}

.content-text p {
  padding: 0.5rem;
  margin: 0 auto;
  max-width: 700px;
}

.header-container .btn:hover {
  background-color: var(--primary-color);
}

/* Navbar */
.logo-container {
  font-family: "Stylish", serif;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

#logo {
  display: flex;
  align-items: center;
}

#logo img {
  margin-right: 10px;
  width: 40px;
  display: block;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  position: relative;
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  color: var(--text-color);
  text-decoration: none;
  overflow: hidden;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.navbar .nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.navbar .btn {
  margin-right: 1.5rem;
  background-color: var(--primary-color);
  color: var(--text-color-two);
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.language-selection {
  margin-left: 15px;
  display: flex;
  align-items: center;
}

.flag-icon {
  margin-top: 10px;
  width: 20px;
  height: auto;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}

/* Footer */
#footer {
  background: var(--bg-secondary-two);
  color: var(--text-color-two);
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 160px;
  text-align: center;
}

#footer a {
  font-size: 0.8rem;
  color: var(--text-color-two);
}

#footer a:hover {
  opacity: 0.6;
}

#footer .social {
  margin: 0.9rem 0;
}

#footer .social img {
  width: 20px;
  height: 20px;
}

#footer .social a {
  margin: 0 0.5rem;
}

#footer p {
  font-size: 0.8rem;
}

/* Contact */
.contact-info {
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-info .icon {
  margin-right: 10px;
}

.contact-info a {
  color: var(--text-color);
  text-decoration: none;
  margin-right: 20px;
  padding-left: 10px;
}

[data-theme="dark"] .contact-info a {
  color: var(--text-color-two);}


/* Responsiveness */

@media (max-width: 1000px) {
  .project {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .project {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Hover-korjaus: varmistetaan napit kaikkialla */
a.nav-link.btn:hover,
a.nav-link.btn.btn-secondary:hover {
  background-color: var(--primary-color) !important;
  color: var(--text-color-two) !important;
}
