/* ==========================================================================
   Nordic Sharp OS Desktop Stylesheet
   Combines Nordic Sharp Edge aesthetics with Desktop OS windowing system
   ========================================================================== */

/* 1. Design Tokens (CSS Variables) */
:root {
  --nordic-bg: #FAFAFA;
  --nordic-surface: #FFFFFF;
  --nordic-surface-subtle: #F4F4F5;
  --nordic-border: #D4D4D8;
  --nordic-border-strong: #000000;
  --nordic-glass: rgba(255, 255, 255, 0.92);

  /* Typography Colors */
  --text-primary: #000000;
  --text-secondary: #3F3F46;
  --text-muted: #71717A;

  /* Accent & High Contrast Monochrome Inversion */
  --accent-color: #000000;
  --accent-surface: #000000;
  --accent-text: #FFFFFF;
  --accent-glow: rgba(0, 0, 0, 0.08);

  /* Strict Radii & Sharp Geometry (Strict 2px Rules) */
  --radius-sharp: 2px;
  --card-radius: 2px;
  --cell-radius: 2px;
  --pill-radius: 2px;

  /* Status Colors */
  --status-available: #10B981;
  --status-negotiate: #F59E0B;
  --status-unavailable: #EF4444;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Space Grotesk', sans-serif;

  /* Grid Overlay */
  --grid-color: rgba(0, 0, 0, 0.04);
}

/* Global Resets & Floating Overlay Scrollbar System */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}

/* WebKit (Chrome, Edge, Safari, Opera) Floating Overlay Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background: transparent !important;
  border: none !important;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-sharp);
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s ease, width 0.2s ease;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background-color: rgba(0, 0, 0, 0.85);
  border-width: 0px;
}

::-webkit-scrollbar-corner {
  background: transparent;
}
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--nordic-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Background Grid Wrapper */
.desktop-wrapper {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  background-image: 
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
}

/* Boot Screen Overlay */
.boot-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--nordic-bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.boot-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-content {
  width: 320px;
  text-align: center;
  font-family: var(--font-mono);
}

.boot-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.boot-bar-container {
  width: 100%;
  height: 4px;
  background: var(--nordic-border);
  border-radius: var(--radius-sharp);
  overflow: hidden;
  margin-bottom: 12px;
}

.boot-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.boot-status {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Desktop Main Workarea */
.desktop-area {
  flex: 1;
  position: relative;
  width: 100%;
  height: calc(100vh - 48px);
  overflow: hidden;
  padding: 24px;
}

/* Desktop Icons Sidebar */
.desktop-icons {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}

.icon-btn {
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  width: 88px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
}

.icon-btn:hover {
  border-color: var(--nordic-border-strong);
  background: var(--nordic-surface-subtle);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-graphic {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-graphic svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-primary);
}

.icon-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.2;
}

/* Windows OS Window Structure */
.os-window {
  position: absolute;
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-width: 320px;
  min-height: 200px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Window 8-Direction Resize Handles */
.resize-handle {
  position: absolute;
  z-index: 100;
  user-select: none;
}

.resize-handle-r { top: 0; right: -4px; width: 8px; height: 100%; cursor: e-resize; }
.resize-handle-b {
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 14px;
  cursor: s-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 105;
  touch-action: none;
}
.resize-indicator-bar {
  width: 36px;
  height: 4px;
  background: var(--nordic-border);
  border-radius: var(--radius-sharp);
  opacity: 0.6;
  transition: all 0.15s ease;
  pointer-events: none;
}
.os-window:hover .resize-indicator-bar,
.resize-handle-b:hover .resize-indicator-bar {
  opacity: 1;
  background: var(--text-primary);
  width: 52px;
}
.resize-handle-br { bottom: -6px; right: -6px; width: 16px; height: 16px; cursor: se-resize; touch-action: none; }
.resize-handle-l { top: 0; left: -4px; width: 8px; height: 100%; cursor: w-resize; }
.resize-handle-t { top: -4px; left: 0; width: 100%; height: 8px; cursor: n-resize; }
.resize-handle-tr { top: -6px; right: -6px; width: 16px; height: 16px; cursor: ne-resize; }
.resize-handle-bl { bottom: -6px; left: -6px; width: 16px; height: 16px; cursor: sw-resize; touch-action: none; }
.resize-handle-tl { top: -6px; left: -6px; width: 16px; height: 16px; cursor: nw-resize; }

body.is-resizing iframe,
body.is-dragging iframe,
.os-window.resizing iframe {
  pointer-events: none !important;
}

body.is-resizing,
body.is-dragging {
  user-select: none !important;
}

.os-window.hidden-win {
  display: none !important;
}


.os-window.minimized {
  transform: scale(0.9) translateY(40px);
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.os-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - 48px) !important;
  border-radius: 0;
}

