/* ==========================================================================
   pragmata.blog — Global Stylesheet
   ==========================================================================

   Sections:
   01. Reset & Base
   02. Layout — Top Bar
   03. Layout — Bottom Bar
   04. Layout — Navigation (Desktop)
   05. Layout — Content Area
   06. Components — Cursor
   07. Components — Tags
   08. Components — Reference Card
   09. Components — Quote Block
   10. Components — Changelog
   11. Components — Acknowledge
   12. Components — Portfolio
   13. Components — Support Links
   14. Typography & Prose
   15. Mobile Header & Nav Overlay
   16. Responsive — max-width: 768px
   17. Responsive — max-width: 600px
   ========================================================================== */


/* ==========================================================================
   01. Reset & Base
   ========================================================================== */

@font-face {
  font-family: 'Share Tech Mono';
  src: url('/fonts/ShareTechMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: 'Share Tech Mono', monospace;
  display: flex;
  height: 100vh;
  background-color: #000;
  color: #f0f0f0;
  padding-top: 80px;
  padding-bottom: 40px;
  overflow: hidden;
}

a {
  color: #00FF00;
  text-decoration: none;
}

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

h2 {
  margin-bottom: 10px;
  color: #fff;
}

p, li {
  color: #ccc;
}

p {
  margin-bottom: 1em;
  line-height: 1.5;
}

ul {
  list-style: disc;
  padding-left: 0;
  line-height: 1.6;
}

li {
  margin-bottom: 8px;
}

pre {
  background-color: #212121;
  color: #eee;
  padding: 10px;
  overflow-x: auto;
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9em;
  line-height: 1.4;
  margin-bottom: 1em;
}

code {
  font-family: 'Share Tech Mono', monospace;
}


/* ==========================================================================
   02. Layout — Top Bar
   ========================================================================== */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background-color: #0a0a0a;
  border-bottom: 1.5px solid #222;
  display: flex;
  align-items: center;
  justify-content: left;
  z-index: 1000;
  margin-left: 0px
}

.top-bar-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2em;
  color: #555;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-left: 85px
}


/* ==========================================================================
   03. Layout — Bottom Bar
   ========================================================================== */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #111;
  padding: 8px 12px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  z-index: 1000;
  border-top: 1.5px solid #444;
}

.bottom-bar a img {
  height: 19px;
  transition: transform 0.2s ease;
  filter: contrast(0.88);
}

.bottom-bar a:first-child {
  position: absolute;
  left: 12px;
}

.bottom-bar a:hover img {
  transform: scale(1.15);
}

.bottom-bar-icon {
  color: #9a9a9a;
  font-size: 20px;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
}

.bottom-bar-icon img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(63%) sepia(0%) saturate(0%) hue-rotate(0deg);
}

.bottom-bar-icon:hover {
  color: #fff;
  transform: scale(1.2);
  text-decoration: none !important;
}

.bottom-bar-divider {
  color: #444;
  font-size: 18px;
  user-select: none;
  margin: 0;
}

.glider-img {
  height: 24px;
}


/* ==========================================================================
   04. Layout — Navigation (Desktop)
   ========================================================================== */

.section {
  padding: 20px;
  border-right: 1px solid #222;
}

.nav {
  width: 25%;
  background-color: #000;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-inner {
  margin: 0 auto;
  min-width: 175px;
}

.nav-inner h2 {
  margin-bottom: 6px;
}

.nav a {
  display: block;
  color: #aaa;
  padding: 8px 5px 8px 32px;
  font-size: 1.05em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.submenu a:hover {
  color: #fff;
  transform: scale(1.02);
}

.nav .submenu a,
.nav .nested-submenu a {
  padding-left: 10px;
  font-size: 0.95em;
  width: 150px;
}

.submenu,
.nested-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease;
  margin-left: 15px;
  padding-left: 10px;
  border-left: 1px solid #222;
  width: 100%;
  box-sizing: border-box;
}

.submenu.open,
.nested-submenu.open {
  max-height: 1000px;
}

.nav-inner .submenu,
.nav-inner .nested-submenu {
  margin-left: 40px;
  width: 100%;
}

