:root {
    --dark: #101827;
    --blue: #202E4B;
    --lightblue: #70e8fa;
    --purple: #BB86FC;
    --grey: #333333;
    --lightgrey: #e0e0e0;
    --shadow: rgba(0,0,0,0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body {
    font-family: "Oxygen", sans-serif;
    font-size: 14px;
    font-weight: 300;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f0f6fb 0%, #e3eef6 50%, #d7e6f0 100%);
}

/* Sidebar */
.icon-links {
    font-size: 200%;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.icon-links img {
    width: 1em; /* Matches the parent font-size */
    height: 1em; /* Matches the parent font-size */
    vertical-align: middle;
}

.fa-solid {
    margin-right: 8px; /* Adds space between icon and title */
}

img {
    width: 100%;
    border-radius: 12px;
}

/* Link styles */
a {
    color: var(--blue);
    font-weight: bold;
}

.filter-options {
    text-align: center;
    color: var(--blue);
    font-size: 12px;
}

.filter-option {
    cursor: pointer;
    text-decoration: none;
}

.filter-option:hover {
    text-decoration: underline;
}

.filter-option.selected {
    font-weight: bold;
}

/* Admin container */
.admin-links a {
    color: var(--purple);
}

/* Static column */
.static-column {
    color: var(--lightgrey);
    padding: 20px;
    line-height: 1.4em;
}

.static-column h2 {
    text-align: center;
    color: var(--dark);
}

/* Layout */
.app {
    display: flex;
    height: 100vh; /* lock layout to the viewport height to prevent body scroll */
}

.sidebar {
    width: 280px;
    background: var(--dark);
    color: var(--lightgrey);
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.profile-pic {
    width: 100%;
    border-radius: 16px;
    display: block;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 18px 0 12px 0;
}

.menu a {
    display: block;
    padding: 10px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--lightgrey);
    font-weight: 500;
}

.menu a:hover,
.menu a.active {
    background: var(--blue);
    color: white;
}

.sidebar hr {
    border: 0;
    height: 1px;
    background: var(--lightblue);
    margin: 12px 0 10px;
}

.links a {
    display: block;
    color: var(--lightblue);
    text-decoration: none;
    padding: 10px 10px;
    opacity: .9;
}

.links a:hover { opacity: 1; text-decoration: underline; }

.admin-links { margin-top: 14px; font-size: 12px; opacity: .8; }

#cv {
    flex: 1;
    height: 100vh;          /* full viewport height */
    overflow-y: auto;
}

header {
    text-align: center;
    padding: 60px 20px 0;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #202E4B;
}

header h2 {
    font-size: 1.3rem;
    font-weight: 400;
    color: #555;
    margin: 5px 0 25px;
}

header blockquote {
    font-size: 1rem;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
    color: #202E4B;
}

.cv-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 40px 20px;
}

.cv-page {
    background: #fff;
    width: 794px;     /* A4 width at 96dpi */
    min-height: 1123px; /* A4 height at 96dpi */
    margin: 20px 0;
    padding: 60px 80px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 4px;
}

.cv-page h3 {
    border-bottom: 2px solid var(--lightblue);
    padding-bottom: 4px;
    margin-top: 30px;
    color: var(--blue);
}

.cv section {
    margin-bottom: 20px;
}

.cv-page .section {
    margin-bottom: 1.1em;
}

.cv-page .section ul {
    padding-left: 30px;
    margin-block-start: 0;
}

.main {
    flex: 1;
    padding: 20px;
    overflow: hidden; /* columns inside handle scrolling */
}

/* Columns container: one column per category */
.content-grid {
    display: grid;
    gap: 16px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    grid-template-rows: 1fr; /* ensure each column gets full container height */
    height: calc(100vh - 40px);
    overflow: hidden;
}

.scrollable-column {
    overflow-y: auto;
    padding: 0 4px 12px;
    overscroll-behavior: contain;
}
.scrollable-column {
    border-left: 1px solid rgba(0,0,0,0.25);
    padding-left: 1rem;
}
.scrollable-column:first-child {
    border-left: none;
}

/* Make column titles sticky */
.scrollable-column h2 {
    position: sticky;
    top: 0;
    margin: 0 0 8px;
    padding: 8px 2px;
    color: var(--blue);
    z-index: 5;
    text-shadow: 0 0 4px rgba(255, 255, 255, 1);   /* tight glow */
}

/* Prevent page scroll on desktop; let columns own scrolling */
@media (min-width: 901px) {
    html, body { height: 100%; overflow: hidden; }
}
@media (min-width: 901px) {
    html.admin-page, body {
        height: auto;       /* let the body grow */
        overflow: auto;     /* allow normal scrolling */
    }
}

/* Responsive: collapse to single column and topbar-ish sidebar */
@media (max-width: 900px) {
    .app { flex-direction: column; }
    .sidebar { height: auto; position: static; width: 100%; }
    .content-grid { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: 1fr; height: auto; }
}

.scrollable-column::-webkit-scrollbar {
    display: none; /* For WebKit browsers: hides scrollbar */
}

/* Card styles */
.card {
    background-color: var(--blue);
    color: white;
    margin: 10px 0 20px 0;
    padding: 0 0 5px 0;
    box-shadow: 2px 6px 4px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.card .title {
    width: 100%;
    font-size: 15px;
    background: linear-gradient(90deg, rgba(112, 232, 250, 1) 0%, rgba(97, 99, 234, 1) 100%);
    color: var(--dark);
    display: flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 5px 0;
}

.card .title h3 {
    margin: 0 10px;
}

.card p {
    margin: 10px;
}

.card h3 {
    margin: 10px;
    font-size: 15px;
}

.card .date {
    font-weight: 300;
    font-size: 12px;
    font-style: italic;
}

/* Shimmer effect */
.card:hover::after {
    content: "";
    position: absolute;
    height: 400%;
    width: 300%;
    top: -100%;
    left: -100%;
    bottom: 0;
    background: linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 25%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 75%,
            rgba(255, 255, 255, 0) 100%
    );
    animation: glimmer 2s forwards;
}

@keyframes glimmer {
    0% {
        transform: translateX(-100%);
    } 100% {
          transform: translateX(100%);
      }
}

/* Modal styles */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#modal {
    display: none;
    color: var(--dark);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 50px;
    z-index: 1000;
    border-radius: 12px;
}

