/* main.css */

:root {
  --primary-color: #222629; /* header #222629*/
  --secondary-color:  #e9e9e9 ; /* Gradient for main */
  --accent-color: #86c232; /* Extra color #86c232*/
  --link-color: #0d174d; /* Link color */
  --text-color: #000000; /* Text */
  --hover-color: #e9e9e9 ; /* Same as secondary color e0e1e2*/
  --secondary-color-darker: #cccccc; /* This will be updated by JavaScript it doesn't matter the value */
  --primary-font: 'Roboto', sans-serif;
  --secondary-font: 'Montserrat', sans-serif; /* or 'Playfair Display', serif; */
  --text-size: 18px; /* Base text size */
  --header-size: 32px; /* Base size for headers */
}

body {
  font-family: var(--primary-font);
  font-size: var(--text-size);
  line-height: 1.6; /* Adjust line height for better readability */
  margin: 0;
  padding: 0;
  background: linear-gradient(to right, #c4c3c3, #e9e9e9 35%, #e9e9e9  65%, #c4c3c3) !important;
  color: var(--text-color);
}

h1, h2, h3 {
  font-family: var(--secondary-font);
}

h1 {
  font-size: calc(var(--text-size) * 2); /* 32px if text-size is 16px */
}

h2 {
  font-size: calc(var(--text-size) * 1.75); /* 28px if text-size is 16px */
}

h3 {
  font-size: calc(var(--text-size) * 1.5); /* 24px if text-size is 16px */
}

header {
  background-color: var(--primary-color);
  padding: 20px;
  text-align: center;
}

.image-caption {
  text-align: center;
}

.centered-heading {
  text-align: center;
  margin: 20px 0; /* Adjust margin as needed */
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-content h1 {
  margin: 0;
  padding: 0 10px;
  color: var(--accent-color);
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  color: var(--accent-color);
  font-size: 1.5em;
  text-decoration: none;
}

.social-icons a .fab.fa-github:hover {
  color: #e0e0e0; /* GitHub black */
}

.social-icons a .fas.fa-envelope:hover {
  color: #c71610; /* Email red */
}

.social-icons a:hover {
  color: #0073b1; /* LinkedIn blue for LinkedIn */
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav ul li {
  display: inline;
  margin-right: 20px; /* Space between elements */
}

nav ul li a {
  text-decoration: none;
  color: var(--accent-color); /* Default color */
  font-size: 1.2em; /* Increase font size */
  font-weight: bold; /* Make text bold */
  transition: transform 0.3s ease, color 0.3s ease; /* Add transition for animation */
  display: inline-block; /* Ensure the transform property works */
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--hover-color);
  transform: scale(1.1); /* Scale up on hover */
}

main {
  padding: 20px;
  margin-left: 10%;
  margin-right: 10%;
}

footer {
  background-color: var(--primary-color);
  color: var(--accent-color);
  padding: 10px;
  text-align: center;
}

/* Main title */
.main-title {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  text-align: center;
  margin-top: 30px;
}

h4 {
  margin-top: 0; /* Ensure headers don't add extra space */
}

/* Intro text */
.intro-text {
  text-align: center;
}

/* Skills table */
.skills-table {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
  /* background-color: var(--secondary-color);*/
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.skills-table .skill-item {
  flex: 1 1 calc(18% - 30px);
  text-align: center;
  vertical-align: top;
  padding: 10px;
  background-color: var(--primary-color);
  border-radius: 8px;
  transition: transform 0.3s, background-color 0.3s;
}

.skills-table .skill-item:hover {
  transform: scale(1.05);
  background-color: var(--accent-color);
}

.skills-table .skill-item h3 {
  font-size: 1.5em;
  color: var(--secondary-color);
}

.skills-table .skill-item p {
  font-size: 0.9em;
  color: var(--secondary-color);
}

.skills-table .skill-item a {
  text-decoration: none;
  color: inherit;
}

.image-wrapper {
  width: 80%;
  height: 0;
  padding-bottom: 80%;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.skills-table img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section heading */
.section-heading {
  margin-top: 80px;
  color: var(--primary-color);
}

/* Contact text */
.contact-text {
  color: var(--text-color);
}

.contact-link {
  color: var(--link-color);
}

.contact-link:hover {
  color: var(--accent-color);
}

/* Intro container */
.intro-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.intro-container .text {
  flex: 1;
  margin-right: 20px;
}

.intro-container .circular-image-container {
  flex: 0 0 250px;
  margin-left: 20px;
}

.intro-container .circular-image {
  width: 100%;
  height: auto;
  border-radius: 50%;
  overflow: hidden;
}

/* Images container */

.image-container {
  max-width: 100%; /* Use max-width to limit the container's size */
  width: 100%; /* Set desired width in pixels */
  height: auto; /* Set desired height in cm */
  overflow: hidden; /* Ensures that the content does not overflow the bounds of its container */
  margin: 20px auto; /* Center the container */
  transition: transform 0.3s ease; /* Smooth transition for zoom effect */
}

.image-container img {
  width: 100%;
  height: auto; /* Adjust height automatically */
  object-fit: cover; /* Ensure the image covers the container */
}

.image-container:hover {
  transform: scale(1.1); /* Scales up the entire container to 110% of its original size on hover */
}

/* Tables */
.data-table {
  width: 80%; /* Adjust this percentage to make the table narrower */
  max-width: 600px; /* Optional: set a max width in pixels */
  margin: 20px auto; /* Center the table */
  border-collapse: collapse;
  font-size: 1em;
  font-family: 'Open Sans', Arial, sans-serif;
  border: 2px solid #dddddd;
}

.data-table thead tr {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  text-align: left;
  font-weight: bold;
}

.data-table th, .data-table td {
  padding: 12px 15px;
  border: 2px solid #dddddd;
}

.data-table tbody tr {
  border-bottom: 2px solid #dddddd;
}

.data-table tbody tr:nth-of-type(even) {
  background-color: var(--secondary-color-darker);
}

.data-table tbody tr:last-of-type {
  border-bottom: 2px solid var(--primary-color);
}

.data-table-container {
  overflow-x: auto; /* Enables horizontal scrolling if the table exceeds the screen width */
}


/* Containers */
.grid-container {
  display: grid;
  grid-gap: 20px;
  margin: 0; /* Remove top margin */
}

.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-2x1 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, auto);
}


.grid-item {
  padding: 20px;
  /*background-color: var(--secondary-color);*/
  border-radius: 8px;
  border: 4px solid var(--primary-color); 
}


/* Other CSS rules */

.fade-out {
  animation: fadeOut 0.5s forwards;
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* Media queries doe small screens */
@media (max-width: 768px) {
  .header-content {
      flex-direction: column;
  }

  nav ul {
      padding: 0;
      text-align: center;
  }

  nav ul li {
      display: block; /* Stack the navigation links */
      margin-right: 0;
      margin-bottom: 10px;
  }

  .social-icons {
      justify-content: center;
      margin-bottom: 20px;
  }

  main {
      margin-left: 5%;
      margin-right: 5%;
  }

  .grid-container {
      grid-template-columns: 1fr; /* Stack grid items */
  }
}

@media (max-width: 768px) {
  body {
      font-size: 16px; /* Smaller base font size for mobile */
  }

  h1, h2, h3 {
      line-height: 1.2;
  }
}
@media (max-width: 768px) {
  nav ul li a, .social-icons a {
      font-size: 1.5em; /* Larger touch targets */
  }
}
.horizontal-images {
  display: flex;
  justify-content: space-around; /* Distributes space evenly around the items */
  align-items: center; /* Aligns items vertically in the center */
  flex-wrap: wrap; /* Allows items to wrap onto the next line as needed */
}

@media (max-width: 768px) {
  .horizontal-images {
    flex-direction: column; /* Stacks the images vertically on smaller screens */
  }
}

@media (max-width: 768px) {
  body {
      font-size: 14px; /* Further reduce font size for small devices */
  }

  .image-container {
    width: 95%; /* Adjust width to provide padding on small screens */
    max-width: 100%; /* Allows the container to fit smaller devices */
  }

  .grid-2x2 {
    grid-template-columns: 1fr; /* Switch to one column on smaller screens */
  }

  .grid-container {
    grid-template-columns: 1fr; /* Stack grid items in a single column on smaller screens */
    width: 100%; /* Ensure the grid container uses the full width of the viewport */
    max-width: 100%; /* Prevents the grid from exceeding the viewport width */
    padding: 0; /* Remove padding to use the entire screen width */
    margin: 0 auto; /* Center the grid within the viewport if necessary */
    box-sizing: border-box; /* Include padding and border in the width calculation *
  }
  .grid-item {
    width: 100%; /* Make grid items fill the container */
    max-width: 100%; /* Prevents grid items from exceeding the container's width */
    margin: 0; /* Remove any default margin */
    padding: 10px; /* Maintain internal spacing */
    box-sizing: border-box; /* Include padding and border in the width calculation */
  }
}

@media (max-width: 768px) {
  .grid-item a {
      padding: 10px; /* Larger padding for better touch interaction */
      font-size: larger; /* Increase font size for better readability */
  }
}

@media (max-width: 768px) {
  .data-table {
      width: 100%; /* Allow the table to expand to the full width of the container */
      max-width: none; /* Remove the max-width limit */
      font-size: 0.9em; /* Optionally, reduce the font size to fit more content */
  }

  .data-table th, .data-table td {
      padding: 8px 10px; /* Reduce padding to save space */
  }
}

/* main.css */

:root {
  --primary-color: #222629; /* header #222629*/
  --secondary-color:  #e9e9e9 ; /* Gradient for main */
  --accent-color: #86c232; /* Extra color #86c232*/
  --link-color: #0d174d; /* Link color */
  --text-color: #000000; /* Text */
  --hover-color: #e9e9e9 ; /* Same as secondary color e0e1e2*/
  --secondary-color-darker: #cccccc; /* This will be updated by JavaScript it doesn't matter the value */
  --primary-font: 'Roboto', sans-serif;
  --secondary-font: 'Montserrat', sans-serif; /* or 'Playfair Display', serif; */
  --text-size: 18px; /* Base text size */
  --header-size: 32px; /* Base size for headers */
}

body {
  font-family: var(--primary-font);
  font-size: var(--text-size);
  line-height: 1.6; /* Adjust line height for better readability */
  margin: 0;
  padding: 0;
  background: linear-gradient(to right, #c4c3c3, #e9e9e9 35%, #e9e9e9  65%, #c4c3c3) !important;
  color: var(--text-color);
}

h1, h2, h3 {
  font-family: var(--secondary-font);
}

h1 {
  font-size: calc(var(--text-size) * 2); /* 32px if text-size is 16px */
}

h2 {
  font-size: calc(var(--text-size) * 1.75); /* 28px if text-size is 16px */
}

h3 {
  font-size: calc(var(--text-size) * 1.5); /* 24px if text-size is 16px */
}

header {
  background-color: var(--primary-color);
  padding: 20px;
  text-align: center;
}

.centered-heading {
  text-align: center;
  margin: 20px 0; /* Adjust margin as needed */
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-content h1 {
  margin: 0;
  padding: 0 10px;
  color: var(--accent-color);
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  color: var(--accent-color);
  font-size: 1.5em;
  text-decoration: none;
}

.social-icons a .fab.fa-github:hover {
  color: #e0e0e0; /* GitHub black */
}

.social-icons a .fas.fa-envelope:hover {
  color: #c71610; /* Email red */
}

.social-icons a:hover {
  color: #0073b1; /* LinkedIn blue for LinkedIn */
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav ul li {
  display: inline;
  margin-right: 20px; /* Space between elements */
}

nav ul li a {
  text-decoration: none;
  color: var(--accent-color); /* Default color */
  font-size: 1.2em; /* Increase font size */
  font-weight: bold; /* Make text bold */
  transition: transform 0.3s ease, color 0.3s ease; /* Add transition for animation */
  display: inline-block; /* Ensure the transform property works */
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--hover-color);
  transform: scale(1.1); /* Scale up on hover */
}

main {
  padding: 20px;
  margin-left: 10%;
  margin-right: 10%;
}

footer {
  background-color: var(--primary-color);
  color: var(--accent-color);
  padding: 10px;
  text-align: center;
}

/* Main title */
.main-title {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  text-align: center;
  margin-top: 30px;
}

h4 {
  margin-top: 0; /* Ensure headers don't add extra space */
}

/* Intro text */
.intro-text {
  text-align: center;
}

/* Skills table */
.skills-table {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
  /* background-color: var(--secondary-color);*/
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.skills-table .skill-item {
  flex: 1 1 calc(18% - 30px);
  text-align: center;
  vertical-align: top;
  padding: 10px;
  background-color: var(--primary-color);
  border-radius: 8px;
  transition: transform 0.3s, background-color 0.3s;
}

.skills-table .skill-item:hover {
  transform: scale(1.05);
  background-color: var(--accent-color);
}

.skills-table .skill-item h3 {
  font-size: 1.5em;
  color: var(--secondary-color);
}

.skills-table .skill-item p {
  font-size: 0.9em;
  color: var(--secondary-color);
}

.skills-table .skill-item a {
  text-decoration: none;
  color: inherit;
}

.image-wrapper {
  width: 80%;
  height: 0;
  padding-bottom: 80%;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.skills-table img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section heading */
.section-heading {
  margin-top: 80px;
  color: var(--primary-color);
}

/* Contact text */
.contact-text {
  color: var(--text-color);
}

.contact-link {
  color: var(--link-color);
}

.contact-link:hover {
  color: var(--accent-color);
}

/* Intro container */
.intro-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.intro-container .text {
  flex: 1;
  margin-right: 20px;
}

.intro-container .circular-image-container {
  flex: 0 0 250px;
  margin-left: 20px;
}

.intro-container .circular-image {
  width: 100%;
  height: auto;
  border-radius: 50%;
  overflow: hidden;
}

/* Images container */

.image-container {
  max-width: 100%; /* Use max-width to limit the container's size */
  width: 100%; /* Set desired width in pixels */
  height: auto; /* Set desired height in cm */
  overflow: hidden; /* Ensures that the content does not overflow the bounds of its container */
  margin: 20px auto; /* Center the container */
  transition: transform 0.3s ease; /* Smooth transition for zoom effect */
}

.image-container img {
  width: 100%;
  height: auto; /* Adjust height automatically */
  object-fit: cover; /* Ensure the image covers the container */
}

.image-container:hover {
  transform: scale(1.1); /* Scales up the entire container to 110% of its original size on hover */
}

/* Tables */
.data-table {
  width: 80%; /* Adjust this percentage to make the table narrower */
  max-width: 600px; /* Optional: set a max width in pixels */
  margin: 20px auto; /* Center the table */
  border-collapse: collapse;
  font-size: 1em;
  font-family: 'Open Sans', Arial, sans-serif;
  border: 2px solid #dddddd;
}

.data-table thead tr {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  text-align: left;
  font-weight: bold;
}

.data-table th, .data-table td {
  padding: 12px 15px;
  border: 2px solid #dddddd;
}

.data-table tbody tr {
  border-bottom: 2px solid #dddddd;
}

.data-table tbody tr:nth-of-type(even) {
  background-color: var(--secondary-color-darker);
}

.data-table tbody tr:last-of-type {
  border-bottom: 2px solid var(--primary-color);
}

.data-table-container {
  overflow-x: auto; /* Enables horizontal scrolling if the table exceeds the screen width */
}


/* Containers */
.grid-container {
  display: grid;
  grid-gap: 20px;
  margin: 0; /* Remove top margin */
}

.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-2x1 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, auto);
}


.grid-item {
  padding: 20px;
  /*background-color: var(--secondary-color);*/
  border-radius: 8px;
  border: 4px solid var(--primary-color); 
}


/* Other CSS rules */

.fade-out {
  animation: fadeOut 0.5s forwards;
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* Media queries doe small screens */
@media (max-width: 768px) {
  .header-content {
      flex-direction: column;
  }

  nav ul {
      padding: 0;
      text-align: center;
  }

  nav ul li {
      display: block; /* Stack the navigation links */
      margin-right: 0;
      margin-bottom: 10px;
  }

  .social-icons {
      justify-content: center;
      margin-bottom: 20px;
  }

  main {
      margin-left: 5%;
      margin-right: 5%;
  }

  .grid-container {
      grid-template-columns: 1fr; /* Stack grid items */
  }
}

@media (max-width: 768px) {
  body {
      font-size: 16px; /* Smaller base font size for mobile */
  }

  h1, h2, h3 {
      line-height: 1.2;
  }
}
@media (max-width: 768px) {
  nav ul li a, .social-icons a {
      font-size: 1.5em; /* Larger touch targets */
  }
}
.horizontal-images {
  display: flex;
  justify-content: space-around; /* Distributes space evenly around the items */
  align-items: center; /* Aligns items vertically in the center */
  flex-wrap: wrap; /* Allows items to wrap onto the next line as needed */
}

@media (max-width: 768px) {
  .horizontal-images {
    flex-direction: column; /* Stacks the images vertically on smaller screens */
  }
}

@media (max-width: 768px) {
  body {
      font-size: 14px; /* Further reduce font size for small devices */
  }

  .image-container {
    width: 95%; /* Adjust width to provide padding on small screens */
    max-width: 100%; /* Allows the container to fit smaller devices */
  }

  .grid-2x2 {
    grid-template-columns: 1fr; /* Switch to one column on smaller screens */
  }

  .grid-container {
    grid-template-columns: 1fr; /* Stack grid items in a single column on smaller screens */
    width: 100%; /* Ensure the grid container uses the full width of the viewport */
    max-width: 100%; /* Prevents the grid from exceeding the viewport width */
    padding: 0; /* Remove padding to use the entire screen width */
    margin: 0 auto; /* Center the grid within the viewport if necessary */
    box-sizing: border-box; /* Include padding and border in the width calculation *
  }
  .grid-item {
    width: 100%; /* Make grid items fill the container */
    max-width: 100%; /* Prevents grid items from exceeding the container's width */
    margin: 0; /* Remove any default margin */
    padding: 10px; /* Maintain internal spacing */
    box-sizing: border-box; /* Include padding and border in the width calculation */
  }
}

@media (max-width: 768px) {
  .grid-item a {
      padding: 10px; /* Larger padding for better touch interaction */
      font-size: larger; /* Increase font size for better readability */
  }
}

@media (max-width: 768px) {
  .data-table {
      width: 100%; /* Allow the table to expand to the full width of the container */
      max-width: none; /* Remove the max-width limit */
      font-size: 0.9em; /* Optionally, reduce the font size to fit more content */
  }

  .data-table th, .data-table td {
      padding: 8px 10px; /* Reduce padding to save space */
  }
}

@media (max-width: 768px) {
  .intro-container {
    display: flex;
    flex-direction: column; /* Stack the text and image vertically */
    align-items: center; /* Center-align the items */
    text-align: center; /* Ensure text is centered under the image */
    margin-bottom: 20px; /* Space below the image */
  }

  .intro-container .text,
  .intro-container .circular-image-container {
    width: 100%; /* Ensure both text and image containers take full width */
    margin: 0; /* Reset any margins that might affect the layout */
    padding: 10px 0; /* Add padding for spacing */
  }

  .intro-container .circular-image-container {
    order: -1; /* This will push the image above the text */
    margin-bottom: 20px; /* Additional spacing below the image */
  }
}


