* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #1A1A2E;
  background-color: #245D9E;
}

#page {
  max-width: 780px;
  width: 100%;
  margin: 18px auto;
  background: #ECE9D8;
  border: 1px solid #7AAEDB;
}

/* ---- Header: XP title-bar gradient ---- */

#header {
  background: linear-gradient(to bottom, #4A8CE2 0%, #2369C8 55%, #1A4FA0 100%);
  padding: 13px 18px 11px;
}

#header h1 {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: #FFFFFF;
  letter-spacing: 1px;
}

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

#header .tagline {
  font-size: 11px;
  color: #B0D4F8;
  margin-top: 3px;
}

/* XP green accent stripe */
#accent-stripe {
  height: 3px;
  background: #3CA83C;
  border-bottom: 1px solid #7AAEDB;
}

/* ---- Tab navigation ---- */

#nav {
  background: #0F3A9E;
  padding: 6px 8px 0;
  border-bottom: 2px solid #7AAEDB;
}

#nav a {
  display: inline-block;
  padding: 4px 13px 5px;
  background: linear-gradient(to bottom, #4A8CE2, #2369C8);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #0F3A9E;
  border-bottom: 2px solid #7AAEDB;
  border-radius: 3px 3px 0 0;
  margin-right: 3px;
  position: relative;
  bottom: -2px;
}

#nav a:hover {
  background: linear-gradient(to bottom, #6AAAF5, #3D7EDA);
  color: #FFFFFF;
}

/* Active tab opens into content */
#nav a.active {
  background: #ECE9D8;
  color: #0A2A7A;
  border: 1px solid #7AAEDB;
  border-bottom: 2px solid #ECE9D8;
  font-weight: bold;
}

/* ---- Portal content area ---- */

#content {
  background: #ECE9D8;
  padding: 10px;
}

.portal-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.portal-row:last-child {
  margin-bottom: 0;
}

.portal-box {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #8BAEDB;
}

.portal-box.wide {
  flex: 1.9;
}