.nav-inner .submenu-year {
  width: 100%;
}

.submenu a {
  padding: 8px 10px;
  font-size: 0.9em;
  color: #777;
}

.submenu a:hover {
  color: #fff;
}

.submenu-year > a {
  cursor: pointer;
  color: #777;
  display: block;
  padding: 6px 10px;
  font-weight: bold;
  user-select: none;
}

.submenu-year > a:hover {
  color: #fff;
  transform: scale(1.02);
}


/* ==========================================================================
   05. Layout — Content Area
   ========================================================================== */

.content {
  width: 75%;
  padding: 20px;
  background-color: #000;
  height: calc(100% - 1px);
  overflow-y: auto;
  box-sizing: border-box;
}

#content-area {
  opacity: 1;
  transition: opacity 0.5s ease;
}

#content-area.fade-out {
  opacity: 0;
}

.post-content {
  padding-left: 20px;
  padding-right: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

main {
  max-width: 700px;
  margin: auto;
}

header h2 {
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}


/* ==========================================================================
   06. Components — Cursor
   ========================================================================== */

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background-color: currentColor;
  margin-left: 0;
  vertical-align: middle;
  animation: blink 1.7s steps(2, start) infinite;
}

@keyframes blink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}


/* ==========================================================================
   07. Components — Tags
   ========================================================================== */

.tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-left: 6px;
  margin-right: 6px;
  margin-top: 3px;
  margin-bottom: 4px;
  vertical-align: middle;
  opacity: 1.0;
  color: #fff;
}


/* ==========================================================================
   08. Components — Reference Card
   ========================================================================== */

.reference-card {
  border: 1px solid #222;
  border-left: 3px solid #00FF00;
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
  background-color: #0a0a0a;
}

.ref-date {
  font-size: 0.8em;
  opacity: 0.6;
}

.ref-links {
  margin-top: 0.75rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9em;
}


/* ==========================================================================
   09. Components — Quote Block
   ========================================================================== */

.post-content .quote-block {
  max-width: 550px;
  margin: 2.5rem auto;
  padding: 1.2rem 1.4rem;
  border-left: 2px solid #222;
  background: rgba(255,255,255,0.02);
}

.quote {
  font-size: 1rem;
  line-height: 1.7;
  color: #e6e6e6;
  margin: 1.2rem 0;
  letter-spacing: 0.2px;
  word-wrap: break-word;
}


/* ==========================================================================
   10. Components — Changelog
   ========================================================================== */

.changelog-entry {
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 3px solid;
}

.changelog-date {
  font-weight: bold;
}

.changelog-version {
  margin: 0.3rem 0 0.7rem 0;
}

.changelog-description {
  margin: 0 0 0.3rem 0;
}


/* ==========================================================================
   11. Components — Acknowledge
   ========================================================================== */

.ack-entry {
  border: 1px solid #555;
  padding: 12px 14px;
  font-size: 0.9em;
  margin-top: 1rem;
}

.ack-name {
  display: inline-block;
  width: 250px;
  vertical-align: top;
}


/* ==========================================================================
   12. Components — Portfolio
   ========================================================================== */

.hidden {
  display: none;
}

progressbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 10px;
  background-color: #4caf50;
  z-index: 99;
  max-width: 400px;
}

.section-header {
  margin-top: 50px;
  margin-bottom: 20px;
}

.project-link {
  color: #777;
  font-size: 18px;
  transition: color 0.8s ease, transform 0.8s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-link:hover {
  color: #fff;
  transform: scale(1.15);
}

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

.project-list li {
  margin: 40px 0;
}

.project-list li:first-child {
  margin-top: 20px;
}

.icon-link {
  color: #777;
  font-size: 40px !important;
  transition: color 0.5s ease, font-size 0.5s ease;
}

.icon-link:hover {
  color: #fff !important;
  font-size: 50px !important;
}

#icon-container {
  display: none;
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 100;
}

.exp-text {
  text-align: justify;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 80px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  flex-basis: calc(20% - 15px);
}

.abilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 10px;
  justify-items: center;
  align-items: center;
  margin-bottom: 60px;
}

.skill-icon {
  font-size: 25px;
  margin-right: 20px;
  color: #fff;
}