/* Window Titlebar */
.os-titlebar {
  height: 36px;
  background: var(--nordic-surface-subtle);
  border-bottom: 1px solid var(--nordic-border);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
}

.os-titlebar:active {
  cursor: grabbing;
}

.os-window.active-win {
  border-color: var(--nordic-border-strong) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.os-window.active-win .os-titlebar {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-bottom-color: var(--accent-surface) !important;
}

.os-window.active-win .titlebar-title {
  color: var(--accent-text) !important;
}

.os-window.active-win .win-control-btn {
  color: var(--accent-text) !important;
}

.os-window.active-win .win-control-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.titlebar-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}


.titlebar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.win-control-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sharp);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-control-btn:hover {
  color: var(--text-primary);
  background: var(--nordic-border);
  border-color: var(--nordic-border);
}

.win-control-btn.close-btn:hover {
  background: #EF4444;
  border-color: #EF4444;
  color: #FFFFFF;
}

/* Window Body Content Area */
.os-window-body {
  flex: 1;
  overflow-y: overlay;
  overflow-y: auto;
  scrollbar-gutter: stable overlay;
  padding: 20px;
  background: var(--nordic-surface);
}

.os-window-body::-webkit-scrollbar-track {
  background: transparent !important;
}

/* Specific Window Sizes & Positions */
#win-profile {
  top: 40px;
  left: 140px;
  width: 440px;
  height: 480px;
  z-index: 50;
}

#win-portfolio {
  top: 40px;
  left: 600px;
  width: min(1480px, 58vw);
  height: min(950px, 68vh);
  min-width: 760px;
  min-height: 520px;
  z-index: 40;
}

#win-schedule {
  top: 40px;
  left: 200px;
  width: 860px;
  height: min(1100px, 85vh);
  z-index: 20;
}

#win-quote {
  top: 60px;
  left: 240px;
  width: 860px;
  height: min(1100px, 85vh);
  z-index: 20;
}

#win-profile.expanded-height,
#win-portfolio.expanded-height,
#win-schedule.expanded-height,
#win-quote.expanded-height,
.os-window.expanded-height {
  height: min(1600px, 92vh) !important;
}




/* Iframe Window Body Styling */
.iframe-body {
  padding: 0 !important;
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

.iframe-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--nordic-surface);
}

/* Profile Window UI Components */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.profile-avatar-wrapper {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sharp);
  border: 1px solid var(--nordic-border-strong);
  overflow: hidden;
  background: var(--nordic-surface-subtle);
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.profile-tag-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-bio-box {
  background: var(--nordic-surface-subtle);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  padding: 14px;
  width: 100%;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.email-copy-btn {
  background: var(--accent-surface);
  color: var(--accent-text);
  border: 1px solid var(--nordic-border-strong);
  border-radius: var(--radius-sharp);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.email-copy-btn:hover {
  opacity: 0.85;
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--nordic-surface-subtle);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.social-link-item:hover {
  border-color: var(--nordic-border-strong);
  background: var(--nordic-surface);
}

/* Gallery Grid Layout inside Windows */
/* Portfolio Window Internal Tab Navigation */
.portfolio-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--nordic-border);
}

/* Gallery Container & Month Sections */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.month-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.month-gallery-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

/* Minimal Month Divider (Fixed Style) */
.month-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 4px 0;
}

.minimal-line {
  flex: 1;
  height: 1px;
  background: var(--nordic-border);
}

.minimal-text {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--nordic-text);
  user-select: none;
  white-space: nowrap;
}



.portfolio-tab-btn {
  background: var(--nordic-surface);
  color: var(--text-muted);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.12s ease;
}

.portfolio-tab-btn:hover,
.portfolio-tab-btn.active {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent-surface) !important;
}

.portfolio-tab-btn.active::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--accent-text);
  border-radius: var(--radius-sharp);
}

.portfolio-tab-btn:hover .gallery-count-tag,
.portfolio-tab-btn.active .gallery-count-tag {
  background: rgba(255, 255, 255, 0.25) !important;
  color: var(--accent-text) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.portfolio-tab-content.hidden {
  display: none !important;
}

.gallery-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nordic-border);
}

