@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

:root {
  --page-bg: #eef2f4;
  --panel-bg: #ffffff;
  --sidebar-bg: #f7f9fa;
  --header-bg: #1f2933;
  --header-text: #ffffff;
  --text-color: #1f2933;
  --muted-text: #5f6c76;
  --accent: #2563eb;
  --accent-hover: #1dd8d8;
  --border: #d8dee4;
  --shadow: 0 3px 8px rgba(0, 34, 68, 0.18);
  --radius: 12px;
}

body.dark-mode {
  --page-bg: #121820;
  --panel-bg: #1b2430;
  --sidebar-bg: #16202a;
  --header-bg: #0f1720;
  --header-text: #f8fafc;
  --text-color: #e5e7eb;
  --muted-text: #a7b0ba;
  --accent: #7dd3fc;
  --accent-hover: #bafdf4;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 1rem;
  background-color: var(--page-bg);
  color: var(--text-color);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.55;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.background-image-wrapper {
  position: fixed;
  inset: auto 0 0 0;
  height: 34vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.background-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.11;
}

.parent {
  width: min(1200px, 100%);
  min-height: calc(100vh - 2rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.7fr);
  grid-template-rows: auto 1fr;
  gap: 1rem;
}

.div-header,
.div-sidebar,
.div-content {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.div-header {
  grid-column: 1 / -1;
  padding: 2rem;
  background-color: var(--header-bg);
  color: var(--header-text);
  display: flex;
  align-items: center;
  gap: 2rem;
  text-align: left;
}

.header-text {
  min-width: 0;
  max-width: 760px;
}

.div-header p {
  max-width: none;
}

.profile-photo {
  width: 135px;
  height: 135px;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}

.div-sidebar,
.div-content {
  padding: 1.5rem;
}

.div-sidebar {
  background-color: var(--sidebar-bg);
  align-self: start;
}

.div-content {
  background-color: var(--panel-bg);
}

.section {
  margin-bottom: 2rem;
}

.section:last-child {
  margin-bottom: 0;
}

article {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

article:last-child {
  border-bottom: none;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
  max-width: 75ch;
  font-size: 0.98rem;
}

ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

li {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.tagline {
  margin-bottom: 0.8rem;
  color: var(--header-text);
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
  color: var(--header-text);
  font-size: 0.95rem;
}

.contact-links a {
  color: var(--header-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.contact-links a:hover {
  color: var(--accent-hover);
}

.subheading {
  margin-bottom: 0.75rem;
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.theme-toggle-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
}

#theme-toggle {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  background-color: var(--panel-bg);
  color: var(--text-color);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 0.9rem;
}

#theme-toggle:hover {
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .parent {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .div-header {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem 1.5rem;
  }

  .contact-links {
    justify-content: center;
  }

  .contact-links span {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    padding: 0.75rem;
  }

  .div-header,
  .div-sidebar,
  .div-content {
    padding: 1.25rem;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .contact-links {
    flex-direction: column;
    gap: 0.3rem;
  }

  .theme-toggle-container {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  #theme-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}