.skill-list {
  list-style-type: none;
  padding: 0;
  margin-bottom: 80px;
}

.skill-list li {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  width: 100%;
}

.skill-list li::before {
  color: #7A7C80;
  margin-right: 20px;
}

.skill-list li .skill-icon {
  margin-right: 0;
  width: 20px;
  text-align: center;
}

.skill-list li .skill-name {
  margin-right: 20px;
  margin-left: 12px;
  width: 80px;
}

.skill-list li .progress-bar {
  flex-grow: 1;
  height: 10px;
  background-color: #7A7C80;
}

.skill-list li .progress {
  height: 100%;
  background-color: #fff;
  width: 80%;
}

.role {
  font-size: 0.7em;
}

.special-item {
  display: block !important;
}

#experience ul {
  list-style: none;
  padding-left: 0;
}

#experience li {
  text-align: left;
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 20px;
}

#experience li::before {
  content: "\2022";
  color: white;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
}

.certificate-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.certificate-item {
  flex: 1 1 370px;
  display: flex;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ==========================================================================
   13. Components — Support Links
   ========================================================================== */

.support-item .badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badges a img {
  height: 22px;
  transition: transform 0.2s ease;
}

.badges a:hover img {
  transform: scale(1.15);
}


/* ==========================================================================
   14. Typography & Prose (shared overrides)
   ========================================================================== */

/* Changelog & TIL reuse the base ul/li from section 01.
   No additional rules needed here unless overrides arise. */


/* ==========================================================================
   14. Mobile Header & Nav Overlay
   ========================================================================== */

.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #222;
  background-color: #000;
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
}

.mobile-header-title {
  font-size: 1.5em;
  color: #555;
  letter-spacing: 2px;
  text-transform: uppercase;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: 7px
}

.hamburger {
  background: none;
  border: 1px solid #555;
  color: #aaa;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85em;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
}

.hamburger:hover {
  color: #fff;
  border-color: #fff;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.95);
  z-index: 500;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 60px;
}

.mobile-nav-overlay.open {
  display: block;
}

.mobile-nav-overlay a {
  display: flex;
  flex-direction: column;
  color: #aaa;
  padding: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-nav-overlay a:hover {
  color: #fff;
  transform: scale(1.02);
}

.mobile-nav-close {
  background: none;
  border: 1px solid #555;
  color: #aaa;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85em;
  padding: 4px 10px;
  cursor: pointer;
  display: block;
  margin: 0 0 20px auto;
  transition: color 0.2s, border-color 0.2s;
  min-width: 120px;
}

.mobile-nav-close:hover {
  color: #fff;
  border-color: #fff;
}


/* ==========================================================================
   15. Responsive — max-width: 768px
   ========================================================================== */

@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 50px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .nav {
    height: auto;
    overflow-y: visible;
  }

  .top-bar {
    display: none;
  }

  .section.nav {
    display: none;
  }

  .section.content {
    width: 100%;
    height: auto;
    border-right: none;
    overflow-y: visible;
    padding: 16px;
  }

  .support-item {
    display: block;
    grid-template-columns: minmax(0, max-content) auto;
    gap: 20px;
    align-items: center;
  }

  .support-item .badges a {
    margin-left: 10px;
  }

  #content-area {
    overflow-y: visible;
  }

  .post-content {
    padding-left: 8px;
    padding-right: 8px;
  }

  .mobile-header {
    display: flex;
  }

  .bottom-bar {
    gap: 8px;
    padding: 8px 6px;
    flex-wrap: wrap;
    height: auto;
    min-height: 40px;
  }

  .quote {
    font-size: 1.1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   16. Responsive — max-width: 600px
   ========================================================================== */

@media (max-width: 600px) {
  .support-item {
    grid-template-columns: 1fr;
  }

  .support-item .badges {
    margin-top: 7px;
  }

  .quote-block:hover .quote {
    color: #ffffff;
    transition: color 0.3s ease;
  }

  .ref-date {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-bottom: 2rem;
  }

  .section-1 {
    padding: 20px;
    padding-top: 5rem;
    width: 100%;
    box-sizing: border-box;
  }
}