Commit Graph

298 Commits

Author SHA1 Message Date
juanatsap f5276431ea feat: add AI chat widget powered by ADK Go 1.0
Visitors can ask questions about the CV via a floating chat panel.
The agent uses Gemini to answer questions about experience, projects,
skills, and education by querying the cached CV JSON data.

- internal/chat/agent.go: LLM agent with query_cv tool that searches
  CV data by section (experience, projects, skills, etc.) with keyword filtering
- internal/chat/handler.go: POST /api/chat endpoint with session management,
  graceful degradation when GOOGLE_API_KEY is not set
- chat-widget.html: HTMX-powered floating chat panel with Hyperscript toggle
- _chat.css: Responsive chat UI with dark theme support
- Wired into existing architecture via dependency injection (CVHandler,
  routes, main.go) — zero breaking changes, all existing tests pass
2026-04-08 00:20:48 +01:00
juanatsap 61efe98240 feat: link projects to drolosoft.com pages and add GitHub badge
Main project URLs now point to drolosoft.com product pages with
language-aware links. GitHub repos are shown via a new badge next
to the existing LIVE badge.
2026-04-03 23:15:59 +01:00
juanatsap f54829cb28 data: add Immich Photo Manager project logo 2026-04-03 22:44:21 +01:00
juanatsap bbaf303e62 data: add Cmux Resurrect project logo (phoenix) 2026-04-02 23:37:38 +01:00
juanatsap 019f610eb5 data: close LIV Golf position (ended Dec 2025) 2026-03-05 22:35:07 +00:00
juanatsap 6172ada527 fix: mobile sprite icons overflow in experience section
Sprite icons (.icon-sprite.icon-section) had fixed 80px dimensions
while mobile breakpoint set container to 60px, causing overflow.
Added mobile-specific rules to scale sprites to 60px with proper
background-size and positioning calculations.
2025-12-06 11:59:39 +00:00
juanatsap e06f98d1d8 fix: prevent FAB button overflow on very small screens (iPhone 13 mini)
- Add media query for screens ≤400px (iPhone 13 mini = 375px)
- Reduce button size to 34px and icon size to 16px
- Recalculate 6-button positions with 6px gaps (234px total width)
- Ensures buttons stay centered within narrow viewports
2025-12-06 10:01:12 +00:00
juanatsap 404748afb5 feat: redesign CMD+K button as macOS Spotlight-style search bar
Replace simple search button with search bar design in action bar:
- Semi-transparent styling integrated with dark action bar
- Keyboard shortcut indicators (⌘ K) shown as individual kbd elements
- Search icon and "Search" text for better discoverability
- Responsive: kbd keys hidden on mobile (<900px)
- Remove unused cmd-k-button.html partial template

Update test to verify new search bar structure (styling, kbd elements, icon).
2025-12-04 12:59:16 +00:00
juanatsap b5a50ca3ef feat: implement CSS sprite system for image optimization
Reduces HTTP requests from 44+ individual images to 3 sprite sheets
(~93% reduction). Includes Go sprite generator tool, CSS classes,
template integration, and E2E tests.

- Add cmd/sprites/main.go for sprite generation (60x60px + 120x120px @2x)
- Add _sprites.css with responsive sizing and retina support
- Update templates to use sprites with logoIndex fallback
- Add Makefile targets: sprites, sprites-clean
- Add 9-test E2E suite for sprite functionality
- Add doc/22-SPRITES.md with usage documentation
2025-12-04 11:38:36 +00:00
juanatsap d95c62bad4 refactor: remove outdated server design documentation
Remove 557-line server-design.md from _go-learning/architecture - content is now covered in updated architecture documentation with real implementation examples and test coverage.
2025-12-02 20:25:05 +00:00
juanatsap 0114b145ba refactor: remove search button from FAB, reorganize 7-button layout
Remove cmd-k-btn (search) from floating action buttons - search now only
lives in the action bar. Recalculated positions for 7-button (desktop)
and 6-button (mobile without shortcuts) layouts using fluid clamp() sizing.
2025-12-02 18:55:04 +00:00
juanatsap a0bef45b0a fix: restore udemy.png course logo and enhance text justification
- Re-added courseLogo reference for Udemy certifications in both cv-en.json and cv-es.json
- Enhanced .intro-text CSS with full justification (text-align-last) and cross-browser hyphenation support
2025-12-02 18:15:50 +00:00
juanatsap c26cea3fd5 fix: remove missing udemy.png reference, improve text justification
- Remove courseLogo reference for Udemy courses (use fallback icon)
- Add text-justify: inter-word and hyphens: auto to intro-text
- Better text flow on iPad/tablet widths with narrow columns
2025-12-02 18:07:33 +00:00
juanatsap 44116eba5a refactor: use hyperscript event filtering and destructuring
- Use event filtering [key is 'Enter' or key is ' '] on PDF modal cards
- Remove handlePdfCardKey helper function (now inline)
- Use event destructuring on keydown(key, target, ctrlKey, metaKey, altKey)
- Cleaner, more idiomatic hyperscript patterns
2025-12-02 17:55:45 +00:00
juanatsap 3c49f8f7cf refactor: use idiomatic hyperscript selector syntax
Replace verbose document.getElementById() and document.querySelectorAll()
with cleaner hyperscript syntax:
- #id for ID selectors
- .class and the first .class for class selectors
- <selector/> query literals for complex selectors
- #{variable} for dynamic ID interpolation