.gallery-count-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--nordic-surface-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sharp);
  border: 1px solid var(--nordic-border);
  transition: all 0.12s ease;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  background: var(--nordic-surface-subtle);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gallery-item:hover {
  border-color: var(--nordic-border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-item.selected {
  outline: 2px solid var(--accent-surface) !important;
  outline-offset: 2px;
  border-color: var(--accent-surface) !important;
}

.gallery-item.selected::after {
  content: 'SELECTED';
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  background: var(--accent-surface);
  color: var(--accent-text);
  padding: 3px 8px;
  border-radius: var(--radius-sharp);
  z-index: 10;
}

.item-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .item-media img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.gallery-item:hover .play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.item-title {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox Modal (Nordic Glass-Cut) */
.sharp-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sharp-modal.active {
  opacity: 1;
  visibility: visible;
}

.sharp-modal-container {
  width: 100%;
  max-width: 900px;
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border-strong);
  border-radius: var(--radius-sharp);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.sharp-modal-header {
  height: 40px;
  background: var(--nordic-surface-subtle);
  border-bottom: 1px solid var(--nordic-border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.sharp-modal-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
}

.sharp-modal-body {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.sharp-modal-body iframe, .sharp-modal-body img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: contain;
}

/* ==========================================================================
   macOS Floating Glassmorphic Dock
   ========================================================================== */

.macos-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dock-apps-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-item {
  position: relative;
  min-width: 76px;
  height: 56px;
  padding: 8px 12px;
  border-radius: var(--radius-sharp);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--nordic-surface-subtle);
  border: 1px solid var(--nordic-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.dock-item:hover {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent-surface) !important;
}

.dock-item:active {
  transform: translateY(1px) !important;
}

.dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.dock-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  transition: stroke 0.12s ease;
}

.dock-item:hover .dock-icon svg,
.dock-item.is-active .dock-icon svg {
  stroke: var(--accent-text) !important;
}

/* Always-Visible Crisp Micro Dock Label */
.dock-label {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: 0.85;
  transition: all 0.12s ease;
  pointer-events: none;
}

.dock-item:hover .dock-label,
.dock-tray-btn:hover .dock-label,
.dock-item.is-active .dock-label {
  color: var(--accent-text) !important;
  opacity: 1;
}

.dock-dot {
  display: none;
}

.dock-item.is-active {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent-surface) !important;
  position: relative;
}

.dock-item.is-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-text);
}

/* Divider Line */
.dock-divider {
  width: 1px;
  height: 38px;
  background: var(--nordic-border);
  margin: 0 6px;
}

/* Tray Group */
.dock-tray-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-clock-display {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  white-space: nowrap;
}

.task-tab {
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.task-tab:hover {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent-surface) !important;
}

.task-tab.active {
  background: var(--accent-surface) !important;
  color: var(--accent-text) !important;
  border-color: var(--accent-surface) !important;
}

.task-tab.active::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent-text);
  border-radius: var(--radius-sharp);
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--nordic-border-strong);
  background: var(--nordic-surface-subtle);
}

.sys-clock-display {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border);
  border-radius: var(--radius-sharp);
}

/* Alert Box Modal (Nordic Sharp Copy Notification) */
.sharp-alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--nordic-surface);
  border: 1px solid var(--nordic-border-strong);
  border-radius: var(--radius-sharp);
  width: 320px;
  z-index: 100001;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.sharp-alert-box.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.sharp-alert-header {
  height: 32px;
  background: var(--nordic-surface-subtle);
  border-bottom: 1px solid var(--nordic-border);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.sharp-alert-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
}

.sharp-alert-footer {
  padding: 10px 16px 16px 16px;
  display: flex;
  justify-content: center;
}

.sharp-alert-confirm {
  background: var(--accent-surface);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sharp);
  padding: 8px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Responsive Media Queries for Mobile Screens */
