/* ===== Variables & Reset ===== */
:root {
    --burgundy: #8B3A62;
    --burgundy-dark: #6B2A4A;
    --burgundy-light: #A64D7B;
    --burgundy-bg: #F9F2F6;
    --dark: #2D2D2D;
    --dark-corner: #4A2035;
    --gray-light: #F5F5F5;
    --gray-medium: #E0E0E0;
    --gray-text: #666666;
    --white: #FFFFFF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;
    --text-primary: #2D2D2D;
    --text-secondary: #666666;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 20px rgba(139, 58, 98, 0.12);
    --shadow-hover: 0 8px 32px rgba(139, 58, 98, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
}

/* ===== Dark Mode ===== */
body.dark-mode {
    --burgundy-bg: #2A1520;
    --dark: #E8E8E8;
    --dark-corner: #1A0E14;
    --gray-light: #1A1A2E;
    --gray-medium: #333355;
    --gray-text: #A0A0B8;
    --white: #12121E;
    --bg-primary: #12121E;
    --bg-secondary: #1A1A2E;
    --bg-card: #1E1E32;
    --text-primary: #E8E8E8;
    --text-secondary: #A0A0B8;
    --navbar-bg: rgba(18, 18, 30, 0.95);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 32px rgba(139, 58, 98, 0.25);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    padding: 16px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    border-bottom-color: var(--gray-medium);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--burgundy);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 32px;
    position: relative;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--burgundy);
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--burgundy);
    border-radius: 1px;
    transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1), width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--gray-medium);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.4s ease;
    overflow: hidden;
}

.dark-mode-toggle .fa-sun,
.dark-mode-toggle .fa-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: var(--transition);
    z-index: 1;
}

.dark-mode-toggle .fa-sun {
    left: 8px;
    color: #F59E0B;
    opacity: 1;
}

.dark-mode-toggle .fa-moon {
    right: 8px;
    color: #6366F1;
    opacity: 0.4;
}

.dark-mode-toggle .toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

body.dark-mode .dark-mode-toggle {
    background: #2D2B55;
}

body.dark-mode .dark-mode-toggle .toggle-slider {
    transform: translateX(28px);
    background: #1E1E32;
}

body.dark-mode .dark-mode-toggle .fa-sun {
    opacity: 0.4;
}

body.dark-mode .dark-mode-toggle .fa-moon {
    opacity: 1;
    color: #A5B4FC;
}

/* Dark mode hint */
.dark-toggle-wrapper {
    position: relative;
}

.dark-hint {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    animation: hintAppear 0.5s 1.5s forwards;
}

.dark-hint:not(.dismissed) {
    animation: hintAppear 0.5s 1.5s forwards, hintFloat 2.2s 2s ease-in-out infinite;
}

.dark-hint.dismissed {
    opacity: 0 !important;
    visibility: hidden !important;
    animation: none !important;
}

.dark-hint-arrow {
    width: 28px;
    height: 38px;
    color: var(--burgundy);
    flex-shrink: 0;
    margin-right: 10px;
    filter: drop-shadow(0 0 3px var(--bg-primary)) drop-shadow(0 0 3px var(--bg-primary)) drop-shadow(0 0 5px var(--bg-primary));
}

.dark-hint-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--burgundy);
    background: var(--bg-primary);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--burgundy);
    box-shadow: 0 4px 15px rgba(139, 58, 98, 0.15);
}

@keyframes hintAppear {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hintFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Nav tools container */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Visitor Counter */
.visitor-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    background: var(--burgundy-bg);
    color: var(--burgundy);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.visitor-counter:hover {
    background: var(--burgundy);
    color: #fff;
}

.visitor-counter i {
    font-size: 0.85rem;
}

.visitor-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10;
}

body.dark-mode .visitor-tooltip {
    background: #333;
}

.visitor-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--dark);
}

body.dark-mode .visitor-tooltip::before {
    border-bottom-color: #333;
}

.visitor-counter:hover .visitor-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid var(--gray-medium);
    border-radius: 50px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--burgundy);
}

