:root {
  --bg-color: #fff;
  --text-color: #333;
  --nav-bg: #c5c6c7;
  --nav-text: #484848;
  --nav-hover-bg: #383838;
  --nav-hover-text: #fff;
  --wrapper-style1-bg: #fff;
  --wrapper-style2-bg: #f4f4f4;
  --wrapper-style3-bg: #f4f4f4;
  --box-bg: #fff;
  --box-shadow: rgba(0, 0, 0, 0.1);
  --border-color: #ccc;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --nav-bg: #2d2d2d;
  --nav-text: #e0e0e0;
  --nav-hover-bg: #404040;
  --nav-hover-text: #fff;
  --wrapper-style1-bg: #1a1a1a;
  --wrapper-style2-bg: #222;
  --wrapper-style3-bg: #222;
  --box-bg: #2d2d2d;
  --box-shadow: rgba(255, 255, 255, 0.1);
  --border-color: #444;
}

body {
  font-family: Computer Roman;
  font-size: 16pt;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Container classes */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px var(--box-shadow);
  background-color: var(--box-bg);
  float: none;
}

.profile-card .content {
  padding: 63px 30px 30px 30px;
  text-align: center;
  position: relative;
}

.profile-card p {
  margin-top: 1px;
}
/* Cover image container */
.cover-image-container {
  width: 100%;
  height: 460px;
  background-color: #f5f5f5;
  position: relative;
  overflow: hidden;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: optimize-contrast;
}

/* Profile image container */
.profile-image-container {
  position: absolute;
  top: 425px;
  left: calc(50vw - 425px); /* Centers the container then offsets left */
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 4px solid var(--box-bg);
  overflow: hidden;
  box-shadow: 0 4px 12px var(--box-shadow);
  background: var(--box-bg);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 10;
}

.profile-image-container:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px var(--box-shadow);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: optimize-contrast;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.medium {
  width: 900px;
}
.wrapper {
  padding: 2em 0;
}

.wrapper.style1 {
  background: #fff;
}
.wrapper.style2 {
  background: #f4f4f4;
  padding: 3em 0;
}

.wrapper.style3 {
  background-color: var(--wrapper-style3-bg);
  /* text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5); */
}

/* Navigation */
#nav {
  background-color: var(--nav-bg);
  text-align: center;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 10000;
  cursor: default;
  height: 4.5em;
  line-height: 4.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 0em;
}

/* Navigation container - wider than regular containers */
#nav .nav-container {
  max-width: 1400px; /* Increased to accommodate all items in one line */
  margin: 0 auto;
  margin-top: 0.5em;
  padding: 0 20px; /* Reduced padding */
}

#nav ul {
  margin-bottom: 0;
  list-style: none;
  padding-left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8em; /* Reduced gap for tighter spacing */
  flex-wrap: nowrap; /* Prevent wrapping to next line */
  white-space: nowrap; /* Prevent text wrapping */
}

#nav li {
  display: inline-block;
  padding-left: 0;
  margin: 0; /* Remove individual margins since we're using gap */
}

#nav a {
  -moz-transition: background-color 0.2s ease-in-out;
  -webkit-transition: background-color 0.2s ease-in-out;
  -ms-transition: background-color 0.2s ease-in-out;
  transition: background-color 0.2s ease-in-out;
  position: relative;
  display: block;
  color: var(--nav-text);
  text-decoration: none;
  outline: 0;
  font-weight: 600;
  border-radius: 8px;
  height: 2.5em;
  line-height: 2.5em;
  padding: 0 1em; /* Reduced padding to save space */
  white-space: nowrap; /* Prevent text from wrapping */
}

#nav a:hover {
  color: var(--nav-hover-text) !important;
  background: var(--nav-hover-bg);
}

#nav a.active {
  background: #484848;
}

#nav a.active:before {
  content: "";
  display: block;
  position: absolute;
  bottom: -0.6em;
  left: 50%;
  margin-left: -0.75em;
  border-left: solid 0.75em transparent;
  border-right: solid 0.75em transparent;
  border-top: solid 0.6em #282828;
}

/* Mobile navigation toggle button */
.nav-toggle {
  display: none;
  position: absolute;
  right: 1em;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.3em 0.5em;
  background: transparent;
  color: #000;
  cursor: pointer;
  font-size: 1.5em;
  border: none;
  border-radius: 4px;
  z-index: 10001;
  height: 3.5em;
  line-height: 1;
}

/* Optional: add a subtle hover effect */
.nav-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Social nav icons */
.social-nav a {
  width: 2.2em; /* Slightly smaller to save space */
  padding: 0;
  margin: 0;
  flex-shrink: 0; /* Prevent icons from shrinking */
}

/* Add gap between nav and content */
#top {
  margin-top: 4em;
  padding-top: 2em;
}

