:root {
  /* A fun palette I chose */
  --midnight-shell: #1d1d1b;
  --graphite-ash: #3d3d3d;
  --rose-ash: #402526;
  --rosewood: #94484d;
  --rose-coral: #812f30;
  --blood-rose: #260c09;
  --bone-dust: #eae3de;
  --misted-petal: #dfc8c5;
  --crimson-coffee: #2b1e21;
  --barky-color: #5e3932;

  /* Theme variables */
  --primary-font: 'Filson Pro', 'Overpass Nerd Font', sans-serif;
  --bg-color: #ffffff;
  --text-color: var(--graphite-ash);
  --heading-color: var(--midnight-shell);
  --accent-color: var(--rosewood);
  --accent-hover: var(--barky-color);
  --border-color: var(--misted-petal);
  --subtle-bg: var(--bone-dust);
}

/* Code/Terminal Theme - Pycharm colors */
body.code-theme {
  --primary-font: 'Overpass Nerd Font', monospace;
  --bg-color: #1e1e1e;
  --text-color: #BCBEC4;
  --heading-color: #56A8F5;
  --accent-color: #CF8E6D;
  --accent-hover: #B3AE60;
  --border-color: #7A7E85;
  --subtle-bg: #2d2d2d;
  --string-color: #6AAB73;
  --comment-color: #7A7E85;
  --keyword-color: #CF8E6D;
  --function-color: #56A8F5;
  --decorator-color: #B3AE60;
  --number-color: #2AACB8;
  --parameter-color: #94558D;
  --paren-color: #E1BC51;
}