.lang-btn .fa-chevron-down {
    font-size: 0.6rem;
    transition: var(--transition);
}

.lang-selector.open .lang-btn .fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 10;
    white-space: nowrap;
}

.lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--burgundy-bg);
    color: var(--burgundy);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 60px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--burgundy-bg) 100%);
    transition: background 0.5s ease;
}

.hero-bg-shape {
    position: absolute;
    top: -120px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: var(--dark-corner);
    border-radius: 0 0 0 50%;
    opacity: 0.9;
    z-index: 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    z-index: 1;
}

.hero-photo {
    flex-shrink: 0;
}

.photo-frame {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--burgundy);
    box-shadow: 0 12px 40px rgba(139, 58, 98, 0.25);
    transition: var(--transition);
}

.photo-frame:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 50px rgba(139, 58, 98, 0.35);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark));
    color: var(--white);
    font-size: 5rem;
}

.hero-text {
    z-index: 1;
}

.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--burgundy);
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-age {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-age i {
    color: var(--burgundy);
    margin-right: 6px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--burgundy-dark);
    border-color: var(--burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 58, 98, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--burgundy);
    border-color: var(--burgundy);
}

.btn-outline:hover {
    background: var(--burgundy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 58, 98, 0.3);
}

.btn-back {
    background: rgba(139, 58, 98, 0.1);
    color: var(--burgundy);
    border-color: var(--burgundy);
    backdrop-filter: blur(8px);
}

.btn-back:hover {
    background: var(--burgundy);
    color: #fff;
    border-color: var(--burgundy);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-text);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--gray-text);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--burgundy);
    border-radius: 2px;
    animation: scrollWheel 2s ease infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
    transition: background 0.5s ease;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--burgundy);
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.title-decoration {
    display: block;
    width: 60px;
    height: 4px;
    background: var(--burgundy);
    margin: 0 auto 16px;
    border-radius: 2px;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--burgundy), var(--burgundy-light));
    border-radius: 2px;
}

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

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

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--burgundy);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--burgundy);
    z-index: 1;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--burgundy);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-card {
    background: var(--bg-card);
    padding: 24px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--burgundy);
}

.timeline-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(4px);
}

.timeline-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.timeline-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.timeline-location i {
    color: var(--burgundy);
    margin-right: 6px;
}

.timeline-card-clickable {
    cursor: pointer;
}

.timeline-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--burgundy);
    transition: var(--transition);
}

.timeline-card-clickable:hover .timeline-map-link {
    gap: 10px;
}

/* ===== Experience Cards ===== */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.experience-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    cursor: pointer;
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark));
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.experience-card:hover .card-image img {
    transform: scale(1.05);
}

/* Card with logo instead of cover photo */
.card-image-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--burgundy-bg) 100%);
}

.card-image-logo .card-logo {
    width: auto;
    height: auto;
    max-width: 55%;
    max-height: 75%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    transition: var(--transition);
}

.experience-card:hover .card-logo {
    transform: scale(1.08);
}

.card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image.no-image::after {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.card-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}

.card-year {
    background: var(--burgundy);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.card-location i {
    color: var(--burgundy);
    margin-right: 4px;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--burgundy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.experience-card:hover .card-link {
    gap: 12px;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.skills-block {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skills-block:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.skills-block h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--burgundy);
    margin-bottom: 24px;
}

.skills-block h3 i {
    margin-right: 8px;
}

/* Language bars */
.language-item {
    margin-bottom: 20px;
}

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

.language-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: var(--gray-medium);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.animate {
    width: var(--target-width);
}

/* Skill tags */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--burgundy-bg);
    color: var(--burgundy);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.skill-tag:hover {
    background: var(--burgundy);
    color: var(--white);
}

.skills-tags-dragging {
    transform: none !important;
}

body.is-dragging .skills-block:hover {
    transform: none;
    box-shadow: var(--shadow);
}


.skill-tag.dragging {
    opacity: 0.9;
    z-index: 9999;
    cursor: grabbing;
    box-shadow: 0 8px 25px rgba(139, 58, 98, 0.4);
    background: var(--burgundy);
    color: var(--white);
    transform: scale(1.05);
    position: fixed;
    pointer-events: none;
}

.skill-tag.placeholder {
    opacity: 0;
}

.skills-tags .skill-tag:not(.dragging):not(.placeholder) {
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), background 0.3s, color 0.3s;
}

