:root {
  --font-main: Georgia, 'Times New Roman', Times, serif;

  /* Light mode colors */
  --bg-light: #fff;
  --text-light: #222;

  /* Dark mode colors */
  --bg-sides-dark: #121212;
  --bg-body-dark: #000000;
  --text-dark: #f4f4f4;

  --max-width: 900px;
  --padding: 1rem;
}

/* Page sides background */
html {
  background-color: var(--bg-sides-dark);
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-light);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  padding: var(--padding);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

header {
  display: block;
  text-align: center;
  padding: 1rem;
}

header img {
  width: 150px;
  height: auto;
  border-radius: 50%;
}

header div:nth-child(2) {
  margin-top: 1rem;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:visited {
  color: #5a3d99;
}

/* Base mobile-first layout: single column */
.resume {
  width: 100%;
  max-width: var(--max-width);
  background-color: var(--bg-light);
  display: grid;
  grid-template-columns: 1fr; /* Mobile: one column */
  gap: 1.5rem;
  border-radius: 8px;
  box-sizing: border-box;
  padding: var(--padding);

  /* Border + shadow for light mode */
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);

  transition: background-color 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

header,
footer {
  text-align: center;
}

/* Tablet & desktop layout */
@media (min-width: 768px) {
  .resume {
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
  }

  /* Header, footer, and description span full width */
  header,
  footer,
  .description {
    grid-column: span 2;
  }

  /* Header layout */
  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  header div:nth-child(1) {
    flex: 0 0 auto;
    margin-right: 2rem;
  }

  header div:nth-child(2) {
    flex: 1;
    margin-top: 0;
  }

  /* Four boxes below description */
  .technical-skills,
  .projects,
  .education,
  .experience {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--padding);
    border-radius: 8px;
  }
}

@media (min-width: 1200px) {
  body {
    padding: 2rem;
  }
}

header img {
  border-radius: 50%;
  width: 10rem;
  height: 10rem;
  object-fit: cover;
}

.resume section {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--padding);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  background: none;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #000;
}

/* Dark mode */
body[data-theme='dark'] {
  background: var(--bg-body-dark);
  color: var(--text-dark);
}

body[data-theme='dark'] .resume {
  background-color: var(--bg-body-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

body[data-theme='dark'] a {
  color: #66aaff;
}

body[data-theme='dark'] a:visited {
  color: #cba6ff;
}

body[data-theme='dark'] .resume section {
  background: rgba(0, 0, 0, 0.3);
}

body[data-theme='dark'] .theme-toggle {
  color: #fff;
}
