/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: 1rem -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: #f5f5f5;
  color: #333;
}

/* Link styles */
a {
  color: #ff8c00;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:visited {
  color: #ff8c00;
}

a:hover {
  color: #333;
  text-decoration: underline;
}

a.active {
  color: #333;
  font-weight: 600;
}

/* Headings */
h2 {
  margin: 1rem 0 0.75rem;
  padding: 0.75rem 0;
  font-size: 1.3rem;
  font-weight: 600;
}

h3 {
  padding: 0.6rem 0.75rem;
  color: #fff;
  background: #ff8c00;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3px;
}

h4 {
  padding: 0.6rem 0.75rem;
  color: #333;
  background: #ffe4c4;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 3px;
}

/* Paragraphs and images */
p {
  margin: 0.5rem 0 0.75rem;
}

img {
  border: none;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
#header {
  background: linear-gradient(135deg, #ff8c00 0%, #ffaa33 100%);
  padding: 1.4rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  grid-area: header;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#header h1 {
  font-size: 1.95rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0;
  flex: 1;
}

#header h1 a {
  color: #fff;
  text-decoration: none;
}

#header h1 a:hover {
  color: #f5f5f5;
}

#header h2 {
  color: #fff;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0;
  margin: 0;
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  margin-right: 1rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-6px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main container */
#wrap {
  width: min(900px, calc(100% - 2rem));
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header"
    "left right"
    "footer footer";
  min-height: 500px;
}

/* Left sidebar */
#left {
  width: auto;
  background: #fff8f0;
  padding: 1.5rem 0;
  border-right: 2px solid #ffe4c4;
  grid-area: left;
}

#left ul {
  padding: 0.5rem 1rem;
  margin: 0;
  list-style: none;
}

#left li {
  list-style-type: none;
  padding: 0.5rem 0;
}

#left li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

#left li a:hover {
  background: #ffe4c4;
  text-decoration: none;
}

/* Right content area */
#right {
  padding: 1.5rem;
  overflow: auto;
  grid-area: right;
  min-width: 0;
}

#right li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#right ul {
  margin: 1rem 0 1rem 1rem;
  padding-left: 1rem;
}

#right ol {
  margin: 1rem 0 1rem 1rem;
  padding-left: 1rem;
}

#right .box {
  margin: 1rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid #ff8c00;
}

#right li img {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.linkedin-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #0a66c2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.linkedin-button:hover {
  background: #004182;
  color: #fff;
  text-decoration: none;
}

/* Footer */
#footer {
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
  color: #666;
  grid-area: footer;
}

/* Responsive design */
/* Note: Consider minifying CSS in production for better performance */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  #wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "header"
      "left"
      "right"
      "footer";
  }

  #left {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #ffe4c4;
    display: none;
    position: static;
  }

  #left.show {
    display: block;
  }

  #left ul {
    display: block;
  }

  #left li {
    padding: 0;
  }

  #right {
    padding: 1rem;
  }

  #header h1 {
    font-size: 1.8rem;
  }

  #header h2 {
    font-size: 1rem;
  }

  body {
    font-size: 0.95rem;
  }
}