/* Interests */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: var(--transition);
}

.interest-item:hover {
    background: var(--burgundy-bg);
}

.interest-item i {
    font-size: 1.2rem;
    color: var(--burgundy);
    width: 24px;
    text-align: center;
}

.interest-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.contact-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.contact-icon {
    width: 56px;
    height: 56px;
    background: var(--burgundy-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    background: var(--burgundy);
}

.contact-icon i {
    font-size: 1.3rem;
    color: var(--burgundy);
    transition: var(--transition);
}

.contact-card:hover .contact-icon i {
    color: var(--white);
}

.contact-card-map {
    cursor: pointer;
}

.contact-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-card a {
    color: var(--burgundy);
    font-weight: 500;
    transition: var(--transition);
}

.contact-card a:hover {
    color: var(--burgundy-dark);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 24px 28px;
    font-size: 0.85rem;
}

.footer .container {
    max-width: 100%;
    padding: 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-credit {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.8;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.footer-copy {
    margin: 6px 0 0;
    font-size: 0.72rem;
    opacity: 0.45;
}

.footer-center {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.footer-tech-label {
    margin: 0 0 8px;
    font-size: 0.72rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-tech {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.tech-badge:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.tech-badge i {
    font-size: 0.95rem;
}

.tech-badge .fa-html5 {
    color: #E44D26;
}

.tech-badge .fa-css3-alt {
    color: #264DE4;
}

.tech-badge .fa-js {
    color: #F0DB4F;
}

.footer-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 12px;
    float: right;
}

.footer-github:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: translateY(-2px);
}

.btn-cv-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--burgundy);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-cv-download:hover {
    background: var(--burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 58, 98, 0.4);
}

/* ===== Scroll to Top ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--burgundy);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 900;
    box-shadow: 0 4px 15px rgba(139, 58, 98, 0.35);
    transition: opacity 0.4s, visibility 0.4s, background 0.3s, box-shadow 0.3s, bottom 0.3s ease;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    animation: floatBtn 2.5s ease-in-out infinite;
}

.scroll-top:hover {
    background: var(--burgundy-dark);
    box-shadow: 0 6px 20px rgba(139, 58, 98, 0.5);
    animation-play-state: paused;
}

@keyframes floatBtn {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== Tech Info Modal ===== */
.tech-badge[data-tech] {
    cursor: pointer;
}

.tech-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tech-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tech-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    margin: 20px;
    position: relative;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.tech-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px 16px;
}

.tech-modal-header i {
    font-size: 2.2rem;
}

.tech-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tech-modal-body {
    padding: 0 28px 28px;
}

.tech-modal-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.tech-stat {
    flex: 1;
    background: var(--burgundy-bg);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
}

.tech-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--burgundy);
    line-height: 1.2;
}

.tech-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-modal-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px;
}

.tech-modal-role h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--burgundy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.tech-modal-role ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tech-modal-role li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}

.tech-modal-role li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--burgundy);
}

/* ===== Subpage Hero ===== */
.subpage-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 50%, var(--burgundy-light) 100%);
    color: var(--white);
    padding: 120px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.subpage-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('') center/cover;
    opacity: 0.15;
}

.subpage-hero-content {
    position: relative;
    z-index: 1;
}

.subpage-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.subpage-hero .hero-location {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 8px;
    color: inherit;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.subpage-hero a.hero-location:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.subpage-hero .hero-location i {
    margin-right: 8px;
}

.subpage-hero .hero-year {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 28px;
}

/* ===== Subpage Content ===== */
.subpage-content {
    padding: 80px 0;
}

.subpage-content .container {
    max-width: 900px;
}

.content-block {
    margin-bottom: 60px;
}

.content-block h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.content-block h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--burgundy);
    border-radius: 2px;
}

