@font-face{
    font-family: "Inter";
    src: url("Inter-VariableFont_slnt,wght.ttf");
}

:root{
    --color-bg: #fdfaf7;
    --color-surface: #ffffff;
    --color-text: #201a17;
    --color-text-muted: #6b6058;
    --color-border: #ece3da;
    --color-accent: #ff3e1f;
    --color-accent-contrast: #ffffff;
    --color-accent-soft: #fff1ed;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(30, 20, 10, 0.08);
    --shadow-md: 0 10px 30px rgba(30, 20, 10, 0.10);
    --font-sans: "Inter", sans-serif, arial;
    --container-max: 1180px;
    --header-bg: rgba(253, 250, 247, 0.82);
}

:root[data-theme="dark"]{
    --color-bg: #17130f;
    --color-surface: #221c17;
    --color-text: #f2ece5;
    --color-text-muted: #b3a89b;
    --color-border: #362c23;
    --color-accent: #ff6a4a;
    --color-accent-contrast: #17130f;
    --color-accent-soft: #3a231a;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --header-bg: rgba(23, 19, 15, 0.82);
}

@media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
        --color-bg: #17130f;
        --color-surface: #221c17;
        --color-text: #f2ece5;
        --color-text-muted: #b3a89b;
        --color-border: #362c23;
        --color-accent: #ff6a4a;
        --color-accent-contrast: #17130f;
        --color-accent-soft: #3a231a;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
        --header-bg: rgba(23, 19, 15, 0.82);
    }
}

*{
    box-sizing: border-box;
}

html{
    width: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body{
    margin: 0 auto;
    max-width: var(--container-max);
    padding: 0 clamp(16px, 4vw, 48px) 40px;
    padding-top: 0;
    font-size: 17px;
    line-height: 1.65;
    transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3{
    line-height: 1.25;
}

article h1{
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
}

a{
    color: var(--color-accent);
}

a:hover{
    color: var(--color-accent);
    opacity: 0.75;
}

header{
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 calc(-1 * clamp(16px, 4vw, 48px));
    padding: 14px clamp(16px, 4vw, 48px);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

header h1{
    font-size: 1.4rem;
    margin: 0;
}

header h1 a{
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.header-controls{
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-nav ul li{
    list-style: none;
}

article li{
    list-style: disc;
}

article ul{
    margin-bottom: 40px;
}

.top-nav{
    margin: 0;
}

.top-nav ul{
    display: flex;
    flex-direction: row;
    justify-content: start;
    gap: 22px;
    padding-left: 0px;
    margin: 0;
}

.top-nav a{
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.top-nav a:hover{
    color: var(--color-text);
    opacity: 1;
}

.active a, a.active{
    color: var(--color-text) !important;
    border-bottom-color: var(--color-accent) !important;
}

.theme-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
}

.theme-toggle:hover{
    border-color: var(--color-accent);
}

.theme-toggle svg{
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-moon{ display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun{ display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon{ display: inline-block; }
@media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]) .theme-toggle .icon-sun{ display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon{ display: inline-block; }
}

.postTitle{
    text-decoration: none;
    font-size: 1.25rem;
    color: var(--color-text);
    font-weight: 700;
}

.postTitle:hover{
    color: var(--color-accent);
    opacity: 1;
}

.postheader{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
}

.postheader h2{
    margin-bottom: 0px;
    margin-top: 0px;
}

.postheader h2 a{
    color: var(--color-text);
}

.postheader p{
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.separatorline{
    display: none;
}

aside{
    width: 300px;
    flex-shrink: 0;
}

aside h3{
    padding-left: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

aside ul{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
    margin: 0 0 28px 0;
}

aside ul li{
    line-height: 1.5;
    list-style: none;
}

aside ul li a{
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.85rem;
}

aside ul li a:hover{
    border-color: var(--color-accent);
    color: var(--color-accent);
    opacity: 1;
}

aside a:visited{
    color: var(--color-text);
}

aside a:visited:hover{
    color: var(--color-accent);
}

#content{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    min-height: calc(100vh - 260px);
    padding-top: 28px;
}

#content section{
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-feed{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-feed > article{
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px clamp(20px, 3vw, 36px);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-feed > article:hover{
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

footer{
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
}

footer .footer-col h4{
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

footer .footer-col p{
    color: var(--color-text-muted);
    max-width: 32ch;
    margin: 0;
}

footer .footer-col ul{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

footer .footer-col a{
    color: var(--color-text-muted);
    text-decoration: none;
}

footer .footer-col a:hover{
    color: var(--color-accent);
    opacity: 1;
}

footer .footer-col button.linklike{
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    text-align: left;
}

footer .footer-col button.linklike:hover{
    color: var(--color-accent);
}

footer .footer-bottom{
    width: 100%;
    padding-top: 20px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

footer img{
    vertical-align: middle;
    width: 20px;
}

.pagination{
    margin: 20px auto 0;
    width: 100%;
    max-width: 400px;
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding-left: 0px;
}

.pagination li{
    width: 20px;
    height: 20px;
    text-align: center;
    margin-top: 10px;
}

.single{
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px clamp(20px, 4vw, 48px);
}

.single ul{
    margin-bottom: 40px;
}

.shareemail{
    text-align: left;
    height: 40px;
}

.shareemail a{
    text-decoration: none;
}

.envelope{
    width: 15px;
}

.singlepagepaginatinor{
    display: flex;
    flex-direction: row;
    gap: 20px;
}


#coursesthumbnails{
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 24px;
}

.coursepost{
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.coursepost:hover{
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.coursepost h2{
    margin: 0;
    font-size: 1rem;
    order: 2;
}

.recipethumbnail{
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-sm);
    order: 1;
}

.searchresults{
    position: absolute;
    top: 70px;
    width: min(900px, 90vw);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 24px 32px 32px;
    z-index: 30;
}

.searchresults ul li{
    margin: 10px;
}

#searchresultsheader{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#searchresultsheader button{
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    width: 26px;
    height: 26px;
    color: var(--color-accent);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#searchresultsheader button:hover{
    color: var(--color-accent-contrast);
    background: var(--color-accent);
    border-color: var(--color-accent);
}

form{
    display: flex;
    flex-direction: row;
    padding-left: 0;
    gap: 6px;
}

#searchbox{
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--color-text);
    font-family: inherit;
}

form button{
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
}

form button:hover{
    color: var(--color-accent-contrast);
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
}

input:focus-visible, button:focus-visible, a:focus-visible{
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media only screen and (min-width: 800px) and (max-width: 1599px) {
  article img{
      display: block;
      max-width: 100%;
  }
  aside{
      width: 250px;
  }
  #coursesthumbnails{
      grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 799px) {
      article img{
      display: block;
      max-width: 100%;
      }

      header{
          flex-direction: column;
          align-items: flex-start;
      }

      aside{
          width: 100%;
      }

      #content{
          flex-direction: column;
          gap: 24px;
      }
      #content section{
          width: 100%;
      }
      .single{
          width: 100%
      }
      .shareemail img{
          display: inline;
      }
      #tags{
          display: flex;
          flex-direction: row;
          flex-wrap: wrap;
          gap: 5px;
      }
      #searchbox{
          font-size: 16px;
          flex: 1;
      }
      #coursesthumbnails{
          grid-template-columns: repeat(2, 1fr);
      }
      .searchresults{
          width: 95%;
          position: fixed;
          top: 20px;
          padding: 16px;
      }
      #searchresultsheader{
          padding: 5px 0;
      }
      footer{
          flex-direction: column;
          gap: 24px;
      }
}