Files changed:
- utils._hs: scrollHeight, details, footer buttons, scrollToSection
- zoom._hs: all zoom control element selectors (14 changes)
- pdf-modal._hs: modal selector
- keyboard._hs: dynamic toggle and modal selectors
- contact-modal.html: response div and modal close
- index.html: ninja-keys bar selector
2025-12-02 16:23:40 +00:00
juanatsap 6970606c42 refactor: simplify contact form timestamp with hyperscript + minimal JS
Replace 34-line IIFE/MutationObserver with:
- Hyperscript: on toggle if me.open call resetContactForm()
- 11-line resetContactForm() function

Also dispatches 'show' event from openModal() for ninja-keys integration.
All 7 contact form tests pass.
2025-12-02 16:00:00 +00:00
juanatsap ff74946d2d feat: add Udemy courses and fix footer i18n + golangci-lint errors
- Add 5 Udemy courses with PDF certificate links (Go, Fyne, HTMX)
- Fix cv-footer.html to use CV data instead of hardcoded values
- Add i18n labels for footer (linkedin, github, domestika, email, phone)
- Fix 11 golangci-lint errors:
  - errcheck: proper Close() error handling in email/security/tests
  - staticcheck: simplify return and merge variable declaration
  - unused: remove legacy sendEmail and formatMessage functions
2025-12-02 14:11:36 +00:00
juanatsap 40733034ca feat: comprehensive WCAG 2.1 AA accessibility audit
- Add aria-labels to menu action buttons (PDF, Print, Contact)
- Add aria-labelledby to toggle checkboxes (desktop + mobile)
- Add -webkit-user-select prefix for Safari compatibility
- Add DynamicCacheControl middleware for HTML pages
- Add accessibility test suite (60-accessibility.test.mjs)
- Add comprehensive accessibility documentation (21-ACCESSIBILITY.md)
- Update Modern Web Techniques doc to mark audit complete
2025-12-02 10:46:53 +00:00
juanatsap fbcc5f8f5b perf: Always use bundled CSS (28+ files → 1 file)
- Update head-styles.html to always load bundle.min.css
- Remove development/production conditional CSS loading
- Add CSS auto-rebuild to pre-commit hook
- Track bundle.min.css in git (unignore it)
- Reduces initial CSS requests from 28+ to 1
2025-12-02 09:23:32 +00:00
juanatsap 9a848e8c53 feat: Add CMD+K command palette with ninja-keys integration
Implement a command palette accessible via CMD+K/Ctrl+K using the ninja-keys
web component. Features include:

- New /api/cmd-k endpoint serving dynamic CV entries (experiences, projects, courses)
- Language-aware responses with 1-hour cache headers
- Scroll-to-section functionality for quick navigation
- Enhanced keyboard shortcuts modal with CMD+K documentation
- Comprehensive test coverage for API and UI interactions

Also includes cleanup of deprecated debug test files and various UI polish
improvements to contact form, themes, and action bar components.
2025-12-01 13:03:06 +00:00
juanatsap 976b8ae2e2 fix: Scale floating button icons proportionally on mobile viewports
Remove hardcoded width/height HTML attributes from iconify-icon elements
that were overriding CSS sizing. The iconify-icon component uses HTML
attributes for SVG rendering, ignoring CSS width/height.