.content-block p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-text);
    margin-bottom: 16px;
}

.content-block ul {
    list-style: none;
    padding: 0;
}

.content-block ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.7;
}

.content-block ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    background: var(--burgundy);
    border-radius: 50%;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--gray-light);
    position: relative;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-text);
    gap: 8px;
}

.gallery-placeholder i {
    font-size: 2rem;
    opacity: 0.4;
}

.gallery-placeholder span {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Map */
.map-container {
    margin-top: 32px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-medium);
}

.map-container iframe {
    width: 100%;
    height: 350px;
    border: 0;
    display: block;
}

/* ===== Portfolio Subpages ===== */
.portfolio-hero {
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    color: var(--white);
    padding: 120px 24px 60px;
    text-align: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.portfolio-hero-gradient {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--burgundy-bg) 100%) !important;
}

.portfolio-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(107, 42, 74, 0.85) 100%
    );
}

.portfolio-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.portfolio-hero-content .btn-back {
    margin-bottom: 24px;
}

.portfolio-hero-logo {
    width: 140px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
    border-radius: 12px;
}

.portfolio-hero-logo-large {
    width: 200px;
}

.portfolio-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--burgundy);
    text-shadow: none;
}

.portfolio-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.portfolio-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

a.portfolio-meta-item:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.portfolio-meta-item i {
    font-size: 0.9rem;
}

/* Portfolio content */
.portfolio-content {
    padding: 80px 0;
}

.portfolio-content .container {
    max-width: 960px;
}

/* Intro block with side accent */
.portfolio-intro {
    display: flex;
    gap: 24px;
    margin-bottom: 64px;
}

.portfolio-intro-accent {
    width: 4px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, var(--burgundy), var(--burgundy-light));
    border-radius: 4px;
}

.portfolio-intro-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 16px;
}

.portfolio-intro-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* Highlights grid */
.portfolio-highlights {
    margin-bottom: 64px;
}

.portfolio-highlights h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 28px;
    text-align: center;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-medium);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--burgundy-light);
}

.highlight-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--burgundy-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.highlight-icon i {
    font-size: 1.2rem;
    color: var(--burgundy);
}

.highlight-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mosaic gallery */
.portfolio-gallery {
    margin-bottom: 64px;
}

.portfolio-gallery h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 8px;
    text-align: center;
}

.gallery-disclaimer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-text);
    font-style: italic;
    margin-bottom: 28px;
}

.gallery-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}

.mosaic-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    transition: transform 0.5s ease;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}

.mosaic-item.mosaic-large {
    grid-column: 1 / -1;
    aspect-ratio: 21/9;
}

.mosaic-item:not(.mosaic-large) {
    aspect-ratio: 4/3;
}

.mosaic-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: var(--transition);
}

.mosaic-item:hover .mosaic-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio map */
.portfolio-map {
    margin-bottom: 32px;
}

.portfolio-map h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--burgundy);
    margin-bottom: 12px;
}

.portfolio-map > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== Photo Lightbox ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-content {
    max-width: 85vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    font-size: 0.95rem;
    margin-top: 16px;
    opacity: 0.8;
    text-align: center;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Mosaic item clickable indicator */
.mosaic-item {
    cursor: pointer;
}

.mosaic-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    border-radius: var(--radius);
}

.mosaic-item:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-content { max-width: 95vw; }

    .portfolio-hero-logo-large {
        width: 140px;
    }
}

/* ===== Confetti ===== */
.hero-age {
    cursor: default;
}

.hero-age-inner {
    display: inline;
    cursor: default;
    transition: var(--transition);
}

.hero-age-inner:hover {
    transform: scale(1.05);
}

.confetti-piece {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ===== Flag icons ===== */
.flag-icon {
    width: 20px;
    height: 14px;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 2px;
    object-fit: cover;
}

/* ===== Interest emoji ===== */
.interest-emoji {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    line-height: 1;
}

/* ===== Map Modal ===== */
.map-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.map-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.map-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

.map-modal h3 {
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--gray-medium);
}