/* Make sure the button doesn't affect the layout at larger screens */
@media screen and (max-width: 768px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #nav {
    height: 4.5em;
  }

  #nav .nav-container {
    padding: 0 20px; /* Reduced padding on mobile */
  }

  #nav ul.nav-container {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 4.5em 0 1em;
    background-color: var(--nav-bg);
    position: absolute;
    top: 0;
    left: 0;
  }

  #nav ul.nav-container.show {
    display: flex !important;
    flex-direction: column;
  }

  #nav li {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0;
    padding: 0;
  }

  #nav a {
    width: 100%;
    padding: 0 2em;
    border-radius: 0;
  }

  #nav a.active:before {
    display: none;
  }
}

/* Add gap between nav and content */
#top {
  margin-top: 3em; /* Space for fixed navbar plus gap */
  padding-top: 2em;
}

/* Headers and text */
header {
  text-align: center;
  margin-bottom: 2em;
}

h1,
h2,
h3 {
  color: var(--text-color);
  margin-top: 0;
}

h2 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

/* Box */
.box {
  background: var(--box-bg);
  box-shadow:
    inset 0px 0px 0px 1px rgba(0, 0, 0, 0.15),
    0px 2px 3px 0px var(--box-shadow);
  text-align: center;
  padding: 2em;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.box.style1 {
  padding: 3em 1em 3.5em 1em;
  max-height: 500px;
}

.box.style1 h3 {
  margin-bottom: 0.5em;
}

.box.style2 h3 {
  margin-bottom: 0.25em;
}

.box.style2 .image {
  position: relative;
  left: 2em;
  top: 2em;
  margin: -4em 0 4em -4em;
  width: auto;
}

/* Grid system for 2x2 layout */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.aln-center {
  justify-content: center;
}

.col-4 {
  width: 33.333%;
  padding: 0 15px;
  margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 980px) {
  .col-6-medium {
    width: 50%;
  }
}

@media (max-width: 736px) {
  .col-12-small {
    width: 100%;
  }
}

.box {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.box:hover {
  transform: scale(1.05);
}
.box:hover {
  box-shadow:
    inset 0px 0px 0px 1px rgba(0, 0, 0, 0.2),
    0px 5px 10px 0px rgba(0, 0, 0, 0.15);
}
.box:hover {
  z-index: 5;
}

/* Article */
article {
  margin-bottom: 3em;
}
section > :last-child,
article > :last-child,
section:last-child,
article:last-child {
  margin-bottom: 0;
}
body > article {
  margin-bottom: 0;
}

/* Wrappers */

.wrapper {
  background-image: url("images/bg.png");
  box-shadow:
    inset 0px 1px 0px 0px rgba(0, 0, 0, 0.05),
    inset 0px 2px 3px 0px rgba(0, 0, 0, 0.1);
  padding: 8em 0 8em 0;
}

.wrapper.style1 {
  background-image: none;
  background-color: var(--wrapper-style1-bg);
}

.wrapper.style2 {
  background-color: var(--wrapper-style2-bg);
  /* text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5); */
}

.wrapper.style3 {
  background-color: var(--wrapper-style3-bg);
  /* text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5); */
}

.wrapper.style4 {
  background-color: #303030;
  color: #999;
  /* text-shadow: -1px -1px 0px #181818; */
  height: 100px;
  padding: 5px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrapper.style4 h1,
.wrapper.style4 h2,
.wrapper.style4 h3,
.wrapper.style4 h4,
.wrapper.style4 h5,
.wrapper.style4 h6 {
  color: #fff;
}

.wrapper.style4 form input[type="text"],
.wrapper.style4 form input[type="password"],
.wrapper.style4 form select,
.wrapper.style4 form textarea {
  border: none;
  background: #282828;
}

.wrapper.style4 form input[type="text"]:focus,
.wrapper.style4 form input[type="password"]:focus,
.wrapper.style4 form select:focus,
.wrapper.style4 form textarea:focus {
  background: #252525;
}

/* Copyright */
#copyright {
  color: #666;
  font-size: 0.8em;
  line-height: 1em;
  list-style: none;
  padding-left: 0;
  margin: 0;
  text-align: center;
  display: flex;
  justify-content: center;
}

#copyright li {
  display: inline-block;
  border-left: solid 1px rgba(0, 0, 0, 0.5);
  box-shadow: -1px 0px 0px 0px rgba(255, 255, 255, 0.1);
  padding: 0 0 0 1em;
  margin: 0 0 0 1em;
}

#copyright li:first-child {
  border: 0;
  box-shadow: none;
  padding-left: 0;
  margin-left: 0;
}

#copyright a {
  -moz-transition: color 0.2s ease-in-out;
  -webkit-transition: color 0.2s ease-in-out;
  -ms-transition: color 0.2s ease-in-out;
  transition: color 0.2s ease-in-out;
  color: inherit;
}

#copyright a:hover {
  color: #777;
}

a:link {
  color: #c7411c; /* Sets unvisited links to blue */
}

a:visited {
  color: #c7411c;
}

/* List */

.pub.li {
  margin: 15px 0;
}

/* Dark mode toggle button */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--nav-bg);
  color: var(--nav-text);
  cursor: pointer;
  font-size: 1.2em;
  box-shadow: 0 2px 10px var(--box-shadow);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-text);
  transform: scale(1.1);
}
