@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

body {
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.7;
    min-height: 100vh;
}

.header {
    background: #ffffff;
    padding: 20px 40px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo::before {
    content: '';
    width: 60px;
    height: 60px;
    background-color: #c41e3a;
    border-radius: 50%;
    display: block;
}

.logo-text {
    font-size: 11px;
    font-weight: bold;
    line-height: 1.3;
    text-transform: uppercase;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 40px;
}

.autocomplete-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 30, 58, 0.3);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideInDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestions-list.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(196, 30, 58, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(196, 30, 58, 0.08);
    transform: translateX(5px);
}

.suggestion-item mark {
    background-color: #ffe066;
    font-weight: 500;
}

.btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: rgba(196, 30, 58, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: rgba(160, 22, 41, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}

.btn-secondary {
    background: rgba(102, 102, 102, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(85, 85, 85, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, rgba(97, 167, 40, 0.9), rgba(33, 136, 38, 0.9));
    color: white;
    font-size: 18px;
    padding: 15px 40px;
    border: 0px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(33, 136, 56, 0.95), rgba(25, 105, 43, 0.95));
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(40, 167, 69, 0.4);
}

.btn-add {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.9), rgba(160, 22, 41, 0.9));
    color: white;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-add:hover {
    background: linear-gradient(135deg, rgba(160, 22, 41, 0.95), rgba(130, 18, 33, 0.95));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 30, 58, 0.3);
}

.status-message {
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    max-width: 600px;
    width: auto;
    min-width: 300px;
    text-align: center;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%);
    }
}

