/* ===== Variables ===== */
:root {
  /* Colors */
  --color-bg: #0f172a;
  --color-bg-sidebar: #020617;
  --color-text: #e5e7eb;
  --color-text-muted: #cbd5f5;
  --color-text-light: #f8fafc;
  --color-accent: #93c5fd;
  --color-border: #1e293b;
  --color-footer: #94a3b8;
  --color-heading-border: #334155;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --line-height: 1.6;
  --h1-size: 2.5rem;
  --h2-size: 1.6rem;
  --tag-font-size: 0.85rem;

  /* Spacing */
  --container-max-width: 900px;
  --container-padding: 3rem 1.5rem;
  --sidebar-width: 220px;
  --sidebar-padding: 2rem 1rem;
  --gap: 1rem;
  --mobile-header-height: 4rem;
}

/* ===== Global Styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: var(--line-height);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Typography ===== */
h1, h2 {
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: var(--h1-size);
}

h2 {
  margin-top: 3rem;
  font-size: var(--h2-size);
  border-bottom: 1px solid var(--color-heading-border);
  padding-bottom: 0.3rem;
}

p,
ul {
  color: var(--color-text-muted);
}

p {
  max-width: 800px;
}

ul {
  margin-left: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--color-accent);
  font-weight: 500;
}

.tag {
  display: inline-block;
  background: var(--color-border);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin: 0.25rem 0.25rem 0 0;
  font-size: var(--tag-font-size);
}

/* ===== Layout ===== */
.container {
  max-width: var(--container-max-width);
  margin: auto;
  padding: var(--container-padding);
  margin-left: calc(var(--sidebar-width) + 20px); /* desktop sidebar spacing */
}

footer {
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--color-footer);
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-width);
  background: var(--color-bg-sidebar);
  padding: var(--sidebar-padding);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  border-right: 1px solid var(--color-border);
}

.sidebar a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.sidebar a:hover {
  color: var(--color-accent);
}

/* ===== Mobile Header ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-sidebar);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  align-items: center;
}

.mobile-header span {
  margin-left: 1rem;
  font-weight: 500;
}

.hamburger {
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
}

/* ===== Mobile Layout ===== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 999;
    padding-top: calc(var(--mobile-header-height) + 1rem);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .container {
    margin-left: 0;
    padding-top: var(--mobile-header-height);
  }

  .mobile-header {
    display: flex;
  }
}

/* About Me Section */
.about-me {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
}

.about-images {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--color-accent);
}

/* Desktop: images on the side */
@media (min-width: 901px) {
  .about-me {
    flex-direction: row;
  }
}

/* Mobile: stack images above text */
@media (max-width: 900px) {
  .about-me {
    flex-direction: column;
  }

  .about-images {
    flex-direction: row;
    justify-content: center;
  }

  .about-img {
    width: 200px;
    height: 200px;
  }
}
