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

:root {
    /* Light theme colors - яркие насыщенные тона для видимости */
    --bg-primary: #f0f0f2;
    --orb1-color-start: rgba(80, 200, 180, 0.9);
    --orb1-color-end: rgba(60, 180, 160, 0.65);
    --orb2-color-start: rgba(100, 140, 255, 0.85);
    --orb2-color-end: rgba(80, 120, 245, 0.6);
    --orb3-color-start: rgba(255, 120, 80, 0.85);
    --orb3-color-end: rgba(255, 100, 60, 0.6);
    --orb4-color-start: rgba(255, 100, 180, 0.85);
    --orb4-color-end: rgba(245, 80, 160, 0.6);
    --orb5-color-start: rgba(255, 180, 60, 0.85);
    --orb5-color-end: rgba(255, 160, 40, 0.6);
    --orb6-color-start: rgba(60, 180, 255, 0.9);
    --orb6-color-end: rgba(40, 160, 245, 0.65);
    --orb7-color-start: rgba(180, 120, 255, 0.85);
    --orb7-color-end: rgba(160, 100, 245, 0.6);
    --orb8-color-start: rgba(200, 255, 100, 0.85);
    --orb8-color-end: rgba(180, 240, 80, 0.6);
    --arc-color: rgba(140, 170, 255, 0.25);
    --text-color: #1d1d1f;
    --content-bg: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] {
    /* Dark theme colors - яркие насыщенные тона */
    --bg-primary: #0a0a0a;
    --orb1-color-start: rgba(80, 240, 220, 0.6);
    --orb1-color-end: rgba(60, 220, 200, 0.4);
    --orb2-color-start: rgba(120, 160, 255, 0.55);
    --orb2-color-end: rgba(100, 140, 245, 0.35);
    --orb3-color-start: rgba(255, 140, 100, 0.55);
    --orb3-color-end: rgba(255, 110, 80, 0.35);
    --orb4-color-start: rgba(255, 120, 200, 0.55);
    --orb4-color-end: rgba(245, 100, 180, 0.35);
    --orb5-color-start: rgba(255, 200, 80, 0.55);
    --orb5-color-end: rgba(255, 180, 60, 0.35);
    --orb6-color-start: rgba(80, 200, 255, 0.55);
    --orb6-color-end: rgba(60, 180, 245, 0.35);
    --orb7-color-start: rgba(160, 120, 255, 0.55);
    --orb7-color-end: rgba(140, 100, 245, 0.35);
    --orb8-color-start: rgba(180, 255, 100, 0.55);
    --orb8-color-end: rgba(160, 240, 80, 0.35);
    --arc-color: rgba(140, 170, 255, 0.18);
    --text-color: #f5f5f7;
    --content-bg: rgba(15, 15, 15, 0.65);
}

html {
    background: var(--bg-primary);
    height: 100%;
    width: 100%;
    /* Отключаем bounce эффект при скролле */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    background: var(--bg-primary);
    min-height: 100vh;
    width: 100%;
    position: relative;
    /* Отключаем bounce эффект при скролле */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Wallpaper Container - полностью фиксированный, не скроллится */
.wallpaper-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    overflow: hidden;
    z-index: 0;
    will-change: transform;
    /* Предотвращаем любые изменения при скролле */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Ensure wallpaper extends beyond viewport on scroll */
@supports (height: 100dvh) {
    .wallpaper-container {
        height: 100dvh;
    }
}

/* Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
    pointer-events: none;
}

/* Light theme - меньше blur для лучшей видимости */
:root:not([data-theme="dark"]) .orb {
    filter: blur(40px);
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--orb1-color-start) 0%, var(--orb1-color-end) 70%, transparent 100%);
    top: 20%;
    left: 10%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--orb2-color-start) 0%, var(--orb2-color-end) 70%, transparent 100%);
    bottom: 15%;
    right: 15%;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--orb3-color-start) 0%, var(--orb3-color-end) 70%, transparent 100%);
    top: 60%;
    left: 5%;
}

