@font-face {
    font-family: 'Josefin Sans';
    src: url("../fonts/JosefinSans-Regular.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Josefin Sans';
    src: url("../fonts/JosefinSans-SemiBold.ttf") format('truetype');
    font-weight: bold;
    font-style: normal;
}

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

@font-face {
    font-family: 'Inconsolata';
    src: url("../fonts/Inconsolata-SemiBold.ttf") format('truetype');
    font-weight: bold;
    font-style: normal;
}


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

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    margin-top: 2em;
    margin-left: 1.3em;
    margin-right: 1.3em;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    font-family: 'Inconsolata', monospace; 
}


h1, h2, h3 {
    font-family: 'Josefin Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: bold;
}

.nameh1 {
    text-decoration: none; 
    color: inherit;        
    cursor: pointer;       
    padding-right: 3em;
  }
  
.nameh1:hover,
.nameh1:focus,
.nameh1:active {
    color: inherit;
    text-decoration: none;
  }

h1:not(:first-of-type) {
    padding-top: 1.6em;
  }

/* Header */
.header {
    top: 0;
    z-index: 100;
}

.header-content {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.header-content h1 {
    font-size: 2.4em;
    color: #21415f;
}

/* Navigation */
.nav {
    display: flex;
    gap: .8em;
    align-items: center;
    font-family: 'Josefin Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2em;
}

.nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.nav a:hover {
    color: #21415f;
    transform: translateY(-2px);
}

.nav a.active {
    text-decoration: underline;
    text-underline-offset: .15em;
}

.nav a:last-child {
    padding-right: 0;
}


/* Mobile menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #555;
    
}


/* Main container */
.container {
    width: 80%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 15%; 
}

/* Main content */
.main-content {
    min-height: 600px;
}

.main-content h1 {
    color: #21415f;
    margin-bottom: 25px;
    font-weight: 700;
}

.main-content h2 {
    color: #34495e;
    margin: 30px 0 15px 0;
    font-weight: 600;
}

.main-content p {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.1em;
}


.main-content ol {
    list-style: numbered;
}

.my-photo {
    max-width: 300px;
    border-radius: 3px;
}

.main-content a,
.sidebar a {
    color: #4682B4;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid;
    border-color: #ccc;
}

.main-content a:hover,
.sidebar a:hover {
    border-color: #4682B4;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar h2 {
    color: #21415f;
}

.sidebar-card h3 {
    color: #21415f;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.sidebar-card p {
    margin-bottom: 10px;
}

.sidebar-card ul {
    list-style: inside;
    padding: 0;
}

.sidebar-card li {
    padding: 4px 0;
}

.sidebar-card li:last-child {
    border-bottom: none;
}

footer {
    text-align: center;
    padding-bottom: 1em;
    font-size: .9em;
    color: #555;
    margin-top: auto;
}

@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 15px 20px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 20px;
        background: white;
        border-radius: 12px;
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        min-width: 200px;
    }

    .nav.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .header {
        position: relative;
    }
}



@media (prefers-color-scheme: dark) {
    body {
        background-color: #212121;
        color: #e0e0e0;
    }

    .header-content h1 {
        color: #87a7c3;
    }
    
    .nav a {
        color: #aaa;
    }
    
    .nav a:hover {
        color: #87a7c3;
    }
    
    .mobile-toggle {
        color: #aaa;
    }
    
    .main-content h1 {
        color: #87a7c3;
    }
    
    .main-content h2 {
        color: #87a7c3;
    }
    
    .main-content p {
        color: #aaa;
    }
    
    .main-content a,
    .sidebar a {
        color: #4682B4;
        border-color: #555;
    }
    
    .main-content a:hover,
    .sidebar a:hover {
        border-color: #4682B4;
    }
    
    .sidebar h2 {
        color: #87a7c3;
    }
    
    .sidebar-card h3 {
        color: #87a7c3;
    }
    
    footer {
        color: #aaa;
    }
}