/* ===== CSS VARIABLES ===== */
:root {
    --bg-color: #121212;
    --card-bg: #1A1A1A;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --accent-color: #FF4500;
    --accent-hover: #E03E00;
    --accent-glow: rgba(255, 69, 0, 0.15);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-tertiary: #666666;
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -ms-overflow-style: none;
    scrollbar-width: none;
    min-height: 100vh;
}

body::-webkit-scrollbar {
    display: none;
}

/* ===== BLUE VIGNETTE GLOW ===== */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 998;
    background:
        radial-gradient(ellipse at top left, rgba(20, 60, 200, 0.13) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(20, 60, 200, 0.13) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(20, 60, 200, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(20, 60, 200, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at center top, rgba(10, 40, 180, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse at center bottom, rgba(10, 40, 180, 0.06) 0%, transparent 70%);
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* ===== HEADER ===== */
.header {
    padding: 64px 0 48px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 48px;
}

.logo {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.logo .dot {
    color: var(--accent-color);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 400;
}

/* ===== SECTION TITLES ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--accent-color);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 69, 0, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: background-color 0.3s, color 0.3s;
}

.project-card:hover .card-icon {
    background-color: var(--accent-color);
    color: #fff;
}

.card-content {
    flex: 1;
}

.card-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.project-card:hover .card-title {
    color: var(--accent-color);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-arrow {
    color: var(--text-tertiary);
    font-size: 1.25rem;
    transition: var(--transition);
    transform: translateX(-8px);
    opacity: 0;
}

.project-card:hover .card-arrow {
    color: var(--accent-color);
    opacity: 1;
    transform: translateX(0);
}

/* ===== COLUMNS GRID ===== */
.columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: start;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background-color: var(--border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    display: grid;
    grid-template-rows: auto auto 0fr;
    overflow: hidden;
}

.timeline-content.expanded {
    grid-template-rows: auto auto 1fr;
    background-color: rgba(255, 69, 0, 0.03);
    border-color: var(--accent-color);
}

.timeline-content:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 24px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    z-index: 1;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(255, 69, 0, 0.1);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.timeline-badge-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
    transition: margin 0.3s;
}

.timeline-content.expanded .timeline-company {
    margin-bottom: 16px;
}

.timeline-body {
    min-height: 0;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
}

.timeline-content.expanded .timeline-body {
    opacity: 1;
}

.timeline-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-body p + p {
    margin-top: 8px;
    border-top: none;
    padding-top: 0;
}

/* ===== SKILLS SECTION ===== */
.skills-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skills-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(255, 69, 0, 0.05);
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 80px;
    padding: 32px 0 48px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ===== CUSTOMIZE BUTTON (GEAR) ===== */
.customize-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    z-index: 1000;
}

.customize-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(45deg) scale(1.1);
}

.customize-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: rotate(90deg);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ===== ADMIN TOOLBAR ===== */
.admin-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(18, 18, 18, 0.88);
    border-bottom: 1px solid rgba(255, 69, 0, 0.25);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.admin-toolbar.visible {
    transform: translateY(0);
}

.admin-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 16px;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.admin-badge i {
    font-size: 1.125rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.admin-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 69, 0, 0.08);
}

.admin-btn i {
    font-size: 1rem;
}

.admin-btn-save {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.admin-btn-save:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal::-webkit-scrollbar {
    display: none;
}

.modal-overlay.visible .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.125rem;
    transition: var(--transition);
}

.modal-close:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-select,
.form-textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.2s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-color);
}

.form-select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background: transparent;
    border-color: #e53e3e;
    color: #e53e3e;
}

.btn-danger:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* ===== ICON PICKER ===== */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 6px;
}

.icon-option {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.25rem;
    color: var(--text-secondary);
    background: transparent;
}

.icon-option:hover,
.icon-option.selected {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 69, 0, 0.1);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast.leaving {
    animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast i {
    color: var(--accent-color);
    font-size: 1.125rem;
    flex-shrink: 0;
}

@keyframes toastIn {
    0% { opacity: 0; transform: translateY(16px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ===== EDIT MODE STYLES ===== */
.edit-mode-active [contenteditable="true"] {
    outline: none;
    border: 1px dashed var(--accent-color) !important;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: text;
    transition: background 0.2s;
}

.edit-mode-active [contenteditable="true"]:focus {
    background: rgba(255, 69, 0, 0.06);
}

.edit-mode-active .project-card {
    pointer-events: auto;
    cursor: default;
}

.edit-mode-active .project-card:hover {
    transform: none;
    box-shadow: none;
}

.edit-mode-active .timeline-content {
    cursor: default;
}

.edit-mode-active .timeline-content:hover {
    transform: none;
    box-shadow: none;
}

/* Inline action buttons for edit mode */
.edit-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-tertiary);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.edit-action-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 69, 0, 0.06);
}

.edit-action-btn i {
    font-size: 0.875rem;
}

.edit-action-btn.add-full {
    width: 100%;
    justify-content: center;
    padding: 10px;
    margin-top: 24px;
}

.edit-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(229, 62, 62, 0.3);
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    opacity: 0.6;
}

.edit-delete-btn:hover {
    background: rgba(229, 62, 62, 0.2);
    border-color: #e53e3e;
    opacity: 1;
}

.edit-section-wrapper {
    position: relative;
}

.edit-section-wrapper > .edit-delete-btn {
    top: 0;
    right: -8px;
}

/* Tag add/remove buttons */
.edit-tag-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.edit-tag-remove {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: rgba(229, 62, 62, 0.15);
    color: #e53e3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.edit-tag-remove:hover {
    background: rgba(229, 62, 62, 0.3);
}

/* Add body text button inside timeline card */
.edit-add-body-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-top: 8px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    background: transparent;
    color: var(--text-tertiary);
    font-family: inherit;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: var(--transition);
}

.edit-add-body-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ===== LOADING ANIMATION ===== */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Stagger children */
.projects-grid > *:nth-child(1) { animation-delay: 0.05s; }
.projects-grid > *:nth-child(2) { animation-delay: 0.1s; }
.projects-grid > *:nth-child(3) { animation-delay: 0.15s; }
.projects-grid > *:nth-child(4) { animation-delay: 0.2s; }
.projects-grid > *:nth-child(5) { animation-delay: 0.25s; }
.projects-grid > *:nth-child(6) { animation-delay: 0.3s; }

.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.25s; }
.timeline-item:nth-child(4) { animation-delay: 0.35s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header {
        padding: 48px 0 32px;
    }

    .logo {
        font-size: 1.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .columns-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 4px;
    }

    .timeline-dot {
        left: -29px;
        width: 16px;
        height: 16px;
        top: 24px;
    }

    .project-card {
        padding: 20px;
        gap: 16px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }

    .timeline-content {
        padding: 20px;
    }

    .skills-card {
        padding: 20px;
    }

    .customize-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .admin-toolbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-btn {
        flex: 1;
        justify-content: center;
    }

    .modal {
        max-width: 100%;
        border-radius: 12px;
    }

    .toast {
        font-size: 0.8125rem;
        padding: 10px 16px;
    }
}

@media (max-width: 600px) {
    :root {
        --border-radius: 10px;
    }

    body {
        font-size: 15px;
    }

    .container {
        padding: 0 20px;
    }
}

/* ===== EDIT MODE BODY OFFSET ===== */
body.edit-mode-active {
    padding-top: 60px;
}

@media (max-width: 768px) {
    body.edit-mode-active {
        padding-top: 100px;
    }
}