.orb-4 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--orb4-color-start) 0%, var(--orb4-color-end) 70%, transparent 100%);
    top: 10%;
    right: 10%;
}

.orb-5 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--orb5-color-start) 0%, var(--orb5-color-end) 70%, transparent 100%);
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
}

.orb-6 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--orb6-color-start) 0%, var(--orb6-color-end) 70%, transparent 100%);
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.orb-7 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--orb7-color-start) 0%, var(--orb7-color-end) 70%, transparent 100%);
    top: 70%;
    right: 5%;
}

.orb-8 {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, var(--orb8-color-start) 0%, var(--orb8-color-end) 70%, transparent 100%);
    bottom: 30%;
    left: 20%;
}

/* Arc - removed */

/* Grain Overlay */
.grain-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Vignette */
.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        transparent 55%,
        rgba(0, 0, 0, 0.08) 100%
    );
    pointer-events: none;
    mix-blend-mode: multiply;
}

[data-theme="dark"] .vignette {
    background: radial-gradient(
        circle at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    mix-blend-mode: normal;
}

/* Content - теперь не используется, контент идет напрямую */

/* Ensure no white gaps on scroll */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    /* Дополнительная защита от bounce эффекта */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
}

/* Prevent horizontal overflow on all elements */
* {
    max-width: 100%;
    box-sizing: border-box;
}

