Files
cv-site/static/css/05-responsive/_breakpoints.css
T
juanatsap dab21f753d feat: Add iOS-style blur bar for mobile buttons and landscape optimizations
Mobile Portrait Enhancements:
- Added iOS-style blur backdrop behind fixed buttons
- Frosted glass effect with backdrop-filter: blur(20px) saturate(180%)
- Semi-transparent background with border-top separator
- Dark mode variant for theme consistency
- Z-index 98 (below buttons at 99)
- pointer-events: none to maintain button animations and clicks

Landscape Orientation Fixes:
- Hide profile photo to maximize vertical space
- Compact header with reduced font sizes (1.2rem)
- Reduced padding on action bar, sidebar, and sections
- Optimized button sizes (40x40px) and positions
- Fixed hamburger menu positioning in landscape

Files Modified:
- static/css/05-responsive/_breakpoints.css: Added blur backdrop and landscape styles
- templates/index.html: Added fixed-buttons-backdrop element
- tests/mjs/48-mobile-landscape-and-blur-test.mjs: Comprehensive test suite

Test Results:
 Blur backdrop exists with correct blur effect
 Fixed position at bottom with 90px height
 Border separator visible (0.5px)
 Photo hidden in landscape mode
 Compact sizing applied in landscape
 All animations maintained (backdrop separate from buttons)

Screenshots:
- tests/screenshots/mobile-portrait-blur-bar.png
- tests/screenshots/mobile-landscape-optimized.png
2025-11-23 08:21:12 +00:00

772 lines
19 KiB
CSS