- Remove width="28" height="28" from 8 button templates
- Remove conflicting 768px media query from _buttons.css
- Add default desktop icon sizes (24px) in _scroll-behavior.css
- Icons now scale via clamp() from 18px (380px) to 24px (900px)
2025-12-01 12:31:31 +00:00
juanatsap 0956c78d00 style: Add CSS variable fallbacks for better browser compatibility
Following LogRocket CSS best practices:
- Added fallback values to 150+ CSS variable usages across 22 files
- Fallbacks use light theme defaults for consistent behavior
- Improves compatibility with older browsers
- Example: var(--text-primary) → var(--text-primary, #1a1a1a)

Variables with fallbacks:
- Colors: text-primary, text-secondary, text-muted, accent-blue, etc.
- Backgrounds: page-bg, paper-bg, action-bar-bg, sidebar-bg
- Shadows: shadow-sm, shadow-md, shadow-lg
- Borders: border-color, border-light, icon-border

CSS Variables Best Practices compliance: 6/7 recommendations now followed
2025-11-30 14:35:02 +00:00
juanatsap 58c1237326 feat: Add secure contact form with comprehensive security features
- Add contact form dialog with HTMX integration (hx-post)
- Implement browser-only access middleware (blocks curl/Postman/wget)
- Add rate limiting (5 requests/hour per IP) for contact endpoint
- Implement honeypot and timing-based bot detection
- Add input validation (email format, message length 10-5000 chars)
- Create contact button in desktop and mobile navigation (last position)

Security features:
- Browser-only middleware validates User-Agent, Referer/Origin, HX-Request headers
- Honeypot field returns fake success to fool bots while logging spam
- Timing validation rejects forms submitted < 2 seconds
- All security events logged for monitoring

Documentation:
- docs/SECURITY.md - Comprehensive security documentation
- docs/HACK-CHALLENGE.md - "Try to Hack Me!" challenge for security researchers
- docs/SECURITY-AUDIT-REPORT.md - Full security audit report
- docs/CONTACT-FORM-QUICKSTART.md - Integration guide

Form fields: email (required), name, company, subject, message (required)
2025-11-30 14:31:58 +00:00
juanatsap f91a24ea9b feat: Add plain text CV endpoint and contact form with security
Plain text endpoint:
- Add /text route for plain text CV (for curl/AI crawlers)
- Use k3a/html2text library for HTML-to-text conversion
- Add Plain Text button to hamburger menu with UI translations

Contact form feature:
- Add ContactHandler with proper email service integration
- Add CSRF protection middleware
- Add rate limiting (5 submissions/hour per IP)
- Add honeypot and timing-based bot protection
- Add input validation with detailed error messages
- Add security logging middleware
- Add browser-only middleware for API protection

Code quality:
- Fix all golangci-lint errcheck warnings for w.Write calls
- Remove duplicate getClientIP functions
- Wire up ContactHandler in routes.Setup
2025-11-30 13:47:49 +00:00
juanatsap ae430e6ea7 feat: Implement comprehensive AI-era SEO optimizations
- Add llms.txt file for AI crawlers (llmstxt.org standard)
- Enhance robots.txt with 15+ AI bot rules (GPTBot, ClaudeBot, etc.)
- Expand JSON-LD structured data from 1 to 12+ schema blocks:
  - Person (enhanced with occupations, languages, employers)
  - WebSite, BreadcrumbList, ProfilePage
  - EducationalOccupationalCredential (dynamic per education)
  - Course (dynamic per certification)
- Create doc/15-SEO.md with comprehensive SEO documentation
- Update MODERN-WEB-TECHNIQUES.md with SEO section (techniques 11-13)

Based on WPBeginner 2025 SEO recommendations for AI Overviews,
structured data, and E-E-A-T signals.
2025-11-30 13:23:22 +00:00
juanatsap 93ca00f26c fix: Remove sidebar content hide-on-hover in 901-1280px range
Sidebar content was being hidden at medium viewport widths (901-1280px)
and only visible on hover, causing poor UX. Content now remains visible.
2025-11-30 13:00:53 +00:00
juanatsap 31707bed07 fix: Desktop buttons use dark background by default (colors on hover/at-bottom) 2025-11-30 12:52:16 +00:00
juanatsap 95de841e14 feat: Add CSS bundling with Lightning CSS for production optimization
- Add Lightning CSS integration for CSS bundling and minification
- Create Makefile targets: css-dev, css-prod, css-watch, css-clean
- Implement conditional CSS loading based on GO_ENV (dev=modular, prod=bundled)
- Add IsProduction template variable for environment-aware rendering
- Keep print.css separate with media="print" for PDF export
- Add static/dist/ to .gitignore (generated bundles)
- Fix Go template syntax in _cv-header.css
- Remove redundant font @import in _typography.css

Performance gains:
- 27 HTTP requests → 1 (96% reduction)
- 188KB → 86KB CSS (54% reduction)
- ~15KB gzip network transfer

Documentation:
- Update 12-CSS-ARCHITECTURE.md with bundling section
- Add Phase 9 to 2-MODERN-WEB-TECHNIQUES.md
- Add css-bundling.test.mjs Playwright test (8/8 pass)
2025-11-30 12:32:46 +00:00
juanatsap f1e362bc30 refactor: Clean up CSS structure and separate print.css
- Delete orphaned CSS files (color-theme.css, logo-toggle.css,
  skeleton.css, main.new.css) - replaced by modular equivalents
- Delete 08-contexts/_print.css - wrongly created during modularization
- Remove 08-contexts folder (now empty)
- Add print.css as standalone with media="print" in HTML
- Update stale comments referencing old file names
- Remove _print.css import from main.css

print.css remains standalone and will NOT be bundled, as it's a
special case loaded only when printing (media="print").
2025-11-30 11:13:47 +00:00
juanatsap c834919a3c fix: Default to light theme for all first-time visitors
First-time visitors now always see light theme (paper aesthetic)
regardless of their system dark mode preference.

Users can still switch to dark or auto mode, and their preference
is saved to localStorage for future visits.

This maintains the professional CV paper appearance as the default
experience while giving users full control over their preference.
2025-11-30 09:35:31 +00:00
juanatsap eb92f64e93 fix: Mobile hamburger menu and iPad sidebar visibility
Mobile fixes:
- Add click toggle handler for hamburger menu (was hover-only)
- Menu now opens/closes on tap and closes when clicking outside
- Keep hover support for desktop

iPad fixes:
- Sidebar content now visible on touch devices (901-1280px)
- Added (hover: hover) media query to prevent hide-on-hover on tablets

Security improvements:
- Replace exec.CommandContext with go-git library for git operations
- Add path traversal and command injection prevention
- Fix race condition in template hot reload
- Add environment-based cookie Secure flag

Code quality:
- Add constants.go for magic numbers
- Remove unused code (ParsePreferenceToggleRequest, DomainError)
- Add FOUC prevention with inline critical CSS
- Add Makefile dev/run/clean targets
- Fix README git clone URL
- Add doc/DECISIONS.md for architectural decisions

Tests:
- Add hamburger menu click toggle tests
- Add iPad sidebar visibility tests
- Update security tests for go-git implementation
- Add cookie Secure flag tests
2025-11-30 09:29:35 +00:00
juanatsap fd734635d9 refactor: Extract modal backdrop close and scrollToTop to functions
- Add closeOnBackdrop(modal, evt) to utils._hs for modal backdrop clicks
- Add scrollToTop(evt) to utils._hs for smooth scroll to top
- Simplify 3 modal templates (shortcuts, info, pdf) from 4 lines to 1
- Simplify back-to-top button from 3 lines to 1
2025-11-30 06:33:42 +00:00
juanatsap 74bb3747a9 refactor: Extract zoom drag handlers to functions in zoom._hs
- Move inline drag handling (~35 lines) to external functions (~4 lines)
- Add isZoomDragTarget(el), startZoomDrag(), moveZoomDrag(), endZoomDrag()
- Note: 'target' is reserved in hyperscript, use 'el' for parameters
- Drag state stored on element (_isDragging, _initialX, _initialY)

Zoom control HTML now has clean, minimal hyperscript handlers.
2025-11-30 06:30:51 +00:00
juanatsap cf6b825bde refactor: Add scrollToSection and fix missing functions
- Add scrollToSection() to utils._hs (was missing after cv-functions.js removal)
- Move error toast close handler to inline hyperscript
- Remove initMenuCloseOnClick() - now integrated into scrollToSection()
- Remove initErrorToastClose() - now hyperscript inline handler
- Remove unused initScrollBehaviorJS() fallback (~70 lines dead code)

This fixes the navigation menu scroll functionality and eliminates
more JavaScript in favor of hyperscript.
2025-11-30 06:06:10 +00:00
juanatsap 7ab150a48e refactor: Migrate zoom control and expand/collapse to hyperscript
- Move initZoomControlButtons() from main.js to hyperscript handlers
  - zoom-toggle-button: on click call toggleZoomControl()
  - zoom-close: on click call hideZoomControl()
  - show-zoom-menu-btn: on click call showZoomControl()
- Move expandAllSections/collapseAllSections from JS to utils._hs
- Add zoom visibility functions to zoom._hs:
  - showZoomControl(), hideZoomControl(), toggleZoomControl()
- Update hamburger menu links to use hyperscript calls

Eliminates ~75 more lines of JavaScript in favor of declarative
hyperscript, continuing the pattern of moving behavior to ._hs files.
2025-11-30 06:03:45 +00:00
juanatsap ba44b435e7 refactor: Major hyperscript refactoring and JS elimination
Inline Hyperscript Refactoring:
- Body tag keyboard handlers: 20→8 lines (using helper functions)
- Zoom control handlers: 85→35 lines (using zoom._hs)
- PDF modal card selection: 90→6 lines (3 identical blocks eliminated)

New Hyperscript Files:
- zoom._hs: handleZoomInput, handleZoomReset, initZoomControl
- pdf-modal._hs: selectPdfCard, handlePdfCardKey

JavaScript Elimination (232 lines removed):
- cv-functions.js: REMOVED - hyperscript defs are globally available
- scroll-at-bottom-handler.js: REMOVED - duplicate of handleScroll()
- footer-buttons-interaction.js: REMOVED - moved to hyperscript

Added Tests:
- 32-hyperscript-multi-src.test.mjs: Verifies multi-file loading
- 33-keyboard-shortcuts-refactored.test.mjs: Keyboard shortcuts
- 34-hyperscript-refactor-comprehensive.test.mjs: Full test suite

Key Findings:
- No hyperscript multi-file bug in 0.9.14
- Hyperscript def statements are globally accessible
- Previous refactoring failures were syntax errors, not library bugs
2025-11-30 05:58:44 +00:00
juanatsap 4a02c0a328 fix: Restore sticky action bar by using overflow-x: clip instead of hidden
Root cause: overflow-x: hidden on html/body elements breaks position: sticky
on descendant elements. This is a known CSS behavior.

Changes:
- _reset.css: Changed overflow-x from 'hidden' to 'clip' on html and body
  - 'clip' prevents horizontal scrolling WITHOUT breaking sticky positioning
- index.html: Restored hyperscript scroll handlers (initScrollBehavior, handleScroll)
- main.js: Disabled JavaScript scroll fallback in favor of hyperscript

Behavior:
- Desktop: Action bar hides on scroll down, reappears on scroll up
- Mobile (≤900px): Action bar stays visible at all times (CSS override)

Tested: Both desktop and mobile scroll behaviors work correctly
2025-11-30 04:35:16 +00:00
juanatsap cb5e72a5f2 fix: Replace hyperscript scroll handler with JavaScript implementation
The hyperscript-based scroll behavior was not working reliably across all browsers.
Replaced with a pure JavaScript implementation that:

Desktop (>900px):
- Hides action bar on scroll down (past 100px threshold)
- Shows action bar on scroll up
- Shows action bar at top of page

Mobile (≤900px):
- Always keeps action bar visible
- Actively removes header-hidden class on mobile
- Handles viewport resize for responsive testing

Changes:
- Added initScrollBehaviorJS() function to main.js
- Removed hyperscript scroll handlers from body tag in index.html
- Kept keyboard shortcut handlers in hyperscript (still working)
- Uses passive scroll listener for better performance

This fixes the bug where:
- Desktop: bar would hide but not show again on scroll up
- Mobile: bar was incorrectly hiding despite CSS override
2025-11-30 04:13:50 +00:00
juanatsap acc9031cb9 fix: Reduce info modal font sizes for mobile viewport
On mobile, the info modal fonts were too large and causing content overflow.
All text elements have been proportionally reduced for better mobile UX.

Changes for mobile (≤768px):
- Modal padding: 2rem → 1.5rem (vertical), 1.5rem → 1rem (horizontal)
- Close button: 40px → 32px, icon 24px → 20px
- Title: 1.5rem → 1.05rem (30% reduction)
- CV title: 0.95rem
- Photo: 50px × 67px → 30px × 40px
- Description: 0.95rem → 0.85rem
- Tech items: 0.9rem → 0.8rem, icons 32px → 24px
- GitHub button: 0.875rem, icon 24px → 20px
- Tech grid: Single column layout
- Reduced spacing throughout

Result:
- All content fits comfortably within mobile viewport
- No text overflow or coverage issues
- Improved readability and visual hierarchy
- Better use of limited mobile screen space

Tests created but have Playwright API compatibility issues (non-blocking)
2025-11-28 00:05:32 +00:00
juanatsap e373a7d0ae fix: Navigation menu text colors in dark theme
The menu was showing light gray text in dark theme, creating poor contrast
against the white menu background. Menu text must always be dark since
the menu background is always white regardless of theme.

Changes:
- Added dark theme overrides for .navigation-menu and .submenu-content
- Force --text-dark to #1a1a1a (dark text) in dark theme for menu
- Force --text-gray to #333333 (dark gray) in dark theme for menu icons
- Applied same fix for auto theme when system preference is dark

Result:
- Menu text: Dark/black (rgb(26, 26, 26)) in all themes
- Menu icons: Dark gray (rgb(51, 51, 51)) in all themes
- Menu background: White (rgb(255, 255, 255)) in all themes
- Proper contrast and readability restored

Test created: 68-menu-colors-dark-theme-test.mjs
Screenshots: menu-light-theme.png, menu-dark-theme.png
2025-11-27 23:42:23 +00:00
juanatsap 566ec1431c fix: Update zoom button to preferred purple shade #5c59b6
Changed zoom button color from #9b59b6 to #5c59b6 for better visual appeal.
The new shade is more blue-tinted, creating a vibrant indigo/periwinkle appearance
that remains distinct from the info button blue.

Changes:
- Updated zoom-toggle-btn background: rgba(92, 89, 182, 0.7)
- Updated hover state: #5c59b6
- Updated at-bottom state: #5c59b6
- Updated test output to reflect correct hex code

Test verified: All buttons visible and colors distinct at all viewports.
2025-11-25 06:49:24 +00:00
juanatsap da483ae9f1 fix: Differentiate zoom and info button colors, fix button visibility in responsive mode
Issues fixed:
1. Zoom button now uses purple color (rgba(155, 89, 182, 0.7)) instead of blue
2. Info button keeps blue color (rgba(52, 152, 219, 0.7))
3. Both buttons now show distinct colors in default state, not just on hover
4. Device detection now considers viewport width, not just user agent
5. Buttons no longer hide in responsive mode at desktop viewport sizes

Changes:
- Updated zoom-toggle-btn to use purple background color
- Updated info-button to use blue background color (explicit, not var)
- Modified device-detection.js to check viewport width (≤900px) in addition to UA
- Added resize listener to update device class dynamically
- Created test (67-button-colors-and-visibility-test.mjs) to verify fixes

Testing:
- Desktop (1278px): All buttons visible with distinct colors
- Mobile (375px): Zoom/shortcuts hidden, core buttons visible
- Device detection now viewport-aware (prevents hiding at desktop sizes)
2025-11-25 06:41:56 +00:00
juanatsap 76d80edd7e fix: Remove unused cookie helper functions and fix desktop sidebar visibility
1. Removed unused getPreferenceCookie and setPreferenceCookie functions
   - These were flagged by golangci-lint as unused
   - Cookie preferences now handled client-side via localStorage
   - Removed unused net/http import

2. Fixed desktop sidebar accordion auto-opening
   - Updated handleLandscapeAccordions() to open accordions in desktop view (≥769px)
   - Sidebars now show content in desktop, landscape mobile, and portrait mobile
   - Only keep accordions collapsed in portrait mobile for space saving

3. Created comprehensive multi-viewport test (66-comprehensive-all-viewports-test.mjs)
   - Tests desktop (1278px), portrait mobile (375×667), landscape mobile (667×375)
   - Validates sidebars, accordion state, content visibility, AND all buttons
   - Checks button backdrop visibility in mobile views
   - Every feature now has corresponding test coverage

Fixes golangci-lint errors:
- internal/handlers/cv_helpers.go:366: func getPreferenceCookie is unused
- internal/handlers/cv_helpers.go:375: func setPreferenceCookie is unused
- internal/handlers/cv_helpers.go:7: net/http imported and not used
2025-11-25 06:00:39 +00:00
juanatsap 82f73cf724 fix: CRITICAL - Restore sidebar visibility in landscape mode
Fixed critical issue where sidebars were completely collapsed/hidden
in landscape mode, showing only 33px accordion headers instead of full content.

ROOT CAUSE:
- Sidebar accordions (<details> elements) were collapsed by default
- Native <details> browser behavior prevented CSS-only expansion
- Sidebar content was present but hidden behind collapsed accordion

SOLUTION:
1. JavaScript: Added handleLandscapeAccordions() to auto-open sidebar
   accordions when in landscape orientation (≤915px width)
   - Runs on DOMContentLoaded, orientationchange, and resize events
   - Uses matchMedia to detect landscape mode
   - Sets 'open' attribute on all .sidebar-accordion elements

2. CSS: Enhanced sidebar container styles in landscape mode
   - Set overflow: visible on sidebars (was hidden)
   - Set height: auto on sidebars and .actual-content wrappers
   - Forced accordion content visibility with !important rules
   - Made summary non-clickable in landscape (pointer-events: none)

3. Tests: Updated landscape test to validate sidebar visibility
   - Now checks sidebar visible/hidden state
   - Validates sidebar height (should be >100px, not 33px)
   - Added debug tests for troubleshooting

RESULTS:
- Sidebar height: 1387px (Android) / 1536px (iPhone) ✓
- Accordion state: OPEN ✓
- All sidebar content fully visible ✓
- No horizontal scroll ✓

Test files:
- tests/mjs/54-landscape-mode-test.mjs (updated with sidebar checks)
- tests/mjs/60-sidebar-content-debug.mjs (new debug test)
- tests/mjs/61-sidebar-positioning-debug.mjs (positioning debug)
- tests/mjs/62-sidebar-computed-height-debug.mjs (height debug)
- tests/mjs/63-media-query-match-test.mjs (media query validation)
2025-11-25 05:44:40 +00:00
juanatsap 945928d930 fix: Landscape mode photo layout and button backdrop improvements
Fixed two critical landscape mode issues on mobile devices:

1. Button backdrop blur bar now shows in landscape mode
   - Added iOS-style blur backdrop with 70px height for landscape
   - Consistent visual experience between portrait and landscape
   - Supports dark mode with appropriate theming

2. Photo positioned on the right in landscape with better sizing
   - Changed from stacked single-column to two-column grid layout
   - Photo now positioned on right side (180px vs previous 120px)
   - Text (name, experience, intro) on left, photo on right
   - Better use of horizontal space in landscape orientation
   - Left-aligned text for cleaner layout with photo on right

Test results (iPhone SE & iPhone 12 landscape):
   Two-column layout with photo on right
   Photo properly sized and positioned (180px)
   Button backdrop visible with blur effect
   No horizontal scroll
   All landscape tests passing

Test: tests/mjs/59-landscape-photo-and-backdrop-test.mjs
2025-11-25 05:24:11 +00:00
juanatsap 75efeb1474 fix: Perfect modal centering on mobile (portrait and landscape)
Fixes info modal positioning to be perfectly centered on mobile devices
in all orientations.

ISSUE:
- Info modal was not centered on mobile viewports
- User reported "pop-up of information in mobile it is not centered"
- Modal positioning relied on inset:0 + margin:auto which doesn't
  work consistently on mobile devices

FIX:
- Added explicit mobile centering using transform translate(-50%, -50%)
- Position: top: 50%, left: 50% with transform centering
- Applied to all modals: info, keyboard shortcuts, and PDF download
- Added mobile-specific fade-in animation preserving centering
- Constrained modal to viewport with calc(100vw - 2rem) width/height

Files modified:
- static/css/04-interactive/_modals.css - Mobile centering for all modals
- tests/mjs/58-modal-centering-test.mjs - Validation test

Test results:
 Portrait (375×667): Perfect center - 0px offset
 Landscape (667×375): Perfect center - 0px offset
 Modal center matches viewport center exactly
2025-11-25 05:15:23 +00:00
juanatsap 639a99b8ea fix: Complete mobile UX overhaul - horizontal scroll, landscape mode, and centering
Fixes three critical mobile issues across Android and iPhone:

1. HORIZONTAL SCROLL ELIMINATION (CRITICAL)
   - Added overflow-x: hidden to html and body globally
   - Landscape: Aggressive max-width: 100vw on all containers
   - Fixed .cv-page, .cv-container overflow issues
   - Prevented scale transform from causing overflow

2. LANDSCAPE MODE COMPLETE FIX
   - Single column layout enforced (grid-template-columns: 1fr)
   - Photo visible and sized appropriately (max-width: 120px)
   - Hamburger menu visible and accessible
   - Action bar simplified (center controls hidden)
   - Language selector compact
   - Smaller buttons (40px) with recalculated positions
   - Typography reduced for better fit

3. BUTTON CENTERING (VERIFIED WORKING)
   - Confirmed perfect centering in portrait mode
   - Android: 290px bar centered at viewport center (188px)
   - iPhone: Identical centering behavior
   - Landscape: 240px bar for 5 buttons (40px each)

Files modified:
- static/css/01-foundation/_reset.css - Global overflow-x fix
- static/css/05-responsive/_breakpoints.css - Comprehensive landscape overhaul
- tests/mjs/54-landscape-mode-test.mjs - Landscape validation (Android + iPhone)
- tests/mjs/55-button-centering-test.mjs - Button centering validation
- tests/mjs/56-landscape-debug-test.mjs - Media query debugging tool
- tests/mjs/57-horizontal-scroll-debug.mjs - Scroll width debugging tool

Test results:
 Portrait: Buttons perfectly centered (0px offset)
 Landscape: Single column, no horizontal scroll
 Hamburger visible and accessible in landscape
 Photo visible in all orientations
 Android + iPhone parity confirmed
2025-11-25 05:09:05 +00:00
juanatsap 2a5a11e78d fix: Complete mobile button fixes - transparency, color, and layout
Fixes three critical mobile UI issues:

1. Theme Button Transparency (FIXED)
   - Changed theme button from 50% to full opacity on mobile
   - Updated _themes.css with rgba(x, y, z, 1) for all theme modes
   - Added opacity: 1 !important to mobile media query

2. Info Button Color Differentiation (FIXED)
   - Changed info button from green (#27ae60) to blue (#3498db)
   - Now visually distinct from green back-to-top button
   - Updated all states: default, hover, at-bottom

3. Button Layout Reorganization (FIXED)
   - Added .is-mobile-device rules for 5-button layout (no shortcuts)
   - Buttons centered without gap: Download, Print, Theme, Info, Back-to-top
   - Total width: 290px (5 buttons + 4 gaps) vs 350px (6 buttons)

Files modified:
- static/css/01-foundation/_themes.css - Primary theme button fix
- static/css/04-interactive/_scroll-behavior.css - Info color + layout
- static/css/color-theme.css - Mobile device positioning sync
- tests/mjs/53-final-mobile-fixes-test.mjs - Comprehensive validation

Test results:
 Shortcuts hidden on real mobile (iPhone user agent)
 5 buttons evenly spaced with no gap (60px spacing)
 Info button blue (52, 152, 219) vs back-to-top green (39, 174, 96)
 Theme button full opacity (alpha: 1, opacity: 1)
2025-11-25 04:56:09 +00:00
juanatsap da81a0b148 feat: iOS-specific blur bar and hide keyboard shortcuts on real mobile devices
Issue 1: Blur bar compatibility (Android doesn't always show at bottom)
 Solution: Wrap blur bar in @supports query for backdrop-filter
- Only shows on devices that support backdrop-filter (primarily iOS)
- Android devices without support won't see the bar
- Prevents layout issues on non-iOS devices

Issue 2: Keyboard shortcuts button on real mobile (no physical keyboard)
 Solution: Device detection + conditional hiding
- Added device-detection.js: Detects real mobile vs desktop browser
- Checks user agent (Android, iPhone, iPad, etc.) + touch support
- Adds 'is-mobile-device' or 'is-desktop' class to <html>
- CSS hides shortcuts button only on real mobile devices
- Desktop browser in mobile view: shortcuts button still visible (for testing)

Implementation Details:
1. Device Detection (static/js/device-detection.js):
   - User agent detection: /Android|iPhone|iPad|etc./
   - Touch support check: ontouchstart + maxTouchPoints
   - Class added to <html>: is-mobile-device or is-desktop

2. Blur Bar (@supports query):
   - Detects backdrop-filter support before applying
   - iOS: Shows blur bar with backdrop-filter
   - Android (most): No blur bar (no backdrop-filter support)
   - Prevents empty/broken bar on incompatible devices

3. CSS Hiding Rules:
   - .is-mobile-device .shortcuts-btn { display: none !important; }
   - Also hides zoom-toggle-btn and zoom-control on real mobile
   - Desktop mobile view: shortcuts button remains visible

Files Modified:
- static/js/device-detection.js: NEW - Device detection logic
- templates/index.html: Load device-detection.js early
- static/css/05-responsive/_breakpoints.css: @supports wrapper for blur bar
- static/css/04-interactive/_scroll-behavior.css: Hide shortcuts on real mobile
- tests/mjs/52-mobile-device-detection-test.mjs: Comprehensive device detection test

Test Results:
 iPhone (real mobile): is-mobile-device class, shortcuts hidden
 Desktop browser (mobile view): is-desktop class, shortcuts visible
 Blur bar: Only shows on devices with backdrop-filter support
2025-11-24 20:48:12 +00:00
juanatsap 8bf48a1dd7 fix: Remove transparency from mobile buttons and fix landscape layout
Mobile Button Opacity (No Transparency):
- Changed all mobile button backgrounds from rgba(x,x,x,0.5) to rgba(x,x,x,1)
- Added opacity: 1 !important to override base opacity: 0.6 rules
- Buttons now display at full opacity with iOS blur bar backdrop
- Affected buttons: download, print-friendly, shortcuts, info, back-to-top, theme-switcher

Landscape Layout Fix:
- Added single-column grid rule for landscape orientation
- Media query: @media (max-width: 915px) and (orientation: landscape)
- Forces grid-template-columns: 1fr for both page-1 and page-2
- Prevents 2-column layout on iPhone landscape (844px wide)

Files Modified:
- static/css/04-interactive/_scroll-behavior.css: Button opacity overrides
- static/css/05-responsive/_breakpoints.css: Landscape single-column grid
- static/css/color-theme.css: Theme switcher opacity override

Visual Changes:
- Mobile buttons: Full color, no transparency (vibrant appearance)
- Landscape: Single column layout (sidebar top, content below)
- Maintains footer-hovered transparency for footer interaction
2025-11-23 09:15:08 +00:00