.portal-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Standard box title: XP blue gradient + green left edge */
.box-title {
  background: linear-gradient(to right, #1A52A8, #3D8ADE);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-left: 4px solid #3CA83C;
  border-bottom: 1px solid #1241A0;
}


/* Special box title: orange — XP logo orange accent */
.box-title.amber {
  background: linear-gradient(to right, #C85800, #E87820);
  color: #FFF0E0;
  border-left: 4px solid #1A52A8;
  border-bottom: 1px solid #A04800;
}

.box-content {
  padding: 8px 10px;
}

/* ---- Post entries ---- */

.post-entry {
  padding: 6px 0;
  border-bottom: 1px solid #D8E4F0;
}

.post-entry:last-of-type {
  border-bottom: none;
  padding-bottom: 2px;
}

.post-date {
  font-size: 10px;
  color: #0055BB;
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}

.post-entry a {
  color: #003399;
  font-weight: bold;
  font-size: 13px;
  text-decoration: underline;
}

.post-entry a:visited {
  color: #7B0099;
}

.post-entry a:hover {
  color: #000000;
}

.post-entry p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #444450;
  line-height: 1.45;
}

/* ---- Projects list ---- */

.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-list li {
  padding: 5px 0;
  border-bottom: 1px solid #D8E4F0;
  font-size: 12px;
  line-height: 1.4;
}

.project-list li:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.project-list a {
  color: #003399;
  font-weight: bold;
  text-decoration: underline;
}

.project-list a:hover {
  color: #000000;
}

/* ---- Link lists ---- */

.link-category {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: #C85800;
  margin: 9px 0 4px;
  letter-spacing: 0.6px;
  border-bottom: 1px solid #E8B070;
  padding-bottom: 2px;
}

.link-category:first-child {
  margin-top: 0;
}

.link-list {
  list-style: none;
  padding: 0 0 0 8px;
  margin: 0;
}

.link-list li {
  padding: 2px 0;
  line-height: 1.5;
}

.link-list.cols {
  columns: 2 90px;
  column-gap: 16px;
}

.link-list.cols li {
  break-inside: avoid;
}

.link-list li::before {
  content: "\203A";
  color: #4A8CE2;
  margin-right: 5px;
  font-weight: bold;
}

.link-list a {
  color: #003399;
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
  color: #000000;
}

/* ---- 88x31 friend buttons ---- */

.friend-buttons {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.btn88 {
  display: inline-block;
  width: 88px;
  height: 31px;
  border: 1px solid #8BAEDB;
  font-size: 9px;
  font-weight: bold;
  color: #003399;
  text-decoration: none;
  text-align: center;
  line-height: 31px;
  background: linear-gradient(to bottom, #F0F4FC, #DCE8F8);
  font-family: Tahoma, Verdana, sans-serif;
  overflow: hidden;
  white-space: nowrap;
}

.btn88:hover {
  background: linear-gradient(to bottom, #DCE8F8, #C4D8F0);
  border-color: #3D7EDA;
}

/* ---- About / Now box ---- */

.box-content p {
  margin: 0 0 7px;
  font-size: 12px;
  line-height: 1.55;
}

.box-content p:last-child {
  margin-bottom: 0;
}

.box-content p a {
  color: #003399;
}

.box-content p a:hover {
  color: #000000;
}

.divider {
  border-top: 1px solid #D8E4F0;
  margin: 8px 0;
}

/* ---- More / archive links ---- */

.more-link {
  margin-top: 7px;
  font-size: 11px;
}

.more-link a {
  color: #C85800;
  font-weight: bold;
  text-decoration: none;
}

.more-link a:hover {
  text-decoration: underline;
  color: #903800;
}

/* ---- Footer ---- */

#footer {
  background: linear-gradient(to bottom, #163278, #0A246A);
  border-top: 3px solid #FF8C00;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8AB4D8;
}

#footer a {
  color: #C0D8F8;
  text-decoration: none;
}

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

.badge-img {
  height: 15px;
  vertical-align: middle;
  margin-right: 3px;
}

.badge {
  display: inline-block;
  background: #C85800;
  color: #FFF0E0;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px 2px;
  border: 1px solid #E87820;
  margin-right: 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---- Uses page ---- */

.uses-item {
  padding: 5px 0;
  border-bottom: 1px solid #D8E4F0;
  font-size: 11px;
  line-height: 1.5;
}

.uses-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.uses-item strong {
  color: #0A2A7A;
  display: inline-block;
  min-width: 90px;
}

/* ---- 404 page ---- */

.error-box {
  text-align: center;
  padding: 24px 16px;
}

.error-code {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 64px;
  font-weight: bold;
  color: #D8E4F0;
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 2px 2px 0 #8BAEDB;
}

.error-title {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #0A2A7A;
  margin: 8px 0 14px;
}

.error-body {
  font-size: 11px;
  color: #444450;
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 16px;
}

.error-body a {
  color: #003399;
}

.error-body a:hover {
  color: #000000;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.error-actions a {
  display: inline-block;
  padding: 4px 14px 5px;
  background: linear-gradient(to bottom, #4A8CE2, #2369C8);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid #0F3A9E;
  border-bottom: 2px solid #0A246A;
  border-radius: 3px 3px 0 0;
  font-family: Tahoma, Verdana, sans-serif;
}

.error-actions a:hover {
  background: linear-gradient(to bottom, #6AAAF5, #3D7EDA);
}

/* ---- Tags ---- */

.tag-cloud {
  line-height: 2;
  padding: 4px 0 2px;
}

.tag-cloud a {
  display: inline-block;
  margin: 1px 3px;
  color: #003399;
  text-decoration: none;
  font-weight: bold;
}

.tag-cloud a:visited {
  color: #7B0099;
}

.tag-cloud a:hover {
  text-decoration: underline;
  color: #000000;
}

.tag-size-1 { font-size: 10px; color: #6688BB; }
.tag-size-2 { font-size: 12px; color: #3366AA; }
.tag-size-3 { font-size: 14px; color: #1A52A8; }
.tag-size-4 { font-size: 17px; color: #0A3A88; }
.tag-size-5 { font-size: 20px; color: #002266; }

.tag-cloud a:hover { color: #000000; }

.tag-heading {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #0A2A7A;
  margin-bottom: 2px;
}

.tag-post-count {
  font-size: 10px;
  color: #0055BB;
  margin-bottom: 10px;
}

/* ---- Blog archive ---- */

.archive-year {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #0A2A7A;
  margin: 14px 0 4px;
  padding-bottom: 3px;
  border-bottom: 2px solid #4A8CE2;
}

.archive-year:first-child {
  margin-top: 0;
}

.archive-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px solid #F0F4FC;
  font-size: 12px;
}

.archive-entry:last-child {
  border-bottom: none;
}

.archive-date {
  flex-shrink: 0;
  width: 46px;
  color: #0055BB;
  font-weight: bold;
  font-size: 10px;
}

.archive-entry a {
  color: #003399;
  text-decoration: none;
}

.archive-entry a:visited {
  color: #7B0099;
}

.archive-entry a:hover {
  text-decoration: underline;
  color: #000000;
}

/* ---- Projects page ---- */

.project-entry {
  padding: 10px 0;
  border-bottom: 1px solid #D8E4F0;
}

.project-entry:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.project-entry-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.project-entry-title {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
}

.project-entry-title a {
  color: #003399;
  text-decoration: underline;
}

.project-entry-title a:hover {
  color: #000000;
}

.project-status {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 5px 2px;
  border: 1px solid;
}

.project-status.active {
  background: #E0F0E0;
  color: #1A6A1A;
  border-color: #3CA83C;
}

.project-status.maintained {
  background: #DCE8F8;
  color: #003399;
  border-color: #8BAEDB;
}

.project-status.archived {
  background: #F0EDE6;
  color: #706050;
  border-color: #C0B8A8;
}

.project-status.planned {
  background: #FFF0E0;
  color: #A0500A;
  border-color: #E8B070;
}

.project-entry p {
  font-size: 12px;
  color: #444450;
  line-height: 1.55;
  margin: 0 0 6px;
}

.project-entry p:last-child {
  margin-bottom: 0;
}

.project-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.project-tags {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.project-tag {
  display: inline-block;
  background: #DCE8F8;
  border: 1px solid #8BAEDB;
  color: #003399;
  font-size: 9px;
  padding: 0 5px;
  font-family: Tahoma, Verdana, sans-serif;
}

.project-links {
  font-size: 10px;
}

.project-links a {
  color: #C85800;
  font-weight: bold;
  text-decoration: none;
  margin-right: 8px;
}

.project-links a:hover {
  text-decoration: underline;
  color: #903800;
}

/* ---- Article page ---- */

.article-header {
  padding: 10px 0 8px;
  border-bottom: 1px solid #D8E4F0;
  margin-bottom: 14px;
}

.article-title {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 18px;
  font-weight: bold;
  color: #0A2A7A;
  line-height: 1.3;
  margin-bottom: 5px;
}

.article-meta {
  font-size: 10px;
  color: #0055BB;
  font-weight: bold;
}

.article-meta .tag {
  display: inline-block;
  background: #DCE8F8;
  border: 1px solid #8BAEDB;
  color: #003399;
  font-size: 9px;
  padding: 0 5px;
  margin-left: 6px;
  font-weight: normal;
}

.article-body p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.65;
  color: #1A1A2E;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #0A2A7A;
  margin: 18px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid #D8E4F0;
}

.article-body h3 {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #1A3A88;
  margin: 14px 0 5px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 10px 20px;
  font-size: 12px;
  line-height: 1.65;
  color: #1A1A2E;
}

.article-body li {
  margin-bottom: 3px;
}

.article-body a {
  color: #003399;
}

.article-body a:visited {
  color: #7B0099;
}

.article-body a:hover {
  color: #000000;
}

.article-body blockquote {
  margin: 10px 0;
  padding: 6px 10px;
  border-left: 3px solid #4A8CE2;
  background: #F0F4FC;
  color: #444450;
  font-size: 12px;
  line-height: 1.6;
}

.article-body pre {
  margin: 10px 0;
  padding: 8px 10px;
  background: #1A1A2E;
  color: #C8D8F0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  border: 1px solid #0F3A9E;
}

.article-body code {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  background: #DCE8F8;
  border: 1px solid #8BAEDB;
  padding: 0 3px;
  color: #0A2A7A;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.article-footer {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #D8E4F0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.article-footer a {
  color: #C85800;
  font-weight: bold;
  text-decoration: none;
}

.article-footer a:hover {
  text-decoration: underline;
  color: #903800;
}

/* ---- Responsive ---- */

/* Once viewport is narrower than the page, drop the body background colour
   (blue desktop would peek through) and remove the side borders. */
@media (max-width: 820px) {
  body {
    background-color: #ECE9D8;
  }

  #page {
    margin: 0 auto;
    border-left: none;
    border-right: none;
  }
}

/* Single-column layout for phones */
@media (max-width: 620px) {
  #page {
    margin: 0;
  }

  #header {
    padding: 10px 12px 9px;
  }

  /* Horizontal scroll rather than wrapping tabs — preserves the tab visuals */
  #nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 6px 6px 0;
  }

  #content {
    padding: 8px;
  }

  /* Stack portal columns */
  .portal-row {
    flex-direction: column;
  }

  .portal-column {
    flex: unset;
  }

  /* Reset the wide-column ratio when stacked */
  .portal-box.wide {
    flex: unset;
  }

  /* Stack footer halves */
  #footer {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
}

/* ---- Alert boxes ---- */

.alert {
  padding: 7px 10px 7px 12px;
  margin: 12px 0;
  border: 1px solid;
  border-left: 4px solid;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
}

.alert-warning {
  background-color: #FFF5E0;
  border-color: #E8B070;
  border-left-color: #C85800;
  color: #6B3400;
}

.alert-info {
  background-color: #E8F0FC;
  border-color: #8BAEDB;
  border-left-color: #4A8CE2;
  color: #0A246A;
}

.alert-success {
  background-color: #E8F5E0;
  border-color: #A0D090;
  border-left-color: #3CA83C;
  color: #1A4A1A;
}

.alert-danger {
  background-color: #FDE8E8;
  border-color: #E8A0A0;
  border-left-color: #CC3333;
  color: #6A0000;
}

.alert::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: text-top;
  background-image: url("../img/warning.svg");
  background-size: 16px 16px;
  background-repeat: no-repeat;
}

.alert-info::before {
  background-image: url("../img/information.svg");
}

.alert-success::before {
  background-image: url("../img/success.svg");
}

.alert-danger::before {
  background-image: url("../img/error.svg");
}