.map-modal h3 i {
    color: var(--burgundy);
    margin-right: 8px;
}

.map-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--burgundy-bg);
    color: var(--burgundy);
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.map-modal-close:hover {
    background: var(--burgundy);
    color: #fff;
}

.map-modal-frame {
    width: 100%;
    height: 350px;
}

.map-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-modal-buttons {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-map {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    border: 2px solid var(--gray-medium);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.btn-map:hover {
    border-color: var(--burgundy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 58, 98, 0.15);
}

.btn-map img {
    border-radius: 4px;
}

/* ===== Dark mode extra overrides ===== */
body.dark-mode .nav-toggle span {
    background: var(--text-primary);
}

body.dark-mode .timeline-dot {
    border-color: var(--bg-primary);
}

body.dark-mode .scroll-indicator .mouse {
    border-color: var(--text-secondary);
}

body.dark-mode .scroll-indicator p {
    color: var(--text-secondary);
}

body.dark-mode .footer {
    background: #0A0A14;
}

body.dark-mode .subpage-content {
    background: var(--bg-primary);
}

body.dark-mode .content-block p,
body.dark-mode .content-block ul li {
    color: var(--text-secondary);
}

body.dark-mode .gallery-item {
    background: var(--bg-secondary);
}

body.dark-mode .map-container {
    border-color: var(--gray-medium);
}

/* ===== Map Loading & Offline ===== */
.map-modal-frame,
.map-container {
    position: relative;
}

.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    z-index: 3;
    border-radius: inherit;
    transition: opacity 0.4s ease;
}

.map-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.map-loading-dots {
    display: flex;
    gap: 10px;
}

.map-loading-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--burgundy);
    animation: mapDotBounce 1.2s ease-in-out infinite;
}

.map-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.map-loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes mapDotBounce {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(-18px); opacity: 1; }
}

.map-loading-text {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Map error / offline state */
.map-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    z-index: 3;
    border-radius: inherit;
    text-align: center;
    padding: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.map-error.active {
    opacity: 1;
    pointer-events: all;
}

.map-error-icon {
    font-size: 2.8rem;
    color: var(--burgundy-light);
    margin-bottom: 16px;
    position: relative;
}

.map-error-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 3px;
    background: var(--burgundy);
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(-45deg);
    opacity: 0.75;
}

.map-error h4 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600;
}

.map-error p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Work In Progress Modal ===== */
.wip-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.3s ease;
}

.wip-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.wip-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    padding: 32px 28px 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(20px) scale(0.97);
    animation: wipIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wipIn {
    to { transform: translateY(0) scale(1); }
}

.wip-modal .wip-icon {
    font-size: 2.4rem;
    color: var(--burgundy);
    margin-bottom: 16px;
}

.wip-modal h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--burgundy);
    margin-bottom: 12px;
}

.wip-modal p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.wip-modal .wip-sub {
    font-style: italic;
    color: var(--gray-text);
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.wip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--burgundy);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.wip-btn:hover {
    background: var(--burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 58, 98, 0.3);
}

/* ===== Offline Toast Notification ===== */
.offline-toast {
    position: fixed;
    top: 24px;
    left: 24px;
    background: var(--bg-card);
    border: 1px solid var(--gray-medium);
    border-left: 4px solid var(--burgundy);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 100000;
    max-width: 380px;
    cursor: pointer;
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.offline-toast.active {
    transform: translateX(0);
    opacity: 1;
}

.offline-toast-icon {
    position: relative;
    font-size: 1.4rem;
    color: var(--burgundy-light);
    flex-shrink: 0;
}

.offline-toast-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 2.5px;
    background: var(--burgundy);
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.offline-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.offline-toast-text strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.offline-toast-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.offline-toast-close {
    background: none;
    border: none;
    color: var(--gray-text);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.offline-toast-close:hover {
    color: var(--burgundy);
}

/* ===== Stats Modal ===== */
.stats-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
}

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

.stats-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 440px;
    width: 100%;
    padding: 32px 28px 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stats-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--burgundy);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-big-numbers {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stats-big-card {
    flex: 1;
    text-align: center;
    background: linear-gradient(135deg, var(--burgundy-bg) 0%, var(--bg-secondary) 100%);
    border-radius: 12px;
    padding: 20px 12px;
    border: 1px solid var(--gray-medium);
}

.stats-big-value {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--burgundy);
    line-height: 1;
    margin-bottom: 6px;
}