img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Ensure all containers respect viewport width */
section, .card, .container, main, .grid {
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent text overflow */
p, span, div, h1, h2, h3, h4, h5, h6, li, td, th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Prevent background clipping on mobile scroll */
@media (max-width: 768px) {
    .wallpaper-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Old header/main/section styles removed - using new structure */

/* Old resume styles removed - using new structure from resume.html */

/* Theme Toggle - now part of floating actions */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .orb {
        animation: none !important;
        transform: none !important;
    }
    
    .wallpaper-container {
        will-change: auto;
    }
}

/* =========================
   Resume Structure Styles
========================== */

/* Container */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Theme Toggle - Top Right */
.theme-toggle-top {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--content-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 100;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .theme-toggle-top {
    background: rgba(40, 40, 45, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.theme-toggle-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .theme-toggle-top:hover {
    background: rgba(50, 50, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.theme-toggle-top:active {
    transform: scale(0.95);
}

/* Language Toggle - Top Right (below theme) */
.language-toggle-top {
    position: fixed;
    top: calc(2rem + 64px);
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--content-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 100;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .language-toggle-top {
    background: rgba(40, 40, 45, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.language-toggle-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .language-toggle-top:hover {
    background: rgba(50, 50, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.language-toggle-top:active {
    transform: scale(0.95);
}

.language-icon {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .language-icon {
    filter: brightness(1.1);
}

[data-theme="dark"] .theme-toggle-top .theme-icon {
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    /* Hide desktop language toggle on mobile */
    .language-toggle-top {
        display: none !important;
    }
    
    /* Show mobile language toggle in floating actions */
    .language-toggle-mobile {
        display: flex !important;
    }
    
    .theme-toggle-top {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) {
    /* Hide mobile language toggle on desktop */
    .language-toggle-mobile {
        display: none !important;
    }
    
    /* Show desktop language toggle */
    .language-toggle-top {
        display: flex !important;
        position: fixed;
        top: calc(2rem + 64px);
        right: 2rem;
        width: 56px;
        height: 56px;
    }
}

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-actions-right {
    right: 2rem;
    align-items: flex-end;
}

.floating-actions-left {
    left: 2rem;
    align-items: flex-start;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    max-width: 100%;
    overflow: visible;
}

.floating-actions-left.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    pointer-events: none;
}

/* Ensure buttons inside hidden container are still clickable when container is not hidden */
.floating-actions-left:not(.hidden) .floating-btn,
.floating-actions-left:not(.hidden) .share-btn,
.floating-actions-left:not(.hidden) .pdf-generate-btn {
    pointer-events: auto !important;
}

/* Hide any text content in floating buttons - they should only contain SVG */
/* But exclude language toggle button which needs to show text */
.floating-btn:not(.language-toggle-mobile) > *:not(svg),
.floating-btn:not(.language-toggle-mobile) > span:not(.language-icon),
.floating-btn:not(.language-toggle-mobile) > text {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: 0 !important;
}

/* Ensure only SVG is visible in floating buttons (except language toggle) */
.floating-btn:not(.language-toggle-mobile) {
    line-height: 0;
    font-size: 0;
}

/* Language toggle button should show text */
.language-toggle-mobile {
    line-height: normal;
    font-size: 0.75rem;
}

.language-toggle-mobile .language-icon {
    display: block !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    font-size: inherit !important;
    line-height: normal !important;
    opacity: 1 !important;
}

.floating-btn svg {
    display: block !important;
    visibility: visible !important;
}

@media (min-width: 769px) {
    .floating-actions-left.hidden {
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }
}

.floating-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    max-height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--content-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    flex-shrink: 0;
}

[data-theme="dark"] .floating-btn {
    background: rgba(40, 40, 45, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .floating-btn:hover {
    background: rgba(50, 50, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.floating-btn svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    opacity: 0.9;
    flex-shrink: 0;
    display: block;
}

[data-theme="dark"] .floating-btn svg {
    opacity: 1;
    filter: brightness(1.1);
}

.floating-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.language-toggle-mobile {
    display: none; /* Hidden by default, shown on mobile */
}

.contact-btn {
    width: 48px;
    height: 48px;
}

.contact-btn svg {
    width: 20px;
    height: 20px;
}

.action-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    max-height: 48px;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

.floating-btn.btn--primary {
    background: rgba(0, 122, 255, 0.16);
    border-color: rgba(0, 122, 255, 0.22);
    color: rgba(0, 122, 255, 1);
}

.floating-btn.btn--primary:hover {
    background: rgba(0, 122, 255, 0.24);
    border-color: rgba(0, 122, 255, 0.32);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.floating-btn[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    width: max-content;
    max-width: 600px;
    min-width: 240px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    z-index: 50;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

[data-theme="dark"] .floating-btn[data-tip]:hover::after {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(28, 28, 30, 0.72);
}

/* Icon Bar - removed, using floating buttons instead */

/* Main Content */
main {
    padding: 80px 0 46px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
}

/* Cards */
.card {
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

[data-theme="dark"] .card {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(28, 28, 30, 0.72);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.photo {
    width: 104px;
    height: 104px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.06)),
                radial-gradient(80px 80px at 30% 30%, rgba(0, 122, 255, 0.20), transparent 60%),
                radial-gradient(90px 70px at 70% 70%, rgba(175, 82, 222, 0.16), transparent 60%);
    overflow: hidden;
    flex: 0 0 auto;
}

[data-theme="dark"] .photo {
    border-color: rgba(255, 255, 255, 0.14);
}

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

.photo img:not([src]),
.photo img[src=""],
.photo img[src*="undefined"] {
    display: none;
}

.hero__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hero__name {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: 0.2px;
    margin: 0;
    color: var(--text-color);
}

.hero__role {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    opacity: 0.8;
}

.meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.10);
    color: var(--muted);
    font-size: 12px;
}

[data-theme="dark"] .pill {
    border-color: rgba(255, 255, 255, 0.14);
}

/* Section Title */
.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px 0;
}

.section-title h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    opacity: 0.8;
}

/* Experience */
.exp {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

details.job {
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.10);
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-theme="dark"] details.job {
    border-color: rgba(255, 255, 255, 0.14);
}

summary.job__head {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    user-select: none;
    transition: background-color 0.2s ease;
}

summary.job__head:hover {
    background-color: rgba(120, 120, 128, 0.05);
}

[data-theme="dark"] summary.job__head:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

summary.job__head::-webkit-details-marker {
    display: none;
}

.job__left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.job__title {
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.job__sub {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
}

.chev {
    width: 18px;
    height: 18px;
    opacity: 0.75;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 auto;
}

details[open] .chev {
    transform: rotate(180deg);
}

.job__body {
    padding: 0 18px;
    color: var(--text-color);
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.job__body--open {
    padding: 0 18px 16px 18px;
    opacity: 1;
}

.job__list {
    margin: 10px 0 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    list-style: disc;
}

.job__list li {
    padding: 0.25rem 0;
    opacity: 0.9;
}

.job__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.10);
    color: var(--muted);
    font-size: 12px;
}

[data-theme="dark"] .tag {
    border-color: rgba(255, 255, 255, 0.14);
}

/* Contacts */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.05);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

[data-theme="dark"] .contact-item {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(120, 120, 128, 0.08);
}

.contact-item:hover {
    background: rgba(120, 120, 128, 0.12);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

[data-theme="dark"] .contact-item:hover {
    background: rgba(120, 120, 128, 0.15);
    border-color: rgba(255, 255, 255, 0.18);
}

.contact-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.8;
}

.contact-item__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-item__label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.7;
}

.contact-item__value {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.contact-item--disabled:hover {
    transform: none;
    background: rgba(120, 120, 128, 0.05);
}

.contact-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.contact-btn--disabled:hover {
    transform: none;
}

.contact-item--preferred {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.2);
}

[data-theme="dark"] .contact-item--preferred {
    background: rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
}

.contact-item--preferred:hover {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.3);
}

[data-theme="dark"] .contact-item--preferred:hover {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.4);
}

.preferred-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 6px;
    border-radius: 4px;
    background: rgba(0, 122, 255, 0.15);
    color: rgba(0, 122, 255, 1);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .preferred-badge {
    background: rgba(0, 122, 255, 0.25);
    color: rgba(100, 180, 255, 1);
}

/* Education */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.education-item {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .education-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.education-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.education-item__title {
    font-size: 14px;
    font-weight: 650;
    color: var(--text-color);
    margin-bottom: 4px;
}

.education-item__institution {
    font-size: 13px;
    color: var(--muted);
    opacity: 0.8;
    margin-bottom: 4px;
}

.education-item__period {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.7;
    font-style: italic;
}

/* Skills */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-group__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    opacity: 0.8;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.portfolio-item {
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.10);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .portfolio-item {
    border-color: rgba(255, 255, 255, 0.14);
}

.portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .portfolio-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Image removed from cards */

.portfolio-item__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.portfolio-item__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.portfolio-item__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
}

.portfolio-item__statuses {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.portfolio-item__status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Status tag colors - matching resume style */
.portfolio-item__status {
    cursor: help;
    position: relative;
}

.portfolio-item__status--in-production {
    background: rgba(80, 200, 180, 0.15);
    color: #27AE60;
    border: 1px solid rgba(80, 200, 180, 0.3);
}

[data-theme="dark"] .portfolio-item__status--in-production {
    background: rgba(80, 240, 220, 0.15);
    color: #2ECC71;
    border: 1px solid rgba(80, 240, 220, 0.3);
}

.portfolio-item__status--published-app-store {
    background: rgba(80, 200, 180, 0.15);
    color: #27AE60;
    border: 1px solid rgba(80, 200, 180, 0.3);
}

[data-theme="dark"] .portfolio-item__status--published-app-store {
    background: rgba(80, 240, 220, 0.15);
    color: #2ECC71;
    border: 1px solid rgba(80, 240, 220, 0.3);
}

.portfolio-item__status--internal {
    background: rgba(255, 180, 60, 0.15);
    color: #F39C12;
    border: 1px solid rgba(255, 180, 60, 0.3);
}

[data-theme="dark"] .portfolio-item__status--internal {
    background: rgba(255, 200, 80, 0.15);
    color: #F4D03F;
    border: 1px solid rgba(255, 200, 80, 0.3);
}

.portfolio-item__status--removed {
    background: rgba(255, 120, 80, 0.15);
    color: #E74C3C;
    border: 1px solid rgba(255, 120, 80, 0.3);
}

[data-theme="dark"] .portfolio-item__status--removed {
    background: rgba(255, 140, 100, 0.15);
    color: #EC7063;
    border: 1px solid rgba(255, 140, 100, 0.3);
}

.portfolio-item__status--archived {
    background: rgba(120, 120, 128, 0.1);
    color: #7F8C8D;
    border: 1px solid rgba(120, 120, 128, 0.2);
}

[data-theme="dark"] .portfolio-item__status--archived {
    background: rgba(120, 120, 128, 0.15);
    color: #95A5A6;
    border: 1px solid rgba(120, 120, 128, 0.25);
}

.portfolio-item__description {
    display: none !important; /* Hide description in cards, show only in modal */
}

.portfolio-item__links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(120, 120, 128, 0.04);
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

[data-theme="dark"] .portfolio-link {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(120, 120, 128, 0.08);
}

.portfolio-link:hover {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.15);
    color: rgba(0, 122, 255, 1);
}

.portfolio-link--disabled,
.portfolio-link[href="#"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.portfolio-link--disabled:hover,
.portfolio-link[href="#"]:hover {
    background: rgba(120, 120, 128, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: var(--text-color);
}

[data-theme="dark"] .portfolio-link--disabled:hover,
[data-theme="dark"] .portfolio-link[href="#"]:hover {
    background: rgba(120, 120, 128, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-link svg {
    width: 14px;
    height: 14px;
}

/* Portfolio Modal */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 20px;
}

.portfolio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-modal__content {
    background: var(--content-bg);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.portfolio-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(120, 120, 128, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

[data-theme="dark"] .portfolio-modal__close {
    background: rgba(120, 120, 128, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-modal__close:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
}

.portfolio-modal__close svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
}

.portfolio-modal__image {
    width: 100%;
    min-height: 300px;
    max-height: 70vh;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .portfolio-modal__image {
    background: rgba(255, 255, 255, 0.05);
}

.portfolio-modal__image-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-modal__image-container img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.portfolio-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    color: white;
}

.portfolio-modal__nav:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

.portfolio-modal__nav svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.portfolio-modal__nav--prev {
    left: 16px;
}

.portfolio-modal__nav--next {
    right: 16px;
}

.portfolio-modal__image-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-modal__indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.portfolio-modal__indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.portfolio-modal__indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 28px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.portfolio-modal__body {
    padding: 30px;
}

.portfolio-modal__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.portfolio-modal__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.portfolio-modal__statuses {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portfolio-modal__statuses .portfolio-item__status {
    font-size: 12px;
    padding: 6px 12px;
}

.portfolio-modal__description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.85;
    margin: 0 0 24px 0;
    display: block !important; /* Always show in modal */
}

.portfolio-modal__links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.portfolio-modal__links .portfolio-link {
    font-size: 14px;
    padding: 10px 16px;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-modal {
        padding: 0;
        align-items: flex-start;
    }
    
    .portfolio-modal__content {
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
        margin: 0;
    }
    
    .portfolio-modal__close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    .portfolio-modal__close svg {
        width: 18px;
        height: 18px;
    }
    
    .portfolio-modal__image {
        min-height: 250px;
        max-height: 50vh;
        border-radius: 0;
    }
    
    .portfolio-modal__image-container img {
        max-height: 50vh;
    }
    
    .portfolio-modal__nav {
        width: 36px;
        height: 36px;
    }
    
    .portfolio-modal__nav--prev {
        left: 8px;
    }
    
    .portfolio-modal__nav--next {
        right: 8px;
    }
    
    .portfolio-modal__nav svg {
        width: 20px;
        height: 20px;
    }
    
    .portfolio-modal__image-indicators {
        bottom: 12px;
        padding: 6px 12px;
        gap: 8px;
    }
    
    .portfolio-modal__indicator {
        width: 8px;
        height: 8px;
    }
    
    .portfolio-modal__indicator.active {
        width: 24px;
    }
    
    .portfolio-modal__body {
        padding: 16px;
    }
    
    .portfolio-modal__header {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .portfolio-modal__title {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .portfolio-modal__statuses {
        gap: 6px;
    }
    
    .portfolio-modal__statuses .portfolio-item__status {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .portfolio-modal__description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 16px;
    }
    
    .portfolio-modal__links {
        gap: 8px;
    }
    
    .portfolio-modal__links .portfolio-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .portfolio-modal__image {
        min-height: 200px;
        max-height: 40vh;
    }
    
    .portfolio-modal__image-container img {
        max-height: 40vh;
    }
    
    .portfolio-modal__body {
        padding: 14px;
    }
    
    .portfolio-modal__title {
        font-size: 18px;
    }
    
    .portfolio-modal__description {
        font-size: 13px;
    }
}

    /* Actions */
    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }
    
    .btn {
        font-size: 12px;
        padding: 0 10px;
        height: 40px;
        white-space: nowrap;
        max-width: 100%;
    }
    
    .btn svg {
        width: 16px;
        height: 16px;
    }
    
    .copywrap {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .copywrap input {
        width: 100%;
        max-width: 100%;
        flex: 1;
        min-width: 0;
        font-size: 12px;
    }

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.12);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    font-size: 14px;
}

[data-theme="dark"] .btn {
    border-color: rgba(255, 255, 255, 0.14);
}

.btn:hover {
    background: rgba(120, 120, 128, 0.18);
    border-color: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.9;
}

.btn--primary {
    background: rgba(0, 122, 255, 0.16);
    border-color: rgba(0, 122, 255, 0.22);
    color: rgba(0, 122, 255, 1);
}

.btn--primary:hover {
    background: rgba(0, 122, 255, 0.24);
    border-color: rgba(0, 122, 255, 0.32);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.btn[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    display: inline-block;
    width: max-content;
    max-width: 600px;
    min-width: 240px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    z-index: 50;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

[data-theme="dark"] .btn[data-tip]:hover::after {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(28, 28, 30, 0.72);
}

.copywrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.copywrap input {
    width: min(420px, 100%);
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(120, 120, 128, 0.08);
    color: var(--muted);
    padding: 0 12px;
    outline: none;
    font-size: 14px;
}

[data-theme="dark"] .copywrap input {
    border-color: rgba(255, 255, 255, 0.14);
}

.copyhint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    opacity: 0.7;
}

/* Muted color variable */
:root {
    --muted: #6e6e73;
}

[data-theme="dark"] {
    --muted: rgba(245, 245, 247, 0.72);
}

/* Responsive */
@media (max-width: 768px) {
    /* Prevent overflow on mobile - global rules */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    /* Container and spacing */
    .container {
        padding: 0 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    main {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 60px 0 80px;
        /* Support for safe areas on devices with notches */
        padding-top: max(60px, env(safe-area-inset-top, 0px) + 47px);
        padding-bottom: max(80px, env(safe-area-inset-bottom, 0px) + 60px);
    }
    
    .grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        overflow: hidden;
    }
    
    /* Ensure all text wraps properly */
    p, span, div, h1, h2, h3, h4, h5, h6, li, td, th, a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    /* Theme and language toggles */
    .theme-toggle-top {
        top: max(1rem, env(safe-area-inset-top, 0px) + 0.5rem);
        right: max(1rem, env(safe-area-inset-right, 0px) + 0.5rem);
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    /* Hide desktop language toggle on mobile, show mobile version */
    .language-toggle-top {
        display: none !important;
    }
    
    .language-toggle-mobile {
        display: flex !important;
        width: 48px;
        height: 48px;
        font-size: 0.75rem;
        margin-bottom: 12px;
        order: -1; /* Place it above contacts */
    }
    
    /* Floating actions */
    .floating-actions-right {
        bottom: max(1rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
        right: max(1rem, env(safe-area-inset-right, 0px) + 0.5rem);
    }
    
    .floating-actions-left {
        bottom: max(1rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
        left: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem);
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 48px;
        max-height: 48px;
        font-size: 1.1rem;
        overflow: hidden;
        white-space: nowrap;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    
    .contact-btn {
        width: 48px;
        height: 48px;
    }
    
    .contact-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Hero section */
    .hero {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }
    
    .hero__text {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    .photo {
        width: 72px;
        height: 72px;
        border-radius: 14px;
        flex-shrink: 0;
    }
    
    .hero__name {
        font-size: 18px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .hero__role {
        font-size: 12px;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .meta {
        margin-top: 8px;
        gap: 5px;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .pill {
        padding: 5px 9px;
        font-size: 10px;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Cards */
    .card {
        padding: 14px;
        border-radius: 14px;
        margin: 0;
    }
    
    .section-title {
        margin-bottom: 10px;
    }
    
    .section-title h2 {
        font-size: 12px;
    }
    
    /* Text content */
    p {
        font-size: 13px;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Experience */
    summary.job__head {
        padding: 12px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .job__left {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 30px);
    }
    
    .job__title {
        font-size: 13px;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    .job__sub {
        font-size: 10px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    
    .job__body {
        padding: 0 14px 12px 14px;
    }
    
    .job__list {
        font-size: 12px;
        line-height: 1.5;
        padding-left: 14px;
    }
    
    .job__tags {
        gap: 5px;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    
    .tag {
        padding: 4px 8px;
        font-size: 10px;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Contacts */
    .contacts-list {
        gap: 8px;
        width: 100%;
    }
    
    .contact-item {
        padding: 10px 12px;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex-wrap: nowrap;
    }
    
    .contact-item svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .contact-item__text {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 40px);
        overflow: hidden;
    }
    
    .contact-item__label {
        font-size: 9px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .contact-item__value {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .preferred-badge {
        font-size: 8px;
        padding: 1px 4px;
        margin-left: 4px;
    }
    
    /* Education */
    .education-list {
        gap: 12px;
    }
    
    .education-item {
        padding-bottom: 12px;
    }
    
    .education-item__title {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .education-item__institution {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .education-item__period {
        font-size: 10px;
    }
    
    /* Skills */
    .skills-list {
        gap: 14px;
    }
    
    .skill-group {
        gap: 6px;
    }
    
    .skill-group__title {
        font-size: 11px;
    }
    
    .skill-tags {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .portfolio-item {
        border-radius: 14px;
    }
    
    .portfolio-item__content {
        padding: 14px;
        gap: 10px;
    }
    
    .portfolio-item__title {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .portfolio-item__status {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .portfolio-link {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Actions */
    .actions {
        gap: 8px;
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    .btn {
        height: 40px;
        padding: 0 10px;
        font-size: 12px;
        max-width: 100%;
        white-space: nowrap;
    }
    
    .btn svg {
        width: 16px;
        height: 16px;
    }
    
    .copywrap {
        gap: 8px;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .copywrap input {
        width: 100%;
        max-width: 100%;
        height: 40px;
        font-size: 12px;
        padding: 0 10px;
        flex: 1;
        min-width: 0;
    }
    
    .copyhint {
        font-size: 10px;
    }
    
    /* Tooltips */
    .btn[data-tip]:hover::after,
    .floating-btn[data-tip]:hover::after {
        min-width: 200px;
        max-width: calc(100vw - 32px);
        font-size: 11px;
        padding: 8px 10px;
    }
    
    /* Orbs - smaller on mobile */
    .orb-1 {
        width: 300px;
        height: 300px;
    }
    
    .orb-2 {
        width: 250px;
        height: 250px;
    }
    
    .orb-3 {
        width: 200px;
        height: 200px;
    }
    
    .orb-4 {
        width: 200px;
        height: 200px;
    }
    
    .orb-5 {
        width: 220px;
        height: 220px;
    }
    
    .orb-6 {
        width: 210px;
        height: 210px;
    }
    
    .orb-7 {
        width: 215px;
        height: 215px;
    }
    
    .orb-8 {
        width: 210px;
        height: 210px;
    }
    
    /* Grid spacing */
    .grid {
        gap: 14px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
        padding-left: max(12px, env(safe-area-inset-left, 0px) + 8px);
        padding-right: max(12px, env(safe-area-inset-right, 0px) + 8px);
        width: 100%;
        box-sizing: border-box;
    }
    
    main {
        padding: 60px 0 70px;
        padding-top: max(60px, env(safe-area-inset-top, 0px) + 47px);
        padding-bottom: max(70px, env(safe-area-inset-bottom, 0px) + 50px);
    }
    
    .theme-toggle-top {
        top: max(0.75rem, env(safe-area-inset-top, 0px) + 0.5rem);
        right: max(0.75rem, env(safe-area-inset-right, 0px) + 0.5rem);
        width: 44px;
        height: 44px;
    }
    
    /* Language toggle is in floating actions on mobile, so hide desktop version */
    .language-toggle-top {
        display: none !important;
    }
    
    .language-toggle-mobile {
        display: flex !important;
        width: 44px;
        height: 44px;
        font-size: 0.7rem;
    }
    
    .floating-actions-right {
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
        right: max(0.75rem, env(safe-area-inset-right, 0px) + 0.5rem);
    }
    
    .floating-actions-left {
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
        left: max(0.75rem, env(safe-area-inset-left, 0px) + 0.5rem);
    }
    
    .floating-btn,
    .contact-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        max-width: 44px;
        min-height: 44px;
        max-height: 44px;
        overflow: hidden;
        white-space: nowrap;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    
    .hero {
        gap: 12px;
    }
    
    .photo {
        width: 72px;
        height: 72px;
        border-radius: 14px;
    }
    
    .hero__name {
        font-size: 17px;
    }
    
    .hero__role {
        font-size: 12px;
    }
    
    .card {
        padding: 14px;
        border-radius: 14px;
    }
    
    .meta {
        gap: 5px;
    }
    
    .pill {
        padding: 5px 9px;
        font-size: 10px;
    }
    
    summary.job__head {
        padding: 12px 14px;
    }
    
    .job__body {
        padding: 0 14px 12px 14px;
    }
    
    .contact-item {
        padding: 10px;
    }
    
    .btn {
        height: 42px;
        padding: 0 10px;
        font-size: 12px;
    }
    
    .copywrap input {
        height: 42px;
        font-size: 12px;
    }
    
    .section-title h2 {
        font-size: 12px;
    }
    
    .job__title {
        font-size: 13px;
    }
    
    .job__list {
        font-size: 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .floating-btn,
    .contact-btn,
    .theme-toggle-top,
    .language-toggle-top {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover,
    .floating-btn:hover {
        transform: none;
    }
    
    /* Show active states instead */
    .btn:active,
    .floating-btn:active {
        transform: scale(0.95);
    }
    
    .card:active {
        transform: scale(0.98);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    main {
        padding: 80px 0 60px;
    }
    
    .theme-toggle-top {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .language-toggle-top {
        top: calc(0.75rem + 52px);
    }
    
    .floating-actions-right,
    .floating-actions-left {
        bottom: 0.75rem;
    }
}
