*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    transform 0.2s ease;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}
html, body, nav, main, footer, section, h1, h2, p, a, button {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    transform 0.2s ease;
}

:root {
  --bg-color: #f9f9f9;
  --text-color: #272727;
  --link-color: #3b82f6;
  --footer-color: #413f3f;
  --hover-link-color: #1d4ed8;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
}
[data-theme="dark"] {
  --bg-color: #404040;
  --text-color: #eeeef0;
  --link-color: #60a5fa;
  --footer-color: #94a3b8;
  --hover-link-color: #93c5fd;
  --card-bg: #323539;
  --border-color: #334155;
}

body {
  font-family: 'Lora', serif;
  background: var(--card-bg);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  display: flex;
  width: 850px;
  max-width: 95%;
  min-height: 600px;
  border-radius: 12px;
  overflow: hidden;
  flex-direction: row;
  background: var(--card-bg);
}

main {
  flex: 1;
  padding: 40px 30px 20px 40px;
  order: 0;
}

nav {
  padding: 44px 40px 0 0;
  order: 1;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

nav ul li a {
  display: block;
  text-align: right;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Lora', serif;
 color: var(--text-color);
}
nav ul li a:hover,
nav ul li a:focus {
  color: var(--hover-link-color);
  background-color: rgba(0,0,0,0.05);
  transform: translateX(-2px);
}

section {
  display: none;
}
section.active {
  display: block;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 -2px 0;
}

.name {
  align-items: start;
}

.subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: rgb(65, 65, 65);
  margin-bottom: 10px;
}

.social-links{
  font-size: 0.8rem;
}

.social-links a{
  color: #525252;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 2rem 0 0.5rem;
}

p,
ul {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  text-align: justify;
}

ul {
  list-style: disc inside;
  padding-left: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--hover-link-color);
  text-decoration: underline;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 12px;
  font-size: 0.8rem;
  color: var(--footer-color);
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--footer-color);
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.read-more-btn:hover,
.read-more-btn:focus {
  color: var(--text-color);
}

.read-more-btn span {
  font-size: 0.65rem;
  margin-left: 4px;
  vertical-align: middle;
}

.social-links a {
  margin-right: 8px;
  color: var(--footer-color);
}
.social-links a:hover {
  color: var(--hover-link-color);
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 940px) {
  .container {
    flex-direction: column;
    width: 100%;
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  nav {
    order: -1;
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
  }

  nav ul {
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 6px;
  }

  nav ul li a {
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
  }

  main {
    padding: 20px 16px;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.3rem;
  }
  .subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
}