@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100% !important;
  }

  .desktop-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .desktop-area {
    padding: 12px;
    padding-bottom: 88px !important;
    height: auto !important;
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .desktop-icons,
  .taskbar,
  .macos-dock {
    display: none !important;
  }

  #win-profile,
  #win-portfolio,
  #win-schedule,
  #win-quote,
  .os-window {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: auto !important;
    margin-bottom: 16px;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #win-profile.expanded-height,
  #win-portfolio.expanded-height,
  #win-schedule.expanded-height,
  #win-quote.expanded-height,
  .os-window.expanded-height {
    height: min(1400px, 85vh) !important;
  }

  .os-window-body {
    padding: 14px 10px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .portfolio-tab-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .portfolio-tab-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    font-size: 11px !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .gallery-count-tag {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }

  .os-window.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 48px) !important;
    z-index: 9999 !important;
  }

  .titlebar-title {
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .win-control-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .iframe-body {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 500px !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .os-window.maximized .iframe-body {
    height: calc(100vh - 48px - 36px) !important;
    min-height: unset !important;
    max-height: unset !important;
  }

  .iframe-body iframe {
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
    display: block !important;
    border: none !important;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .item-title {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }

  .taskbar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 99999 !important;
  }

  .sys-brand-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .theme-toggle-btn {
    padding: 6px 8px;
    font-size: 10px;
  }

  .sys-clock-display {
    display: none;
  }

  .social-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   New Feature Additions: External Link Button, Iframe Skeleton, Mobile Bottom Nav
   ========================================================================== */

/* External Link Button in Titlebar */
.win-control-btn.external-link-btn {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
}
.win-control-btn.external-link-btn:hover {
  background-color: var(--accent-surface);
  color: var(--accent-text);
}

/* Iframe Body & Skeleton Loader */
.os-window-body.iframe-body {
  position: relative;
}

.iframe-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--nordic-surface);
  z-index: 10;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

.iframe-skeleton.loaded {
  opacity: 0;
  visibility: hidden;
}

.skeleton-bar {
  width: 40%;
  height: 24px;
  background: var(--nordic-surface-subtle);
  border-radius: var(--radius-sharp);
  animation: skeleton-shimmer 1.5s infinite linear;
}

.skeleton-block {
  width: 100%;
  height: 120px;
  background: var(--nordic-surface-subtle);
  border-radius: var(--radius-sharp);
  animation: skeleton-shimmer 1.5s infinite linear;
}

.skeleton-block.short {
  height: 60px;
  width: 80%;
}

@keyframes skeleton-shimmer {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.4;
  }
}

/* Mobile Floating Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 99990;
    background: var(--nordic-surface);
    border: 1px solid var(--nordic-border);
    border-radius: var(--radius-sharp);
    padding: 6px 8px;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    width: calc(100vw - 24px);
    max-width: 440px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .mobile-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-btn {
    flex: 1 1 0px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    gap: 3px;
    background: var(--nordic-surface-subtle);
    border: 1px solid var(--nordic-border);
    border-radius: var(--radius-sharp);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.12s ease;
  }

  .mobile-nav-btn span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .mobile-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    transition: stroke 0.12s ease;
    flex-shrink: 0;
  }

  .mobile-nav-btn:hover,
  .mobile-nav-btn.active {
    background: var(--accent-surface) !important;
    color: var(--accent-text) !important;
    border-color: var(--accent-surface) !important;
  }

  .mobile-nav-btn:hover svg,
  .mobile-nav-btn.active svg {
    stroke: var(--accent-text) !important;
  }

  .mobile-nav-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-text);
  }
}

/* Accessibility Focus Ring (Strict 2px Hairline) */
*:focus-visible {
  outline: 2px solid var(--accent-surface) !important;
  outline-offset: 2px;
}

/* Micro Click Feedback Interaction */
.btn-sharp-primary:active,
.btn-sharp-outline:active,
.social-link-item:active,
.gallery-item:active,
.portfolio-tab-btn:active {
  transform: translateY(1px);
}

/* ==========================================================================
   Language Selector System (i18n UI)
   ========================================================================== */
.lang-selector {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px;
  border-radius: var(--radius-sharp);
  border: 1px solid var(--nordic-border);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sharp);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.08);
}

.lang-btn.active {
  background: var(--accent-surface);
  color: var(--accent-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Mobile Top Floating Language Switcher Pill
   ========================================================================== */
.mobile-top-lang-pill {
  display: none;
}

@media (max-width: 768px) {
  .mobile-top-lang-pill {
    display: block;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 99999;
  }

  .mobile-lang-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--nordic-glass);
    border: 1px solid var(--nordic-border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .mobile-lang-pill-btn:active {
    transform: scale(0.96);
  }

  .pill-arrow {
    font-size: 9px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
  }

  .mobile-top-lang-pill.active .pill-arrow {
    transform: rotate(180deg);
  }

  .mobile-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 130px;
    background: var(--nordic-surface);
    border: 1px solid var(--nordic-border);
    border-radius: var(--radius-sharp);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-top-lang-pill.active .mobile-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .lang-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.12s ease;
  }

  .lang-dropdown-item:hover,
  .lang-dropdown-item.active {
    background: var(--nordic-surface-subtle);
    color: var(--text-primary);
    font-weight: 700;
  }

  .lang-dropdown-item.active::after {
    content: '✓';
    margin-left: 4px;
    font-weight: 700;
  }

  .lang-code-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
  }

  .os-window {
    touch-action: pan-y;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  }

  .os-titlebar {
    touch-action: none;
    padding-top: 4px;
  }

  .mobile-bottom-nav {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
  }

  .mobile-nav-btn {
    min-height: 44px;
  }

  .win-control-btn {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}











/* ==========================================
 * No-Promo Mode Override (Activated when ?nopromo=true)
 * ========================================== */
html.no-promo .profile-bio-box,
html.no-promo .email-copy-btn,
html.no-promo .social-links-grid {
  display: none !important;
}