@font-face {
    font-family: 'Overpass Nerd Font';
    src: url('fonts/OverpassNerdFont-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass Nerd Font';
    src: url('fonts/OverpassNerdFont-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass Nerd Font';
    src: url('fonts/OverpassNerdFont-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Overpass Nerd Font';
    src: url('fonts/OverpassNerdFont-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Filson Pro';
    src: url('fonts/filsonpro-regular-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Filson Pro';
    src: url('fonts/filsonpro-bold-webfont.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

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

body {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-weight: 700;
    font-size: 35pt;
    color: var(--heading-color);
    letter-spacing: -0.5px;
}

h2 {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-weight: 700;
    font-size: 22pt;
    color: var(--heading-color);
    margin-top: 33px;
    margin-bottom: 17px;
}

h3 {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-weight: 700;
    font-size: 17pt;
    color: var(--heading-color);
    margin-bottom: 11px;
}

p {
    margin-bottom: 22px;
    font-size: 13pt;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all .1s ease-in-out;
    border-radius: 0;
}

a:hover {
    color: var(--accent-hover);
    transform: scale(1.02);
    font-weight: bold;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Navigation */
.navbar {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 62px;
    position: relative;
}

.navbar-logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 70px;
    width: 70px;
    transition: filter 0.3s ease;
}

body.code-theme .navbar-logo-center {
    filter: invert(1);
}

.navbar-brand {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    color: var(--heading-color);
}

.brand-first {
    font-weight: 700;
    font-size: 20pt;
    letter-spacing: -0.8px;
    margin-right: 6px;
}

.brand-last {
    font-weight: 400;
    font-size: 20pt;
    letter-spacing: 1px;
    color: var(--text-color);
}

.nav {
    display: flex;
    gap: 2rem;
    font-size: 12pt;
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-weight: 400;
    margin: 0;
}

.nav-link {
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.2s;
    padding: 9px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
    background: none;
}

.nav-link.current {
    color: var(--heading-color);
}

.nav-link.current::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 2.5rem;
}

.theme-toggle i {
    color: var(--rosewood);
}

.theme-toggle:hover i {
    color: var(--barky-color);
    transform: scale(1.1);
}

/* Layout */
.layout {
    padding-top: 88px;
    min-height: 100vh;
}

.main {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    margin-bottom: 55px;
}

.main_text {
    margin: 0 auto;
    padding: 0 5px;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Home Section */
#home {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.home-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.home-text {
    flex: 1;
    min-width: 330px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.contact-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.contact-links a {
    flex: 1 0 33%;
    text-align: center;
}

.profile-image {
    flex-shrink: 0;
    width: 13.75rem;
    height: 13.75rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--rose-coral);
}

.home-block {
    margin-bottom: 28px;
}

.subtitle {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-size: 12pt;
    font-weight: 600;
    color: var(--rosewood);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.subtitle::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 95%;
    height: 1px;
    background: var(--rosewood);
    opacity: 0.6;
}

/*.contact-info a {*/
/*    margin-right: 17px;*/
/*    font-weight: 600;*/
/*    font-size: 12pt;*/
/*    text-transform: uppercase;*/
/*    letter-spacing: 1px;*/
/*}*/

/* Section Headings */
.section-heading {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-size: 16pt;
    font-weight: 600;
    color: var(--rosewood);
    margin-bottom: 33px;
    padding-bottom: 11px;
    padding-left: 5px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: left;
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5px;
    right: 5px;
    height: 1px;
    background: var(--rosewood);
    border-radius: 2px;
}

/* Projects Section */
#projects {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects {
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--misted-petal);
}

.projects:last-child {
    border-bottom: none;
}

.entry {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    transition: all 0.15s ease;
    border-radius: 6px;
    padding: 1rem;
    margin: -1rem;
    position: relative;
}

.entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    position: relative;
}

.entry-image {
    position: absolute;
    right: -280px;
    top: 0;
    width: auto;
    max-width: 250px;
    max-height: 250px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.entry-image.left {
    right: auto;
    left: -280px;
}

.entry-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.github-link {
    position: absolute;
    bottom: 1rem;
    right: -4rem;
    font-size: 2.5rem;
    color: var(--accent-color);
    transition: all 0.2s ease;
}

.github-link:hover {
    color: var(--accent-hover);
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Hover effect only for entries with links */
.entry[data-link]:not([data-link=""]) {
    cursor: pointer;
}

.entry[data-link]:not([data-link=""]):hover {
    transform: scale(1.01);
    background-color: var(--subtle-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.title {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-size: 15pt;
    font-weight: 700;
    color: var(--midnight-shell);
}

.metadata {
    font-size: 11pt;
    color: var(--barky-color);
    font-weight: 300;
}

.metadata-date {
    font-size: 10pt;
    color: var(--barky-color);
    margin-bottom: 5px;
}

.text {
    font-size: 13pt;
    margin-top: 1rem;
    line-height: 1.7;
}

.text a {
    font-weight: 600;
}

/* Articles Section */
#articles {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.articles {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--misted-petal);
}

.articles:last-child {
    border-bottom: none;
}

/* Info Section */
#info {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-legend {
    font-size: 10pt;
    color: var(--barky-color);
    font-style: italic;
    margin-bottom: 20px;
}

.info-item {
    margin-bottom: 10px;
    font-size: 12pt;
}

/* Resources Section */
#resources {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.resources-intro {
    margin-bottom: 2rem;
    color: var(--graphite-ash);
}

.resource-category {
    margin-bottom: 2.5rem;
}

/* Title Bar */
.resource-category-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid var(--misted-petal);
    transition: border-color 0.2s ease;
}

.resource-category-header:hover {
    border-bottom-color: var(--rosewood);
}

.resource-category-icon {
    font-size: 16pt;
    margin-right: 0.8rem;
}

.resource-category-title {
    flex: 1;
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-size: 15pt;
    font-weight: 700;
    color: var(--midnight-shell);
    margin: 0;
}

.resource-category-toggle {
    font-size: 10pt;
    color: var(--rosewood);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.resource-category.open .resource-category-toggle {
    transform: rotate(180deg);
}

/* Content Group */
.resource-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.resource-category.open .resource-category-content {
    max-height: 2000px;
}

.resource-category-description {
    font-size: 11pt;
    color: var(--barky-color);
    margin: 1rem 0 1.5rem 0;
    font-style: italic;
}

.resource-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.resource-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.resource-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--rosewood);
    font-weight: bold;
    font-size: 14pt;
}

.link {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', 'sans-serif';
    font-size: 12pt;
    font-weight: 600;
    color: var(--rosewood);
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
}

.link:hover {
    color: var(--barky-color);
}

.resource-description {
    font-size: 11pt;
    color: var(--graphite-ash);
    display: block;
    line-height: 1.6;
}

/* Utilities */
strong {
    font-family: var(--primary-font), 'Filson Pro', 'Overpass Nerd Font', sans-serif;
    font-weight: 700;
}

ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
    line-height: 1.7;
}


/* Medium screen styles */
@media (max-width: 950px) {
    .home-content {
        flex-direction: column;
    }

    .contact-info {
        width: 100%;
        align-items: center;
    }

    .profile-image {
        width: 17rem;
        height: 17rem;
    }

    .theme-toggle {
        font-size: 3rem;
    }
}

/* Tablet styles */
@media (max-width: 768px) {
    .profile-image {
        width: 10.3rem;
        height: 10.3rem;
    }
    
    h1 {
        font-size: 26pt;
    }
    
    .nav {
        font-size: 11pt;
    }
    
    .navbar-logo-center {
        display: none;
    }
    
    .container {
        padding: 0 22px;
    }
    
    .navbar-content {
        padding: 0 22px;
    }
    
    .main_text {
        padding: 0 20px;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .nav {
        gap: 1.1rem;
        font-size: 10pt;
    }
    
    h1 {
        font-size: 22pt;
    }
    
    h2 {
        font-size: 15pt;
    }
    
    .brand-first,
    .brand-last {
        font-size: 15pt;
    }
    
    .container {
        padding: 0 22px;
    }
    
    .navbar-content {
        padding: 0 22px;
    }
    
    .main_text {
        padding: 0 22px;
    }
}

/* Code Theme General */
body.code-theme .code-section {
    background: var(--subtle-bg);
    padding: 0 .5rem .5rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Section headings as comments if not overwritten by code heading */
body.code-theme .section-heading {
    color: var(--comment-color);
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
}

body.code-theme .section-heading::before {
    content: '# ';
}

body.code-theme .section-heading::after {
    background: none;
}

body.code-theme .code-heading::before {
    content: 'class ';
    color: var(--keyword-color);
    font-weight: 600;
}
body.code-theme .code-heading::after {
    content: ':';
    color: var(--text-color);
    background: none;
    position: static;
    height: auto;
}
body.code-theme .code-heading {
    color: var(--function-color);
    padding: 0;
    margin-bottom: .5rem;
    margin-left: -.5rem;
}

/* idtin */
body.code-theme .entry {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

body.code-theme .entry:last-child {
    border-bottom: none;
}

/* hide stuff from normal view */
.method-params {
    display: none;
}
.return {
    display: none;
}

/* methods */
body.code-theme .title {
    color: var(--function-color);
    text-transform: none;
    padding-left: 2rem;
}
body.code-theme .title::before {
    content: 'def ';
    color: var(--keyword-color);
    font-weight: 600;
}
body.code-theme .method-params {
    display: inline;
}

body.code-theme .paren {
    color: var(--paren-color);
}

body.code-theme .param-self {
    color: var(--parameter-color);
}

body.code-theme .colon {
    color: var(--text-color);
}

/* handle body text */
body.code-theme .text {
    color: var(--comment-color);
    padding-left: 4rem;
    font-style: italic;
}

body.code-theme .text::before {
    content: '# ';
    color: var(--comment-color);
}

/* return statement */
body.code-theme .return {
    display: block;
    padding-left: 4rem;
    margin-top: 0.5rem;
}

body.code-theme .return-keyword {
    color: var(--keyword-color);
    font-weight: 600;
}

body.code-theme .return-value {
    color: var(--string-color);
}

/* specific stuff rip */
.meta-separator {
    margin: 0 0.5rem;
    font-size: 0.5rem;
    color: var(--barky-color);
    position: relative;
    top: -2px;
}

/* Hide tech and separator in code theme, only show date as docstring */
body.code-theme .meta-separator,
body.code-theme .meta-tech {
    display: none;
}

body.code-theme .metadata {
    color: var(--string-color);
    font-style: italic;
    padding-left: 4rem;
}
body.code-theme .metadata-date {
    color: var(--string-color);
}

body.code-theme .metadata::before {
    content: '"""';
    color: var(--string-color);
    display: block;
}

body.code-theme .metadata::after {
    content: '"""';
    color: var(--string-color);
    display: block;
}

/* Home blocks as functions */
body.code-theme .home-block {
    background: var(--subtle-bg);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

body.code-theme .subtitle {
    color: var(--keyword-color);
    text-transform: none;
    letter-spacing: normal;
}

body.code-theme .subtitle::before {
    content: 'def ';
}

body.code-theme .subtitle::after {
    content: '():';
    background: none;
    position: static;
    color: var(--paren-color);
    height: auto;
    width: auto;
    opacity: 1;
}

body.code-theme .home-block p {
    color: var(--string-color);
    padding-left: 2rem;
}

body.code-theme .home-block p::before {
    content: '"""';
    color: var(--string-color);
    display: block;
    padding-left: 0;
}

body.code-theme .home-block p::after {
    content: '"""';
    color: var(--string-color);
    display: block;
    padding-left: 0;
}

/* Add pass keyword after last paragraph in home block */
body.code-theme .home-block::after {
    content: 'pass';
    color: var(--keyword-color);
    padding-left: 2rem;
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
}


/* Resources section as classes with methods */
body.code-theme .resources-intro {
    color: var(--comment-color);
    font-style: italic;
}

body.code-theme .resources-intro::before {
    content: '# ';
}

body.code-theme .resource-category {
    background: var(--subtle-bg);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

body.code-theme .resource-category-header {
    border-bottom: 1px solid var(--border-color);
}

/* Category as class definition */
body.code-theme .resource-category-title {
    color: var(--function-color);
}

body.code-theme .resource-category-title::before {
    content: 'class ';
    color: var(--keyword-color);
    font-weight: 600;
}

body.code-theme .resource-category-title::after {
    content: ':';
    color: var(--text-color);
}

/* Hide init method in normal mode */
.init-method {
    display: none;
}

/* Show init method in code theme */
body.code-theme .init-method {
    display: block;
    margin-bottom: 1rem;
    padding-left: 3.55rem;
}

body.code-theme .init-keyword {
    color: var(--keyword-color);
    font-weight: 600;
}

body.code-theme .init-name {
    color: var(--function-color);
    font-weight: 600;
}

body.code-theme .resource-category-description {
    color: var(--string-color);
    font-style: normal;
    padding-left: 2rem;
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

body.code-theme .resource-category-description::before {
    content: 'return ';
    color: var(--keyword-color);
    font-weight: 600;
}

body.code-theme .resource-list {
    padding-left: 2rem;
}

/* Each resource as a method */
body.code-theme .resource-list li {
    margin-bottom: 2rem;
}

body.code-theme .resource-list li::before {
    content: '';
    display: none;
}

body.code-theme .link {
    color: var(--function-color);
    display: block;
    margin-bottom: 0.5rem;
}

body.code-theme .link::before {
    content: 'def ';
    color: var(--keyword-color);
    font-weight: 600;
}

body.code-theme .resource-description {
    color: var(--string-color);
    padding-left: 2rem;
    display: block;
}

body.code-theme .resource-description::before {
    content: 'return ';
    color: var(--keyword-color);
    font-weight: 600;
}

/* Info section styling */
body.code-theme #info .subtitle {
    color: var(--comment-color);
}

body.code-theme #info .subtitle::before {
    content: '# ';
}

body.code-theme #info .subtitle::after {
    content: '';
}

body.code-theme #info ul {
    color: var(--text-color);
}

body.code-theme #info strong {
    color: var(--decorator-color);
}

body.code-theme #info p {
    color: var(--text-color);
}