:root {
    --primary-color: #88B04B;
    /* Greenery */
    --accent-color: #ff7a5c;
    /* Coral/Salmon */
    --accent-color-background: #fde4de;
    --bg-color: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-color: #333333;
    --text-light: #666666;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    color: var(--text-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed);
    cursor: pointer;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: var(--text-color);
    margin-bottom: 4px;
    border-radius: 2px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2 {
    /*color: var(--primary-color);*/
    margin-bottom: 1rem;
}

h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-top: 1rem;
}

a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

/* Home / Contact Section */
.profile-card {
    display: flex;
    flex-direction: row;
    /* zawsze obok siebie */
    align-items: center;
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    gap: 2rem;
}


.profile-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    /* zajmuje resztę miejsca */
    min-width: 0;
    /* zapobiega łamaniu */
}


.profile-info ul {
    list-style: none;
    margin-top: 1rem;
    border-radius: 2;
    border-left: 5px solid var(--accent-color);
}



.profile-info li {
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.icon {
    margin-right: 10px;
    color: var(--accent-color);
    font-weight: bold;
}

/* Publications List */
.pub-list {
    list-style: none;
}

.pub-item {
    background: var(--bg-color);
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed);
}

.pub-item:hover {
    transform: translateX(5px);
}

.pub-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
    display: block;
}

.pub-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.pub-meta em {
    font-style: italic;
    color: #444;
}

.pub-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Buttons (DOI / ArXiv / BIB) */
.tag-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-speed);
    border: 1px solid transparent;
}

.tag-btn.doi {
    background-color: #eee;
    color: #555;
    border-color: #ddd;
}

.tag-btn.doi:hover {
    background-color: #ddd;
}

.tag-btn.arxiv {
    background-color: var(--accent-color-background);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.tag-btn.arxiv:hover {
    background-color: var(--accent-color);
    color: white;
}

.tag-btn.bib {
    background-color: #fff;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.tag-btn.bib:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Teaching Section (Vertical Layout) */
.vertical-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.teaching-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow var(--transition-speed);
}

.teaching-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.teaching-card h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s;
}

.teaching-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* --- Ukryta sekcja ze szczegółami --- */
.course-details {
    display: none;
    /* Domyślnie ukryte */
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    animation: slideDown 0.3s ease-out;
}

.course-details.visible {
    display: block;
    /* Pokazujemy po dodaniu klasy visible */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style dla samej listy linków wewnątrz szczegółów */
.simple-link-list {
    list-style: none;
    padding: 0;
}

/* Reszta stylów .simple-link-item itp. pozostaje bez zmian */

.simple-link-list.visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.simple-link-item {
    border-bottom: 1px solid #eee;
}

.simple-link-item:last-child {
    border-bottom: none;
}

/*.simple-link-item::before {
  content: "";
  display: inline-block;
  width: 6px;          
  height: 1.2em;      
  background-color: var(--primary-color); 
  border-radius: 10px; 
}*/

.simple-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.simple-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.01);
    padding-left: 20px;
}



/*.simple-link::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s;
    color: var(--accent-color);
}


.simple-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}*/

/* Schedule Table */
.schedule-container {
    overflow-x: auto;
    text-align: center;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    table-layout: fixed;
}

th,
td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

.schedule-tile {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0 auto;
    width: 95%;
}

th:last-child,
td:last-child {
    border-right: none;
}

th {
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    width: 16.66%;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Bonus Grid (Keep Grid here) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#bonus .simple-link-list {
    display: block;
    /* Always visible in bonus */
    border-top: none;
    animation: none;
}

#bonus .card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#bonus h3 {
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    nav ul.show {
        display: flex;
    }

    .profile-card {
        flex-direction: column;
        /* pod sobą na małych ekranach */
        text-align: center;
    }

    .profile-info li {
        justify-content: center;
    }
}


/*DEKORACJE*/