/* Form styles */
form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 900px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="text"],
input[type="date"],
input[type="url"],
input[type="password"],
textarea,
select {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

input[type="file"] {
    margin-bottom: 15px;
}

input[type="submit"],
button {
    background-color: var(--blue);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: var(--purple);
}

button:hover {
    background-color: var(--purple);
}




.pill {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    background-color: var(--purple);
    color: white;
    border-radius: 15px;
    cursor: pointer;
}

.filter-btn, .filter-toggle-button {
    float: right;
    background-color: var(--blue);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 8px;
}

.togglebutton {
    text-align: center;
}

.filter-toggle-btn {
    margin-top: 20px;
    background-color: var(--dark);
}

.filter-btn:hover {
    background-color: var(--purple);
}

.filter-container {
    position: relative; /* Establishes a positioning context for the dropdown */
}

.filter-dropdown {
    position: absolute;
    top: 100%; /* Positions the dropdown directly below the button */
    right: 0; /* Aligns the dropdown to the right of the button */
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
    display: none; /* Hidden by default */
}

.filter-dropdown label {
    font-weight: normal;
    font-size: 12px;
    margin: 0;
}

.filter-dropdown div {
    margin-bottom: 5px;
}

/* Dynamic content area */
#content {
    padding: 0;         /* layout padding is handled by .main */
    overflow: hidden;   /* prevent body scroll bleed */
    min-height: 0;      /* avoid forcing extra page height */
}