/* ========================================
Desktop: Ensure Sidebar Content Visible (>1280px)
======================================== */
/* ========================================
Responsive: Medium Screens (901px - 1023px)
======================================== */
@media (min-width: 901px) and (max-width: 1023px) {
/* ========== Global Font Size Reduction ========== */
html {
font-size: 14px; /* Reduced from default 16px */
}
.cv-name {
font-size: 1.8em; /* Reduced from 2.2em */
}
.sidebar-title {
font-size: 0.95rem;
}
.sidebar-content {
font-size: 0.9rem;
}
/* ========== Selector Labels - Hide, Show on Hover ========== */
.selector-label {
max-width: 0;
overflow: hidden;
opacity: 0;
transition: all 0.3s ease;
white-space: nowrap;
}
.selector-group:hover .selector-label {
max-width: 200px;
opacity: 1;
margin-right: 0.75rem;
}
/* ========== Language Selector - Collapse to EN/ES ========== */
.language-selector .selector-btn {
position: relative;
padding: 0.4rem 1rem; /* Keep padding consistent */
min-width: 50px;
font-size: 0; /* Hide actual text */
overflow: visible;
transition: font-size 0.3s ease; /* Slower animation */
display: inline-flex;
justify-content: center;
align-items: center;
}
/* Show only short version (EN/ES) */
.language-selector .selector-btn::before {
content: attr(data-short);
font-size: 1rem; /* Restore font size for pseudo-element */
opacity: 1;
transition: opacity 0.3s ease; /* Slower animation */
display: block;
width: 100%;
text-align: center;
}
/* On hover of INDIVIDUAL button only, show full text */
.language-selector .selector-btn:hover {
font-size: 1rem; /* Restore font size to show full text */
min-width: auto;
}
.language-selector .selector-btn:hover::before {
content: ''; /* Hide short version */
opacity: 0;
}
/* ========== Action Buttons - Icon Only, Expand on Hover ========== */
.action-btn {
position: relative;
width: 45px;
overflow: hidden;
transition: width 0.3s ease, padding 0.3s ease;
white-space: nowrap;
text-indent: 0;
}
/* Hide button text, keep icon */
.action-btn iconify-icon {
flex-shrink: 0;
}
.action-btn {
font-size: 0;
padding: 0 0.65rem;
justify-content: center;
}
/* On hover, show text */
.action-btn:hover {
width: auto;
font-size: 0.95rem;
padding: 0.65rem 1.5rem;
gap: 0.5rem;
}
/* ========== Sidebar Content - Hide Text, Show on Hover ========== */
.sidebar-content {
max-height: 0 !important;
overflow: hidden !important;
opacity: 0 !important;
}
/* Show sidebar content on hover */
.skill-category:hover .sidebar-content,
.cv-sidebar-section:hover .sidebar-content {
max-height: 1000px !important;
opacity: 1 !important;
margin-top: 10px !important;
}
}
/* ========================================
Responsive: Medium Screens (1024px - 1280px)
======================================== */
@media (min-width: 1024px) and (max-width: 1280px) {
/* ========== Global Font Size Reduction ========== */
html {
font-size: 14px; /* Reduced from default 16px */
}
.cv-name {
font-size: 1.8em; /* Reduced from 2.2em */
}
.sidebar-title {
font-size: 0.95rem;
}
.sidebar-content {
font-size: 0.9rem;
}
/* ========== Selector Labels - Hide, Show on Hover ========== */
.selector-label {
max-width: 0;
overflow: hidden;
opacity: 0;
transition: all 0.3s ease;
white-space: nowrap;
}
.selector-group:hover .selector-label {
max-width: 200px;
opacity: 1;
margin-right: 0.75rem;
}
/* ========== Language Selector - Collapse to EN/ES ========== */
.language-selector .selector-btn {
position: relative;
padding: 0.4rem 1rem; /* Keep padding consistent */
min-width: 50px;
font-size: 0; /* Hide actual text */
overflow: visible;
transition: font-size 0.3s ease; /* Slower animation */
display: inline-flex;
justify-content: center;
align-items: center;
}
/* Show only short version (EN/ES) */
.language-selector .selector-btn::before {
content: attr(data-short);
font-size: 1rem; /* Restore font size for pseudo-element */
opacity: 1;
transition: opacity 0.3s ease; /* Slower animation */
display: block;
width: 100%;
text-align: center;
}
/* On hover of INDIVIDUAL button only, show full text */
.language-selector .selector-btn:hover {
font-size: 1rem; /* Restore font size to show full text */
min-width: auto;
}
.language-selector .selector-btn:hover::before {
content: ''; /* Hide short version */
opacity: 0;
}
/* ========== Action Buttons - Icon Only, Expand on Hover ========== */
.action-btn {
position: relative;
width: 45px;
overflow: hidden;
transition: width 0.3s ease, padding 0.3s ease;
white-space: nowrap;
text-indent: 0;
}
/* Hide button text, keep icon */
.action-btn iconify-icon {
flex-shrink: 0;
}
.action-btn {
font-size: 0;
padding: 0 0.65rem;
justify-content: center;
}
/* On hover, show text */
.action-btn:hover {
width: auto;
font-size: 0.95rem;
padding: 0.65rem 1.5rem;
gap: 0.5rem;
}
/* ========== Sidebar Content - Hide Text, Show on Hover ========== */
.sidebar-content {
max-height: 0 !important;
overflow: hidden !important;
opacity: 0 !important;
}
/* Show sidebar content on hover */
.skill-category:hover .sidebar-content,
.cv-sidebar-section:hover .sidebar-content {
max-height: 1000px !important;
opacity: 1 !important;
margin-top: 10px !important;
}
}
/* ========================================
Responsive: Small Screens (up to 540px)
======================================== */
/* ========================================
Responsive: Tablet Screens - Center Photo (up to 768px)
======================================== */
@media (max-width: 768px) {
/* ========================================
LAYOUT - Single column on mobile
======================================== */
/* Collapse grid to single column */
.page-1 .page-content,
.page-2 .page-content {
grid-template-columns: 1fr !important;
grid-template-rows: auto auto;
}
/* Stack elements vertically: sidebar -> main */
.page-1 .cv-sidebar-left {
grid-column: 1;
grid-row: 1;
order: 1;
}
.page-1 .cv-main {
grid-column: 1;
grid-row: 2;
order: 2;
}
/* Stack elements vertically: main -> sidebar */
.page-2 .cv-main {
grid-column: 1;
grid-row: 1;
order: 1;
}
.page-2 .cv-sidebar-right {
grid-column: 1;
grid-row: 2;
order: 2;
}
/* ========================================
TYPOGRAPHY - Subtle font size reductions
======================================== */
.cv-name {
text-align: center;
font-size: 1.6rem;
}
.years-experience {
text-align: center;
font-size: 1.1em;
}
.section-title {
font-size: 1.2em;
}
.sidebar-title {
font-size: 1.2em;
}
.experience-period,
.experience-separator,
.experience-location,
.experience-duration {
font-size: 0.95rem;
}
.position {
font-size: 0.95rem;
}
.short-desc,
.responsibilities li {
font-size: 0.85rem;
}
/* ========================================
TEXT ALIGNMENT FIXES - Selective alignment
======================================== */
/* Keep justified for intro and skills */
.intro-text,
.summary-text {
text-align: justify;
font-size: 0.85rem;
line-height: 1.5;
}
.intro-text {
margin-top: 0;
width: 100%;
}
/* Left-align for course/project descriptions */
.course-desc,
.project-desc {
text-align: left !important;
font-size: 0.85rem !important;
line-height: 1.5;
}
/* ========================================
HEADER LAYOUT - Centered photo
======================================== */
.cv-header-content {
flex-direction: column;
align-items: center;
gap: 1rem;
}
.cv-header-left {
width: 100%;
position: static;
padding-right: 0;
}
.cv-photo {
position: static;
width: auto;
height: auto;
max-width: 250px;
margin: 1.5rem auto;
text-align: center;
right: auto;
top: auto;
}
.cv-photo img {
width: 100%;
height: auto;
max-height: none;
}
/* ========================================
UNIFIED LOGO/ICON SIZING - Consistent 60px
======================================== */
.company-logo,
.course-icon,
.project-icon,
.award-logo {
width: 60px !important;
height: 60px !important;
flex-shrink: 0;
}
.company-logo img,
.course-icon img,
.project-icon img,
.award-logo img {
width: 60px !important;
height: 60px !important;
object-fit: contain;
}
/* Default icons inherit base 80px size from _toggles.css */
/* Removed !important to allow base styles to apply */
/* ========================================
CONSISTENT ITEM LAYOUT - Uniform spacing
======================================== */
.experience-item,
.course-item,
.project-item,
.award-item {
display: flex;
flex-direction: row;
gap: 1rem !important;
align-items: flex-start;
margin-bottom: 2rem !important;
padding-bottom: 1.5rem !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.experience-item {
margin-bottom: 1.8rem !important;
}
.experience-content,
.course-content,
.project-content,
.award-content {
flex: 1;
min-width: 0;
}
/* ========================================
FONT SIZE CONSISTENCY - Titles and descriptions
======================================== */
.course-title,
.project-title,
.award-item strong {
font-size: 0.95rem !important;
line-height: 1.4;
}
.course-item small,
.project-item small,
.award-item small {
font-size: 0.8rem !important;
}
.course-desc,
.project-desc,
.award-desc {
font-size: 0.85rem !important;
line-height: 1.5;
}
/* ========================================
RESPONSIBILITIES MOBILE OPTIMIZATION
======================================== */
.responsibilities li:has(img),
.responsibilities li:has(iconify-icon) {
grid-template-columns: 60px 1fr !important;
gap: 0.75rem !important;
margin-bottom: 0.75rem !important;
}
.responsibilities li img,
.responsibilities li iconify-icon.default-company-icon {
width: 60px !important;
height: 60px !important;
}
/* ========================================
SIDEBAR ITEMS MOBILE OPTIMIZATION
======================================== */
.language-item,
.reference-item,
.other-content {
margin-bottom: 0 !important;
line-height: 1.4 !important;
margin-left: 1rem !important;
font-size: 0.85rem !important;
}
/* ========================================
SIDEBAR ACCORDION - MOBILE ONLY
======================================== */
/* Compact sidebar on mobile - remove excessive padding */
.cv-sidebar {
padding: 0 !important;
}
/* Show accordion header on mobile - matches CV title badges style */
.sidebar-accordion summary.sidebar-accordion-header {
display: flex !important;
justify-content: space-between;
align-items: center;
padding: 8px 15px; /* Reduced padding for compact look */
background: #303030 !important; /* Match CV title badges dark gray */
color: #ccc;
cursor: pointer;
border-radius: 0; /* No rounding - match title badges */
margin-bottom: 0;
font-weight: normal;
font-size: 0.85em; /* Slightly smaller */
text-transform: uppercase;
gap: 0.3rem; /* Reduced gap */
list-style: none;
user-select: none;
border-bottom: 1px solid #34495e; /* Thinner border */
}
/* Accordion content - compact and animated */
.sidebar-accordion-content {
padding: 0.5rem 1rem; /* Minimal padding when open */
margin: 0;
overflow: hidden;
transition: max-height 0.3s ease-in-out;
}
/* Compact sidebar sections */
.sidebar-section {
margin-bottom: 0.5rem !important;
}
/* Remove default details marker */
.sidebar-accordion summary.sidebar-accordion-header::-webkit-details-marker,
.sidebar-accordion summary.sidebar-accordion-header::marker {
display: none;
}
/* Chevron rotation when open */
.sidebar-accordion[open] summary.sidebar-accordion-header .chevron {
transform: rotate(180deg);
transition: transform 0.3s ease;
}
.sidebar-accordion summary.sidebar-accordion-header .chevron {
transition: transform 0.3s ease;
color: #ccc; /* Match header text color */
}
/* Hide when closed */
.sidebar-accordion:not([open]) .sidebar-accordion-content {
max-height: 0;
opacity: 0;
}
/* Show when open */
.sidebar-accordion[open] .sidebar-accordion-content {
max-height: 2000px;
opacity: 1;
}
}
/* ========================================
Responsive: All Mobile Screens (up to 540px)
======================================== */
@media (max-width: 540px) {
/* Simplify action bar grid for mobile: single column */
.action-bar-content {
grid-template-columns: 1fr;
gap: 0;
padding: 0;
}
/* Hide center controls on mobile (moved to hamburger menu) */
.view-controls-center {
display: none;
}
/* Hide action buttons on small screens (available in hamburger menu) */
.action-buttons-right {
display: none;
}
/* Site title uses flexbox with percentage widths */
.site-title {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0 0.5rem;
gap: 0.5rem;
}
/* Left group (hamburger + title) takes ~50-60% */
.site-title-left {
display: flex;
align-items: center;
gap: 0.5rem;
flex: 1 1 1;
min-width: 0;
}
/* Title link is flexible within left group */
.site-title-link {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
}
.site-title-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Language selector takes ~30-35% */
.language-selector {
display: flex;
flex: 0 0 35%;
margin-left: auto;
padding-left: 0;
margin-right: 0;
justify-content: flex-end;
gap: 0.25rem;
}
/* Hide year from title in mobile view */
.site-title-year {
display: none;
}
/* Hide desktop logo, show mobile icon in title */
.site-logo-link {
display: none;
}
.site-icon-mobile {
display: inline-flex;
}
/* ========== Language Selector - Show Short Names Only ========== */
.language-selector .selector-btn {
position: relative;
padding: 0.4rem 0.75rem;
min-width: 40px;
font-size: 0; /* Hide actual text */
overflow: visible;
transition: font-size 0.3s ease;
display: inline-flex;
justify-content: center;
align-items: center;
}
/* Show only short version (EN/ES) */
.language-selector .selector-btn::before {
content: attr(data-short);
font-size: 0.95rem;
opacity: 1;
transition: opacity 0.3s ease;
display: block;
width: 100%;
text-align: center;
}
/* Keep short names on hover (no expansion) */
.language-selector .selector-btn:hover {
font-size: 0;
min-width: 40px;
}
.language-selector .selector-btn:hover::before {
content: attr(data-short);
opacity: 1;
}
}
/* ========================================
Mobile: iOS-Style Button Bar with Blur
======================================== */
@media (max-width: 540px) {
/* iOS-style blur bar behind fixed buttons */
.fixed-buttons-backdrop {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 90px; /* Enough to cover button area */
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-top: 0.5px solid rgba(0, 0, 0, 0.1);
z-index: 98; /* Below buttons (99) but above content */
pointer-events: none; /* Don't block button clicks */
}
/* Dark mode blur bar */
[data-color-theme="dark"] .fixed-buttons-backdrop,
[data-color-theme="auto"] .fixed-buttons-backdrop {
background: rgba(30, 30, 30, 0.8);
border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}
}
/* ========================================
Landscape Orientation Fixes
======================================== */
@media (max-width: 915px) and (orientation: landscape) {
/* Reduce header size in landscape */
.cv-header {
margin-bottom: 1rem !important;
}
.cv-name {
font-size: 1.2rem !important;
}
.years-experience {
font-size: 0.9em !important;
}
/* Hide photo in landscape to save vertical space */
.cv-photo {
display: none !important;
}
/* Compact action bar */
.action-bar {
padding: 0.5rem 1rem !important;
}
/* Reduce sidebar padding */
.cv-sidebar {
padding: 1rem !important;
}
/* Compact sections */
.section-title {
font-size: 1rem !important;
margin-bottom: 0.5rem !important;
}
/* Reduce margins */
.experience-item,
.project-item,
.course-item {
margin-bottom: 1rem !important;
}
/* Make hamburger menu more accessible in landscape */
.hamburger-menu {
position: fixed !important;
top: 10px !important;
left: 10px !important;
z-index: 1001 !important;
}
/* Adjust fixed buttons for landscape */
.fixed-btn {
bottom: 1rem !important;
width: 40px !important;
height: 40px !important;
}
.back-to-top-btn {
right: 1rem !important;
}
.shortcuts-btn {
left: 1rem !important;
bottom: 5rem !important;
}
.zoom-toggle-btn {
left: 1rem !important;
bottom: 9rem !important;
}
}