.stats-big-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stats-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--burgundy-bg);
    color: var(--burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.stats-row-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.stats-row-content strong {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-row-content span {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-ping-live {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-ping-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
    flex-shrink: 0;
    animation: pingPulse 1.5s ease-in-out infinite;
}

.stats-ping-dot.ping-good { background: #34c759; }
.stats-ping-dot.ping-ok { background: #ff9f0a; }
.stats-ping-dot.ping-bad { background: #ff3b30; }

@keyframes pingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.stats-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-text);
    padding-top: 16px;
    border-top: 1px solid var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.stats-privacy i {
    color: var(--burgundy-light);
}

/* ===== Infos Section ===== */
.infos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.infos-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.infos-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--burgundy-light);
}

.infos-card-main {
    grid-column: 1 / -1;
    text-align: center;
    background: linear-gradient(135deg, var(--burgundy-bg) 0%, var(--bg-card) 100%);
    border-left: 4px solid var(--burgundy);
}

.infos-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--burgundy-bg);
    color: var(--burgundy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.infos-card-main .infos-card-icon {
    margin: 0 auto 16px;
}

.infos-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--burgundy);
    margin-bottom: 10px;
}

.infos-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .infos-grid {
        grid-template-columns: 1fr;
    }
    .infos-card-main {
        grid-column: auto;
    }
    .infos-card {
        padding: 24px 20px;
    }
}

/* ===== Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        flex-wrap: nowrap;
    }

    .nav-toggle {
        display: flex;
        order: 10;
        margin-left: 8px;
    }

    .nav-tools {
        gap: 6px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 220px;
        height: auto;
        max-height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 60px 24px 28px;
        gap: 16px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        border-radius: 0 0 0 16px;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 6px 0;
    }

    .nav-indicator {
        display: none;
    }

    .visitor-counter {
        padding: 6px 8px;
    }

    .lang-btn span {
        display: none;
    }

    .lang-btn {
        padding: 6px 8px;
    }

    /* Scroll indicator - hide on mobile to avoid overlapping buttons */
    .scroll-indicator {
        display: none;
    }

    /* Hero */
    .hero {
        padding: 100px 24px 80px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .photo-frame {
        width: 200px;
        height: 200px;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-bg-shape {
        width: 300px;
        height: 300px;
        top: -80px;
        right: -80px;
    }

    /* Sections */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    /* Experience */
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-grid,
    .contact-grid-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Map modal */
    .map-modal-frame {
        height: 280px;
    }

    /* Subpage */
    .subpage-hero h1 {
        font-size: 2.2rem;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .subpage-content {
        padding: 48px 0;
    }

    /* Portfolio */
    .portfolio-hero {
        min-height: 55vh;
        padding: 100px 20px 40px;
    }

    .portfolio-hero-content h1 {
        font-size: 2.2rem;
    }

    .portfolio-hero-logo {
        width: 80px;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .gallery-mosaic {
        grid-template-columns: 1fr;
    }

    .mosaic-item.mosaic-large {
        aspect-ratio: 16/9;
    }

    .mosaic-caption {
        opacity: 1;
        transform: translateY(0);
    }

    .portfolio-content {
        padding: 48px 0;
    }

    /* Footer responsive */
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-left {
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }

    .footer-tech {
        justify-content: center;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }

    .photo-frame {
        width: 160px;
        height: 160px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .interests-grid {
        grid-template-columns: 1fr;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }
}