.status-message.success,
.status-message.error,
.status-message.info {
    padding: 15px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.status-message.success {
    background: rgba(212, 237, 218, 0.9);
    color: #155724;
    border: 1px solid rgba(195, 230, 203, 0.5);
}

.status-message.error {
    background: rgba(248, 215, 218, 0.9);
    color: #721c24;
    border: 1px solid rgba(245, 198, 203, 0.5);
}

.status-message.info {
    background: rgba(209, 236, 241, 0.9);
    color: #0c5460;
    border: 1px solid rgba(190, 229, 235, 0.5);
}

.editor-panel {
    background: #ffffff;
    padding: 40px 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.save-controls {
    position: sticky;
    top: 20px;
    text-align: right;
    margin-bottom: 30px;
    z-index: 1000;
    pointer-events: none;
}

.save-controls > .btn {
    pointer-events: auto;
}

.edit-section {
    margin-bottom: 50px;
    padding-bottom: 30px;
}

.edit-section:last-child {
    border-bottom: none;
}

.name-section {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 30px;
}

.name-input {
    width: 100%;
    padding: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    border: none;
    border-bottom: 3px solid rgba(196, 30, 58, 0.2);
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.name-input:focus {
    outline: none;
    border-bottom-color: #c41e3a;
    transform: translateY(-2px);
}

.name-input:hover {
    border-bottom-color: rgba(196, 30, 58, 0.4);
}

.reload-btn {
    position: absolute;
    right: 0;
    bottom: 15px;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(52, 152, 219, 0.6);
    background: rgba(52, 152, 219, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(52, 152, 219, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px) scale(0.9);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.15);
    z-index: 10;
}

.autocomplete-wrapper:hover .reload-btn.visible,
.reload-btn.visible:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.reload-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.9);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
    transform: translateX(0) scale(1.05);
}

.reload-btn:active {
    transform: translateX(0) scale(0.95);
}

.reload-btn svg {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reload-btn:hover svg {
    transform: rotate(180deg);
}

.reload-btn.loading svg {
    animation: rotateReload 1s linear infinite;
}

@keyframes rotateReload {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.section-title {
    font-size: 28px; /* Increased font size */
    font-weight: 700;
    margin-bottom: 25px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Decreased letter spacing */
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid rgba(196, 30, 58, 0.2);
    border-radius: 10px;
    font-family: 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field:focus {
    outline: none;
    border-color: #c41e3a;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.15);
}

.input-field::placeholder {
	font-size: 11px;
}

.input-field:hover {
    border-color: rgba(196, 30, 58, 0.4);
}

.textarea-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid rgba(196, 30, 58, 0.2);
    border-radius: 10px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.textarea-field:focus {
    outline: none;
    border-color: #c41e3a;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.15);
}

.textarea-field:hover {
    border-color: rgba(196, 30, 58, 0.4);
}

.bio-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.bio-text {
    display: flex;
    flex-direction: column;
}

.bio-text .text-editor {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bio-text .editable-field {
    flex-grow: 1;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.bio-image {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-drop-zone {
    width: 100%;
    height: 250px;
    border: 2px dashed rgba(196, 30, 58, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 249, 249, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-drop-zone:hover {
    border-color: #c41e3a;
    background: rgba(255, 245, 247, 0.8);
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.15);
}

.image-drop-zone.drag-over {
    border-color: #c41e3a;
    background: rgba(255, 224, 230, 0.8);
    border-style: solid;
    transform: scale(1.05);
}

.image-drop-zone p {
    color: #999;
    text-align: center;
    padding: 20px;
}

.image-preview {
    width: 100%;
    height: 250px;
    border: 2px solid rgba(196, 30, 58, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 249, 249, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    position: relative;
}

.image-preview:hover {
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.15);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: move;
}

.image-preview .focus-cross {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    cursor: crosshair;
    z-index: 20;
    transform: translate(-50%, -50%); /* Center on its position */
    display: none; /* Hidden by default */
    pointer-events: auto;
}

.image-preview:hover .focus-cross {
    display: block;
}

.image-preview .focus-cross::before,
.image-preview .focus-cross::after {
    content: '';
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
}

.image-preview .focus-cross::before { /* horizontal line */
    top: 50%;
    left: 2px;
    right: 2px;
    height: 1px;
    transform: translateY(-50%);
}

.image-preview .focus-cross::after { /* vertical line */
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    transform: translateX(-50%);
}

.image-preview .remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.image-preview:hover .remove-image-btn {
    opacity: 1;
    pointer-events: auto;
}

.image-preview .remove-image-btn:hover {
    background: rgba(200, 35, 51, 0.95);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.image-preview .remove-image-btn:active {
    transform: scale(0.95);
}

.image-preview .zoom-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 5px;
    display: flex;
    gap: 5px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-preview:hover .zoom-controls {
    opacity: 1;
    pointer-events: auto;
}

.image-preview .zoom-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-preview .zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Subtle floating toolbar */
.text-editor {
    position: relative;
    border: 2px solid rgba(196, 30, 58, 0.2);
    border-radius: 12px;
    padding-top: 8px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-editor:hover,
.text-editor:focus-within {
    border-color: rgba(196, 30, 58, 0.4);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.1);
}

.toolbar {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 30, 58, 0.2);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-editor-list {
    position: relative;
    border: 2px solid rgba(196, 30, 58, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-editor-list:hover,
.text-editor-list:focus-within {
    border-color: rgba(196, 30, 58, 0.4);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.1);
}

.text-editor-list .toolbar {
    position: absolute;
    top: -30px;
    right: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 30, 58, 0.2);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.text-editor:hover .toolbar,
.text-editor:focus-within .toolbar,
.text-editor-list:hover .toolbar,
.text-editor-list:focus-within .toolbar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(196, 30, 58, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 6px 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbar-btn:hover {
    background: rgba(196, 30, 58, 0.1);
    color: #c41e3a;
    transform: translateY(-2px);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.toolbar-btn.active {
    background: rgba(196, 30, 58, 0.2);
    color: #c41e3a;
    border-color: rgba(196, 30, 58, 0.3);
    font-weight: bold;
}

.editable-field {
    padding: 20px 18px 18px;
    font-size: 15px;
    line-height: 1.8;
    min-height: 180px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    overflow: auto;
}

.editable-field:focus {
    outline: none;
}

.editable-field .email-link {
    color: #c41e3a;
    text-decoration: none;
}

.editable-field[contenteditable="true"][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

/* Editable list with red dash bullets */
.list-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px; /* Balanced padding for centered appearance */
}

.bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 8px; /* Adjusted gap */
    position: relative; /* For positioning the delete button */
}

.bullet-drag-handle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bullet-drag-handle:hover {
    background: rgba(196, 30, 58, 0.08);
    transform: scale(1.1);
}

.bullet-drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.bullet-marker {
    width: 12px;
    height: 2px;
    background-color: #c41e3a;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.bullet-drag-handle:hover .bullet-marker {
    background-color: #8b1528;
}

.bullet-content {
    flex: 1;
    padding: 4px 8px;
    margin-top: 1px; /* Align with drag handle center */
    min-height: 26px;
    line-height: 1.7;
    font-size: 15px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bullet-content:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.2) inset, 0 2px 10px rgba(196, 30, 58, 0.1);
    transform: translateX(3px);
}

.bullet-content:empty::before {
    content: 'Neuer Eintrag...';
    color: #999;
    font-style: italic;
}

.bullet-list {
    position: relative;
}

.bullet-list.is-empty .bullet-content:empty::before {
    content: 'Hier klicken um einzugeben...';
}

.sortable-ghost {
    opacity: 0.5;
}

.sortable-ghost .bullet-marker {
    background-color: #999;
}

.bullet-delete-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: #dc3545;
    line-height: 1;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bullet-item:hover .bullet-delete-btn {
    opacity: 1;
    pointer-events: auto;
}

.bullet-delete-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.bullet-delete-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.links-editor {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.link-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: center;
    position: relative;
    padding: 10px;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-item:hover {
    background: rgba(196, 30, 58, 0.03);
}

.link-item:active {
    cursor: grabbing;
}

.link-item input {
    cursor: text;
}

.publications-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.publication-links {
    border-left: 1px solid #eee;
    padding-left: 30px;
}

.bio-links {
    border-left: 1px solid #eee;
    padding-left: 30px;
}

.btn-remove {
    background: rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
    align-self: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: rgba(200, 35, 51, 0.95);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
}

.btn-remove:active {
    transform: scale(0.95);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Additional animations for bullet items */
.bullet-item {
    animation: fadeInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Link item animations */
.link-item {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section animations on scroll */
.edit-section {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(196, 30, 58, 0.3);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 30, 58, 0.5);
}

/* Loading animation for save button */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.btn-success.saving {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Section title enhanced animation */
.section-title::before {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-section:hover .section-title::before {
    width: 80px;
    background-color: #c41e3a;
}

/* Logo animation */
.logo::before {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover::before {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide overflow on the modal overlay itself */
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-viewport {
    margin: 2vh auto;
    width: 90%;
    max-width: 1600px; /* Reasonable max width for desktop */
    aspect-ratio: 16/10;
    overflow-y: auto; /* Scrollable vertically */
    overflow-x: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3001;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .bio-container {
        grid-template-columns: 1fr;
    }
    
    .name-selector {
        flex-direction: column;
    }
    
    .container {
        padding: 20px 10px;
    }
    
    .editor-panel {
        padding: 30px 20px;
    }
    
    .name-input {
        font-size: 24px;
    }
    
    .link-item {
        grid-template-columns: 1fr;
    }
    
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.3s !important;
    }
}
