/***
Stylesheet!
***/

:root {

    /* column widths */
  --widthSidebar: 200px;
	--widthContent: 800px;

	/* general page and text colours */
	--colorBackground: #193120;
	--colorText: #EDF7E0;
	--colorLink: #F8E8CC;

	/* accent colours */
	--colorPrimary: #05B3CF; 
	--colorSecondary: #84AC85;
	--colorTertiary: #fefae0;

	/* border and box shadow colours */ 
	--colorBorder: #9fb8b8;
	--colorShadow: #532612;

	/* background colour for the sections */
	--colorBackgroundMain: #163441;

	/* fonts */
	--fontText: 'FormaDJRText', djrtext;
	--fontTitle: 'FormaDJRVariableNormal', djrtitle;
	--fontNavi: 'ManifoldExtended', manifold;
	--fontQuote: 'InputSans', input;

	/* borders */
	--borderSolid: 1px solid #F8E8CC;
	--borderDotted: 1px dotted #F8E8CC;
	--borderTree: 1px solid #F8E8CC;

}


body {
    background-color:var(--colorBackground);
    color: var(--colorText);
    font-family: var(--fontText);
    font-size: 1.1em;
  }
    
center {
    text-align: center;
}
    
  /*Contains everything*/
  .wrapper {
    width: 1150px;
    background: var(--colorBackground); /*potentially change!!*/
    margin: 0 auto;
    top: 0;
    margin-top: 25px;
    /*border-left: 0px solid #12282f;
    border-right: 0px solid #12282f;  */
    margin-bottom: 25px;
    }
    
  /*Contains main and sidebar divs*/
  .wrapper-2 {
    position: relative;
  }
    
  /*Header and footer images*/
  .header, .footer {
    height: 100px;
    overflow: hidden;
    background-color: var(--colorBackground);
    background-size:cover;
    }
    
    
  .footer {
    height: 50px;
    color: var(--colorText);
    }
    
  .header img {
    border-top: 0px;
    }
    
    
  .title {
    padding: 15px 10px 10px 20px;
    font-family: var(--fontTitle);
    }
    
  .title h1, .title h2, .title h3 {
    padding:0;
    margin: 0;
    font-family: var(--fontTitle);
    }
  
  .nav {
    max-width: 710px;
    margin: 0 auto; 
    position: relative; 
  }

  .nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: var(--colorBackgroundMain);
    border: var(--borderSolid);
  }
  
  .nav li {
    position: relative;
  }
  
  .nav a {
    display: block;
    color: var(--colorText);
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-family: var(--fontNavi);
    font-size: 16px;
    text-transform: capitalize;
  }
  
  .nav a.active, .nav a:hover {
    background-color: var(--colorBorder);
  }
  
  .nav .dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: var(--colorBackgroundMain);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
  }
  
  .nav .dropdown-content li {
    float: none;
  }
  
  .nav .dropdown-content a {
    padding: 12px 16px;
    text-align: left;
  }
  
  .nav li.dropdown:hover > .dropdown-content {
    display: block;
  }
    
  /*Div style for individual links.*/
  .link {
    text-align: center;
    display: inline-block;
    list-style-type: none;
    float: none;
    font-weight: bold;
    font-size: 1.16em;
    padding: 5px;
    margin-right: 10px;
    margin-left: 10px;
    border: 0px solid red;
    }
    
  .link a {
    color: white;
    text-decoration: none;
    }
  
  .main, .sidebar-right {
    display: inline-block;
    }
    
  .sidebar-left, .sidebar-right {
    width: 200px;
    position: absolute;
    top: 0;
    }
  
  .sidebar-left {
    margin-left: -10px;
    margin-right: 25px;
    }


  .main {
    margin-left: 220px;
    width: 710px;
    }
    
  .sidebar-right {
    margin-right: 25px;
    margin-left: 25px;
    }
    
  .box {  
    box-sizing: border-box;
    padding: 16px;
    background:var(--colorBackgroundMain);
    color: var(--colorText);
    margin: 20px 0px 25px 0px;
    box-shadow: 0.5em 0.5em var(--colorBorder);
    }
    
  .box img {
    max-width: 100%;
    height: auto;
    }

  .box h1 {
      text-transform: capitalize;
      font-family: var(--fontTitle);
      padding: 0 1em;
      color: var(--colorBackground);
      background: var(--colorText);
      text-align: left;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }

    .box h2 {
        border-bottom: 1px solid var(--colorBorder);

    }

    .box a::after {
        content: '\21F2';
        padding: 4px;
        display: inline-block;
        transform: rotate(-90deg);
        vertical-align: super;
        font-style: normal;
        font-weight: bold;
        font-size: 0.7em;
        color: var(--colorTertiary);
    }


    .box p { 
        font-size: 17px;
    }

  .inner {

    }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--fontTitle);
        word-wrap: break-word;
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    p {
        font-family: var(--fontText);
        word-wrap: break-word;
    	  max-inline-size: 700px;
        font-size: 15px;

    }
    
    b {
        color: var(--colorSecondary);
    }
    
    a {
        color: var(--colorLink);
        word-wrap: break-word;
    }
    
    a:hover {
        color: var(--colorTertiary);
        background-color: var(--colorLink);

    }

    .half-width {
      display: flex;
      position: relative;
      flex-flow: row wrap;
      width: 100%;
      min-height: 300px;
      width: 710px;
    }
  
    .half-width .box {
      width: calc(50% - 2em);
      margin: 0 1em 2em 1em;
    }


      /* Add this under your existing .box styles */
  .update-log {
    max-height: 400px; /* Adjust this value as needed */
    overflow-y: auto;
    padding: 15px;
    margin: 20px 0;
    background: var(--colorBackgroundMain);
    border: var(--borderDotted);
  }

  .update-log h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: var(--colorText);
  }

  .update-entry {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--colorSecondary);
  }

  .update-date {
    font-size: 0.8em;
    color: var(--colorTertiary);
    margin-bottom: 5px;
    display: block;
  }

  .update-content {
    font-size: 0.9em;
    line-height: 1.4;
  }
    
    hr {
        border: 0;
        border-top: var(--borderDotted);
        margin: 1em 0;
        width: 100%;
    }

    .sidebar-logo {
      width: 200px;
      height: 150px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: -180px; 
      padding: 3px;
      position: left;
      margin-bottom: 20px;
    }
    
    .sidebar-logo img {
        max-width: 100%;
        height: auto;
        transition: opacity 0.3s ease;
        display: block;
        margin: 0 auto;
    }
  
    .sidebar-logo:hover img {
        opacity: 0.8;
        background-color: var(--colorBackground);
    }

    .half-width {
      display: flex;
      flex-flow: row wrap;
      width: 100%;
      min-height: 300px;
    }
    
    .half-width .box {
      width: calc(50% - 2em);
      margin: 0 1em 2em 1em;
    }
    
    .box.half-width pre {
      width: unset;
    }


    button, .button {
        font-family: var(--fontQuote);
        text-transform: lowercase;
        text-decoration: none;
        background-color: var(--colorBorder); /* Use green (#84AC85) */
        color: var(--colorBackgroundMain); /* Dark text (#163441) */
        padding: 8px 12px;
    }
    
    .small-btn {
        width: 90px;
        height: 40px;
    }
    
    button:hover, .button:hover {
        background-color: var(--colorBackgroundMain);
        color: var(--colorBorder);
    }
    
    blockquote {
        margin: 1.5em;
        padding-left: 1.5em;
        border-left: 1px solid var(--colorSecondary);
        font-family: var(--fontQuote);
    }
    
    pre, code {
        width: calc(var(--widthContent) - 200px);
        background: var(--colorTertiary);
        padding: 4px 8px;
        margin: 1em auto;
        max-height: 300px;
        overflow: scroll;
        }
    
    figure > figcaption:before {
        content: 'â†³ ';
    }
        
    figure > figcaption {
        font-size: 12px;
    }

    audio, video, iframe {
        display: block;
        margin: auto;
        border: var(--borderSolid);
        box-shadow: 0.3em 0.3em var(--colorShadow);
    }
    
    details > summary {
        padding: 0.2em 0;
        margin: 0 2em;
        border-bottom: 1px solid var(--colorTertiary);
        cursor: pointer;
    }
        

    .arrow-list > li {
        padding: 0.2em 0;
        border-bottom: 1px solid var(--colorTertiary);
        list-style-position: outside;
        list-style-type: '→ '; /* for Safari/iOS/whatever other browser that hates ::marker */
    }
    
     .arrow-list > li::marker {
        content: '→ ';
        font-family: sans-serif;
    }

    .todo-list li {
        padding: 0.2em 0;
        border-bottom: 1px solid var(--colorTertiary);
        list-style-position: outside;
        list-style-type: '☐ '; /* for Safari/iOS/whatever other browser that hates ::marker */
    }
    
    .todo-list > li::marker {
        content: '☐ ';
        font-family: sans-serif;
    }
    
    .todo-list > .task-done {
        color: var(--colorTertiary);
        text-decoration: line-through;
        list-style-position: outside;
        list-style-type: '☒ '; /* for Safari/iOS/whatever other browser that hates ::marker */
    }
    
    .todo-list > .task-done::marker {
        content: '☒  ';
        font-family: sans-serif;
    }


    /* Blog List Styles */
    .blog-list {
      display: grid;
      gap: 1.5rem;
    }

    .blog-post {
      display: grid;
      grid-template-columns: 150px 1fr auto;
      gap: 2rem;
      align-items: start;
      padding: 1.5rem;
      background: var(--colorBackgroundMain);
      border: var(--borderDotted);
    }

    .post-image img {
      width: 100%;
      height: auto;
      aspect-ratio: 1;
      object-fit: cover;
      border: var(--borderDotted);
    }

    .post-content h3 {
      margin: 0 0 0.5rem 0;
      font-family: var(--fontTitle);
    }

    .post-content h3 a {
      text-decoration: none;
      color: var(--colorLink);
    }

    .post-content h3 a:hover {
      color: var(--colorSecondary);
      background-color: transparent;
    }

    .post-date {
      font-family: var(--fontQuote);
      color: var(--colorSecondary);
      text-align: right;
    }



  /* For narrow screens. Makes the sidebars narrower, and makes width of the 
   * center/main div 50% of the viewport width.
   */
  @media(max-width:1180px) {
    .wrapper {
      width: calc(440px + 50vw);
      }
    .main {
      width: 50vw;
      }
      .sidebar-logo {
        position: static;
        width: 100%;
        text-align: center;
        margin: 20px 0;
        order: -1; /* Move above everything on mobile */
      }
    
    .sidebar-logo img {
        max-width: 200px; /* Adjust based on your logo size */
      }

      .blog-post {
        grid-template-columns: 1fr;
      }
      
      .post-image {
        max-width: 200px;
        margin: 0 auto;
      }
      
      .post-date {
        text-align: center;
      }

      .half-width .box {
        width: 100%;
      }

      .sidebar-logo {
        position: static;
        transform: none;
        left: auto;
        margin: 20px auto;
        width: 100%;
      }
    
    }
    

  @media(max-width:910px) {
    .wrapper {
      width: calc(360px + 52vw);
      }
    .sidebar-left, .sidebar-right {
      width: 160px;
      }
    .main {
      margin-left: 180px;
      width: 52vw;
      }
      .sidebar-logo {
        position: static;
        width: 100%;
        text-align: center;
        margin: 20px 0;
        order: -1; /* Move above everything on mobile */
      }
    
      .sidebar-logo img {
        max-width: 200px; /* Adjust based on your logo size */
      }

      .blog-post {
        grid-template-columns: 1fr;
      }
      
      .post-image {
        max-width: 200px;
        margin: 0 auto;
      }
      
      .post-date {
        text-align: center;
      }

      .half-width .box {
        width: 100%;
      }
    }
    
  /* Mobile compatibility. Puts everything into a standard vertical layout. */
  @media(orientation:portrait) {
    .box h1{
      padding: 0 0.5em;
      font-size: 1.5em;
    }
    .wrapper {
      width: 96vw;
      margin: 0 auto;
      padding:0;
      position: relative;
      }
    .wrapper-2 {
      width: 94vw;
      margin: 0 auto;
      padding:0;
      position: relative;
      }
    .sidebar-left, .main, .sidebar-right {
      position: relative;
      width: 92vw;
      margin: 0.25rem 1vw;
      }
    .sidebar-left, .sidebar-right {
      font-size: 0.95em;
      }

    .sidebar-logo {
        top: -120px;
        padding: 10px;
    }
      
      .blog-post {
        padding: 1rem;
      }
      
      .post-content h3 {
        font-size: 1.1rem;
      }

      .half-width .box {
        width: 100%;
      }
      .nav {
        margin-top: 60px;
      }
    }

    /*fonts*/

    @font-face {
        src: url('fonts/FormaDJRVariableNormal[opsz,slnt,wght]-Edu.woff2') format("woff2"),
            url('fonts/FormaDJRVariableNormal[opsz,slnt,wght]-Edu.woff') format("woff");
        font-family: 'FormaDJRVariableNormal';
        font-style: normal;
        font-weight: normal;
    }

    @font-face {
        src: url('fonts/FormaDJRText-Regular-Edu.woff2') format("woff2"),
            url('fonts/FormaDJRText-Regular-Edu.woff') format("woff");
        font-family: 'FormaDJRText';
        font-style: normal;
        font-weight: normal;
    }
    
    @font-face {
        src: url('fonts/FormaDJRText-Italic-Edu.woff2') format("woff2"),
            url('fonts/FormaDJRText-Italic-Edu.woff') format("woff");
        font-family: 'FormaDJRText';
        font-style: italic;
        font-weight: normal;
    }

    @font-face {
        src: url('fonts/FormaDJRText-Bold-Edu.woff2') format("woff2"),
            url('fonts/FormaDJRText-Bold-Edu.woff') format("woff");
        font-family: 'FormaDJRText';
        font-style: normal;
        font-weight: bold;
    }

    @font-face {
    src: url('fonts/FormaDJRText-ExtraBoldItalic-Edu.woff2') format("woff2"),
        url('fonts/FormaDJRText-ExtraBoldItalic-Edu.woff') format("woff");
    font-family: 'FormaDJRText';
    font-style: italic;
    font-weight: 800;
    }

    @font-face {
        src: url('fonts/ManifoldExtendedCF-Bold.ttf') format("truetype");
        font-family: 'ManifoldExtended';
        font-style: bold;
        font-weight: 800;
    }

    @font-face {
        src: url('fonts/input/InputSans-Regular.ttf') format("truetype");
        font-family: 'InputSans';
        font-style: bold;
        font-weight: 800;
    }