@import url('https://fonts.cdnfonts.com/css/sf-pro-display');

:root {
  --font-mac: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hand: 'Homemade Apple', 'Caveat', 'Gochi Hand', cursive;

  --bg-workspace: #ffffff;
  --text-dark: #2d3748;
  --text-muted: #5e5e62;

  --win-bg: #ffffff;
  --win-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  --win-border: 1px solid #dcdcdc;

  --titlebar-bg: linear-gradient(180deg, #f5f5f7, #e8e8ed);
  --titlebar-border: 1px solid #dcdcdc;
  --titlebar-text: #4a4a4a;

  --menubar-bg: rgba(255, 255, 255, 0.85);
  --menubar-border: 1px solid #e5e5e5;
  --menubar-text: #2d3748;

  --card-bg: #fafafa;
  --card-border: 1px solid #e5e5e5;
  --card-hover: #f1f1f3;
  --divider-color: #e5e5e5;
  --input-bg: #ffffff;
  --input-border: #dcdcdc;
  --input-text: #2d3748;

  --folder-text: #2d3748;
  --scroll-thumb: rgba(0, 0, 0, 0.12);
  --scroll-thumb-hover: rgba(0, 0, 0, 0.24);

  /* Photo Booth Theme Variables (Light) */
  --pb-body-bg: #f5f5f7;
  --pb-toolbar-bg: #e3e3e7;
  --pb-toolbar-border: #dcdcdc;
  --pb-text: #2d3748;
  --pb-toggle-active: #ffffff;
  --pb-toggle-hover: rgba(0, 0, 0, 0.05);
  --pb-toggle-color: #555555;
}

body.dark-mode {
  --bg-workspace: #1a1a1a;
  --text-dark: #ffffff;
  --text-muted: #cbd5e1;

  --win-bg: #282828;
  --win-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
  --win-border: 1px solid #3d3d3d;

  --titlebar-bg: linear-gradient(180deg, #3a3a3a, #2f2f2f);
  --titlebar-border: 1px solid #232323;
  --titlebar-text: #e1e1e1;

  --menubar-bg: rgba(45, 45, 45, 0.85);
  --menubar-border: 1px solid #3d3d3d;
  --menubar-text: #ffffff;

  --card-bg: #323232;
  --card-border: 1px solid #454545;
  --card-hover: #3d3d3d;
  --divider-color: #454545;
  --input-bg: #1e1e1e;
  --input-border: #3d3d3d;
  --input-text: #ffffff;

  --folder-text: #ffffff;
  --scroll-thumb: rgba(255, 255, 255, 0.2);
  --scroll-thumb-hover: rgba(255, 255, 255, 0.35);

  /* Photo Booth Theme Variables (Dark) */
  --pb-body-bg: #282828;
  --pb-toolbar-bg: #313131;
  --pb-toolbar-border: #232323;
  --pb-text: #ffffff;
  --pb-toggle-active: #1e1e1e;
  --pb-toggle-hover: rgba(255, 255, 255, 0.1);
  --pb-toggle-color: #cccccc;
}

.hide {
  display: none !important;
}

/* Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-mac);
  color: var(--text-dark);
  background: var(--bg-workspace);
}

/* Workspace Background */
.mac-workspace {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: var(--bg-workspace);
  background-image: none;
  background-size: 24px 24px;
  overflow: hidden;
}

body.dark-mode .mac-workspace {
  background-image: none;
}

/* macOS Top Menu Bar (Clean & Semi-transparent) */
.mac-menu-bar {
  width: 100%;
  height: 26px;
  background-color: var(--menubar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--menubar-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  font-size: 13.5px;
  color: var(--menubar-text);
}

.menu-bar-left,
.menu-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-item {
  cursor: pointer;
}

.menu-item.bold {
  font-weight: 600;
}

.menu-icon {
  font-size: 12px;
  cursor: pointer;
}

.theme-svg-img {
  width: 16px;
  height: 16px;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.theme-svg-img:hover {
  transform: scale(1.1);
}

body.dark-mode .theme-svg-img {
  filter: invert(1) brightness(2);
}

/* Desktop Folders Style & Custom Spacing */
.folders-row {
  display: contents;
}

.mac-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  width: 160px;
  transition: transform 0.15s ease;
  position: absolute;
  z-index: 10;
}

.mac-folder:hover {
  transform: scale(1.05);
}

.folder-img-custom {
  width: 136px;
  height: 104px;
  object-fit: contain;
}

.folder-label {
  color: var(--folder-text);
  font-size: 14.5px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.mac-folder:active .folder-label {
  background-color: rgba(0, 122, 255, 0.15);
  border-radius: 2px;
}

/* Individual folder placements (Mockup Staggered/Arc layout) */
.folder-about {
  top: calc(50% - 240px);
  left: 7%;
}

.folder-projects {
  top: calc(50% - 50px);
  left: 1%;
}

.folder-skills {
  top: calc(50% + 140px);
  left: 7%;
}

.folder-faq {
  top: calc(50% - 240px);
  right: 7%;
}

.folder-contact {
  top: calc(50% - 50px);
  right: 1%;
}

.folder-links {
  top: calc(50% + 140px);
  right: 7%;
}

/* WINDOW ARCHITECTURE */
.mac-window {
  position: absolute;
  background-color: var(--win-bg);
  border-radius: 8px;
  box-shadow: var(--win-shadow);
  border: var(--win-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.mac-window.active-window {
  z-index: 500;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.18);
}

.window-header {
  height: 32px;
  background: var(--titlebar-bg);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
  border-bottom: var(--titlebar-border);
  flex-shrink: 0;
  cursor: move;
}

.header-controls {
  display: flex;
  gap: 6px;
  position: absolute;
  left: 12px;
}

.control-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  cursor: pointer;
}

.control-dot.red {
  background-color: #ff5f56;
  border: 0.5px solid #e0443e;
}

.control-dot.yellow {
  background-color: #ffbd2e;
  border: 0.5px solid #dfa123;
}

.control-dot.green {
  background-color: #27c93f;
  border: 0.5px solid #1fa730;
}

.window-title {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--titlebar-text);
}

.window-body {
  flex-grow: 1;
  overflow: auto;
  background-color: var(--win-bg);
}

/* CENTER WELCOME APP CONTAINER */
.center-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  max-width: calc(100vw - 260px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.static-welcome-window {
  width: 100%;
  height: 420px;
  position: static;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.welcome-body-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px;
}

.welcome-text-handwritten {
  font-family: var(--font-hand);
  font-size: 38px;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hand-line {
  display: block;
}

.hand-line.text-middle {
  font-size: 28px;
  opacity: 0.9;
  margin: 6px 0;
}

.welcome-subtext {
  font-size: 14.5px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 8px;
  font-weight: 500;
}

/* Static Welcome Window Footer/Shutter Bar matching macOS Photo Booth */
.welcome-footer {
  height: 48px;
  background: var(--titlebar-bg);
  border-top: var(--titlebar-border);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.enable-photobooth-btn {
  background-color: #5c9bdd;
  color: #ffffff;
  border: none;
  padding: 7px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(109, 179, 253, 0.2);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.enable-photobooth-btn:hover {
  background-color: #57a4fa;
  box-shadow: 0 2px 6px rgba(109, 179, 253, 0.35);
  transform: translateY(-1px);
}

.enable-photobooth-btn:active {
  background-color: #3b91f5;
  transform: translateY(0);
}

.camera-launcher-shortcut {
  background-color: var(--card-bg);
  border: var(--card-border);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.camera-launcher-shortcut:hover {
  background-color: var(--card-hover);
  color: var(--text-dark);
}

/* Desktop Footer text directly on the white background */
.desktop-footer-text {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  z-index: 5;
}

/* DETAILS POPUP WINDOWS */
.details-window .window-body.text-window-body {
  padding: 20px;
}

.section-title-custom {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 8px;
}

.section-paragraph {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dark);
  margin-bottom: 12px;
}

/* Projects Window custom item lists */
.projects-list-custom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#win-projects .section-title-custom {
  text-align: center;
  border-bottom: none;
  margin-bottom: 20px;
}

.project-entry-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 102, 103, 0.65);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 12px 54px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: #ffffff;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.project-entry-custom:hover {
  background: rgba(20, 20, 25, 0.75);
  transform: scale(1.025);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.project-left-icon-img {
  position: absolute;
  left: 20px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-center-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.project-title-text {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.project-desc-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

.project-right-dots {
  position: absolute;
  right: 20px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
  line-height: 1;
}

/* Skills Window Sections (Col/Row grids matching Mac/iOS) */
.skills-sections-container {
  display: flex;
  gap: 28px;
  width: 100%;
}

.skills-section-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skills-section-hdr {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 6px;
}

.skills-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.skill-tag-pill {
  font-family: var(--font-mac);
  font-size: 14.5px;
  font-weight: 600;
  color: #4a5568;
  background-color: #ffffff;
  border: 1px solid #dcdcdc;
  padding: 8px 18px;
  border-radius: 24px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .skill-tag-pill {
  background-color: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border-color: #3d3d3d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.skill-tag-pill:hover {
  background-color: #f5f5f7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

body.dark-mode .skill-tag-pill:hover {
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

/* FAQ Window lists */
.faq-ios-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.faq-ios-item {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

body.dark-mode .faq-ios-item {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.faq-ios-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.faq-ios-header:hover {
  background-color: var(--card-hover);
}

.faq-ios-q {
  font-family: var(--font-mac);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.15px;
  text-transform: lowercase;
}

body.dark-mode .faq-ios-q {
  color: var(--text-dark);
}

.faq-ios-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

body.dark-mode .faq-ios-chevron {
  color: var(--text-muted);
}

.faq-ios-item.open .faq-ios-chevron {
  transform: rotate(180deg);
}

.faq-ios-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-ios-a {
  padding: 0 18px 14px 18px;
  font-family: var(--font-mac);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

body.dark-mode .faq-ios-a {
  color: var(--text-muted);
}

/* Cozy Contact Card (Mockup style) */
.contact-window-body {
  background-color: var(--win-bg) !important;
  color: #000000 !important;
  padding: 24px !important;
}

body.dark-mode .contact-window-body {
  background-color: var(--win-bg) !important;
  color: #ffffff !important;
}

.contact-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
}

.contact-card-title {
  font-family: var(--font-mac);
  font-size: 26px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  letter-spacing: -0.5px;
}

body.dark-mode .contact-card-title {
  color: #ffffff;
}

.contact-card-desc {
  font-size: 15px;
  line-height: 1.5;
  color: #000000;
  margin: 0;
  max-width: 400px;
  font-weight: 400;
}

body.dark-mode .contact-card-desc {
  color: #ffffff;
}

.contact-card-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.contact-card-img {
  width: 240px;
  height: 180px;
  object-fit: contain;
  margin-top: -50px;
  margin-bottom: -50px;
}

.contact-card-email-info {
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  margin: 0;
}

body.dark-mode .contact-card-email-info {
  color: #ffffff;
}

.contact-card-link {
  color: #000000;
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.contact-card-link:hover {
  opacity: 0.8;
}

body.dark-mode .contact-card-link {
  color: #ffffff;
}

.contact-card-btn-wrapper {
  margin-top: 4px;
}

.contact-card-btn {
  display: inline-block;
  background-color: #5c9bdd;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(109, 179, 253, 0.2);
  transition: all 0.15s ease;
  cursor: pointer;
}

.contact-card-btn:hover {
  background-color: #57a4fa;
  box-shadow: 0 4px 12px rgba(109, 179, 253, 0.35);
  transform: translateY(-1px);
}

.contact-card-btn:active {
  background-color: #3b91f5;
  transform: translateY(0);
}

/* Cozy Links Grid (Mockup & Launchpad style) */
.links-window-body {
  background-color: var(--win-bg) !important;
  color: var(--text-dark) !important;
  padding: 26px 24px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.links-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: 100%;
  justify-items: center;
}

.link-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
  width: 100%;
  max-width: 90px;
  transition: transform 0.2s ease;
}

.link-grid-item:hover {
  transform: translateY(-2px);
}

.link-grid-icon {
  width: 76px;
  height: 76px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-grid-item:hover .link-grid-icon {
  background-color: var(--card-hover);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  color: #616263;
  /* macOS blue accent */
}

body.dark-mode .link-grid-icon {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.link-grid-icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.link-grid-label {
  font-family: var(--font-mac);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: lowercase;
  letter-spacing: 0.2px;
  color: var(--text-muted);
}

.link-grid-item:hover .link-grid-label {
  color: var(--text-dark);
}

.links-footer-note {
  font-family: var(--font-mac);
  width: 100%;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 11px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.1px;
  margin-top: 10px;
}

/* About Window Premium Card Format (Mockup matching) */
.about-window-body {
  padding: 24px 24px 12px 24px !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
}

.profile-role {
  font-size: 13px;
  color: var(--text-muted);
}

.about-divider {
  height: 1px;
  background-color: var(--divider-color);
  margin: 20px 0;
  width: 100%;
  flex-shrink: 0;
}

.about-details {
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom scrollbar for details area */
.about-details::-webkit-scrollbar {
  width: 6px;
}

.about-details::-webkit-scrollbar-track {
  background: transparent;
}

.about-details::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 3px;
}

.about-details::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

.bio-intro {
  margin-bottom: 20px;
  color: var(--text-dark);
}

.about-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text-dark);
  letter-spacing: 0.5px;
  border-bottom: 1px dashed var(--divider-color);
  padding-bottom: 4px;
}

.about-bullets {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-bullets li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dark);
}

.about-bullets li::before {
  content: "•";
  color: var(--text-dark);
  font-weight: bold;
  font-size: 18px;
  position: absolute;
  left: 4px;
  top: -2px;
}

.highlight {
  color: var(--text-dark);
  font-weight: 600;
}

/* PHOTO BOOTH APP WINDOW (Draggable Modal app) */
.photobooth-body {
  background-color: var(--pb-body-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden !important;
}

.photobooth-screen-container {
  width: 100%;
  flex-grow: 1;
  min-height: 240px;
  background-color: #000;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#webcam-video,
#photo-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcam-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  text-align: center;
}

.fallback-graphic {
  font-size: 40px;
  margin-bottom: 8px;
}

.fallback-status {
  font-weight: 600;
  font-size: 14px;
  color: #f3f4f6;
  margin-bottom: 2px;
}

.fallback-note {
  font-size: 11px;
  max-width: 220px;
}

/* Shutter flash animation */
.shutter-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  opacity: 0;
  z-index: 15;
  pointer-events: none;
}

.shutter-flash.flash-active {
  animation: flash-animation 0.4s ease-out;
}

@keyframes flash-animation {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Countdown Overlay */
.countdown-overlay {
  position: absolute;
  font-size: 64px;
  font-weight: 700;
  color: #fff;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.4);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
  animation: zoom-pulse 1s infinite;
}

@keyframes zoom-pulse {
  0% {
    transform: scale(0.9);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(0.9);
  }
}

/* Filmstrip snapping reel */
.filmstrip-container {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 8px;
  overflow-x: auto;
}

.filmstrip {
  display: flex;
  gap: 8px;
  height: 70px;
  align-items: center;
}

.filmstrip-thumb {
  width: 90px;
  height: 60px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filmstrip-thumb.empty-thumb {
  font-size: 10px;
  color: var(--text-muted);
  border: 1px dashed var(--input-border);
}

.thumb-del-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 5;
}

/* Shutter camera trigger controls */
.photobooth-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 52px;
  background-color: var(--pb-toolbar-bg);
  border-top: 1px solid var(--pb-toolbar-border);
  margin: 0 -12px -12px -12px;
  padding: 0 16px;
}

.photobooth-toggles-left {
  display: flex;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 6px;
}

body.dark-mode .photobooth-toggles-left {
  background-color: rgba(255, 255, 255, 0.05);
}

.pb-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  border-radius: 4px;
  color: var(--pb-toggle-color);
  cursor: pointer;
}

.pb-toggle-icon:hover {
  background-color: var(--pb-toggle-hover);
}

.pb-toggle-icon.active {
  background-color: var(--pb-toggle-active);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
}

.shutter-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #ef4444;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease, background-color 0.1s ease;
  padding: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.shutter-btn:hover {
  background-color: #f87171;
}

.shutter-btn:active {
  transform: translateX(-50%) scale(0.92);
  background-color: #dc2626;
}

.photobooth-effects-btn {
  background-color: var(--pb-toggle-active);
  border: none;
  color: var(--text-dark);
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
}

.photobooth-effects-btn:hover {
  background-color: var(--pb-toggle-hover);
  color: var(--text-dark);
}

/* Filter Selection Bar placed in toolbar */
.photobooth-filter-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 20px;
}

body.dark-mode .photobooth-filter-selector {
  background-color: rgba(255, 255, 255, 0.05);
}

.filter-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--pb-toggle-color);
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text-dark);
}

.filter-pill.active {
  background-color: var(--pb-toggle-active);
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* CSS filters for video viewport */
.filter-sepia {
  filter: sepia(0.8) contrast(1.1) brightness(0.95);
}

.filter-soft {
  filter: contrast(0.85) brightness(1.05) saturate(0.9);
}

.filter-original {
  filter: none;
}


/* Mobile Notice Default Hidden */
.mobile-notice {
  display: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1370px) {
  .mac-menu-bar {
    display: flex !important;
  }

  .desktop-only {
    display: none;
  }

  /* Workspace Layout on Mobile */
  .mac-workspace {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 42px 16px 15px 16px !important;
    height: 100% !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Split Folders Rows */
  .folders-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 5px 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    height: 110px !important;
  }

  .mac-folder {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 85px !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    transition: transform 0.15s ease !important;
  }

  body.dark-mode .mac-folder {
    box-shadow: none !important;
  }

  .mac-folder:hover {
    transform: scale(1.05) !important;
    background-color: transparent !important;
  }

  .folder-img-custom {
    width: 72px !important;
    height: 55px !important;
    object-fit: contain !important;
    margin-bottom: 4px !important;
  }

  .folder-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    text-shadow: none !important;
    margin-top: 0 !important;
    text-transform: lowercase !important;
  }

  /* Folder Stagger positions */
  .top-folders .folder-projects {
    transform: translateY(-16px) !important;
  }

  .bottom-folders .folder-contact {
    transform: translateY(16px) !important;
  }

  /* Center Profile Area (Welcome Screen) */
  .center-container {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .static-welcome-window {
    background-color: var(--win-bg) !important;
    border: var(--win-border) !important;
    box-shadow: var(--win-shadow) !important;
    border-radius: 8px !important;
    height: 270px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .static-welcome-window .window-header {
    display: flex !important;
    height: 32px !important;
    background: var(--titlebar-bg) !important;
    border-bottom: var(--titlebar-border) !important;
    align-items: center !important;
    padding: 0 12px !important;
  }

  .static-welcome-window .window-body {
    background-color: var(--win-bg) !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
  }

  .welcome-text-handwritten {
    font-size: 32px !important;
    margin-bottom: 8px !important;
    font-family: var(--font-hand) !important;
    color: var(--text-dark) !important;
    line-height: 1.3 !important;
  }

  .welcome-subtext {
    font-size: 14px !important;
    margin-bottom: 0 !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
  }

  .welcome-footer {
    display: flex !important;
    height: 48px !important;
    background: var(--titlebar-bg) !important;
    border-top: var(--titlebar-border) !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    position: relative !important;
    bottom: auto !important;
    z-index: 10 !important;
    padding: 0 !important;
  }

  .desktop-footer-text {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 10px !important;
    font-size: 11px !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    text-align: center !important;
    z-index: 5 !important;
  }

  /* Desktop Windows on Mobile (Centered with no animation) */
  .mac-window:not(.static-welcome-window) {
    width: 90% !important;
    max-width: 620px !important; /* Prevent horizontal stretching */
    height: auto !important;
    max-height: 85% !important;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    position: fixed !important;
    transform: translate(-50%, -50%) !important;
    transition: none !important; /* No slide-up animation */
    border-radius: 12px !important;
    border: var(--win-border) !important;
    box-shadow: var(--win-shadow) !important;
    z-index: 2000 !important;
  }

  .mac-window:not(.static-welcome-window).open-active {
    transform: translate(-50%, -50%) !important;
  }

  .mac-window:not(.static-welcome-window).maximized {
    width: 100% !important;
    max-width: none !important; /* Overrides tablet max-width cap */
    left: 0 !important;
    top: 26px !important;
    height: calc(100vh - 26px) !important;
    max-height: calc(100vh - 26px) !important;
    border-radius: 0 !important;
    transform: none !important; /* Overrides tablet transform */
    box-shadow: none !important;
  }

  .mac-window:not(.static-welcome-window).maximized .window-header {
    border-radius: 0 !important;
  }

  .mac-window:not(.static-welcome-window).maximized .window-body {
    flex-grow: 1 !important;
    height: auto !important;
    max-height: none !important; /* Overrides tablet max-height caps */
    border-radius: 0 !important;
    overflow-y: auto !important;
  }

  .mac-window:not(.static-welcome-window) .window-header {
    background: var(--titlebar-bg) !important;
    border-bottom: var(--titlebar-border) !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    position: relative !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
  }

  .mac-window:not(.static-welcome-window) .window-header .header-controls {
    display: flex !important;
    gap: 6px !important;
    position: absolute !important;
    left: 12px !important;
  }

  .mac-window:not(.static-welcome-window) .window-title {
    text-align: center !important;
    color: var(--titlebar-text) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    margin: 0 !important;
  }

  .mac-window:not(.static-welcome-window) .window-header::after {
    display: none !important;
  }

  .mac-window:not(.static-welcome-window) .window-body {
    height: auto !important;
    max-height: calc(85vh - 32px) !important; /* subtract 32px header */
    overflow-y: auto !important;
    border-radius: 0 0 8px 8px !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Mobile Notice Styling full width bottom sheet */
  .mobile-notice {
    display: flex;
    position: fixed;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    background-color: var(--win-bg);
    border: none !important;
    border-top: 1px solid var(--card-border) !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    animation: slideUpNotice 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  body.dark-mode .mobile-notice {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  .mobile-notice-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
  }

  .mobile-notice-title {
    font-family: var(--font-mac);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
  }

  .mobile-notice-desc {
    font-family: var(--font-mac);
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted);
  }

  .mobile-notice-btn {
    background-color: #5c9bdd;
    color: #ffffff;
    font-family: var(--font-mac);
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
  }

  .mobile-notice-btn:hover {
    background-color: #57a4fa;
  }

  /* Photo Booth Toolbar Layout on Mobile to prevent overlap */
  .photobooth-toolbar {
    padding: 0 10px !important;
    height: 48px !important;
  }

  .photobooth-filter-selector {
    gap: 4px !important;
    padding: 2px !important;
  }

  .filter-pill {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }

  .photobooth-effects-btn {
    padding: 4px 10px !important;
    font-size: 10px !important;
  }

  .shutter-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .shutter-btn:active {
    transform: translateX(-50%) scale(0.92) !important;
  }

  /* Filmstrip mobile view size adjustments */
  .filmstrip-container {
    padding: 6px !important;
  }

  .filmstrip {
    height: 60px !important;
    gap: 6px !important;
  }

  .filmstrip-thumb {
    flex: 1 !important;
    width: auto !important;
    height: 50px !important;
  }

  .filmstrip-thumb.empty-thumb {
    font-size: 10px !important;
  }

  .thumb-del-btn {
    width: 14px !important;
    height: 14px !important;
    font-size: 10px !important;
    top: 2px !important;
    right: 2px !important;
  }

  /* Overrides to prevent horizontal scrolling on mobile/tablet viewports */
  .links-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .skills-sections-container {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* TABLET SPECIFIC OVERRIDES (768px to 1024px) - Like Mobile but Bigger & iPad Pro Optimized */
  @media (min-width: 768px) {

    /* Workspace spacing distribution for tall iPad / iPad Pro screens */
    .mac-workspace {
      padding: 76px 40px 40px 40px !important;
      justify-content: space-around !important;
      /* spreads elements with even vertical gaps */
    }

    /* Top Menu Bar Upscaling on Tablet */
    .mac-menu-bar {
      height: 48px !important;
      font-size: 20px !important;
      padding: 0 24px !important;
    }
    .menu-bar-left,
    .menu-bar-right {
      gap: 24px !important;
    }
    #theme-toggle {
      width: 26px !important;
      height: 26px !important;
    }
    .theme-svg-img {
      width: 24px !important;
      height: 24px !important;
    }

    /* Maximized window adjustment for taller menu bar on Tablet */
    .mac-window:not(.static-welcome-window).maximized {
      top: 48px !important;
      height: calc(100vh - 48px) !important;
      max-height: calc(100vh - 48px) !important;
    }

    /* Home Folders Row size upscaling */
    .folders-row {
      max-width: 800px !important;
      height: 200px !important;
      margin: 10px 0 !important;
    }

    .mac-folder {
      width: 180px !important;
    }

    .folder-img-custom {
      width: 144px !important;
      height: 110px !important;
    }

    .folder-label {
      font-size: 20px !important;
      margin-top: 10px !important;
    }

    .top-folders .folder-projects {
      transform: translateY(-25px) !important;
    }

    .bottom-folders .folder-contact {
      transform: translateY(25px) !important;
    }

    /* Center Welcome Area Upscaling */
    .center-container {
      max-width: 640px !important;
      margin: 15px 0 !important;
    }

    .static-welcome-window {
      height: 420px !important;
    }

    .static-welcome-window .window-header {
      height: 42px !important;
    }

    .static-welcome-window .window-header .window-title {
      font-size: 16px !important;
    }

    .welcome-text-handwritten {
      font-size: 58px !important;
      margin-bottom: 16px !important;
    }

    .welcome-subtext {
      font-size: 24px !important;
    }

    .enable-photobooth-btn {
      font-size: 21px !important;
      padding: 14px 36px !important;
      border-radius: 24px !important;
    }

    .welcome-footer {
      height: 72px !important;
    }

    /* Popup Windows Upscaling on Tablet */
    .mac-window:not(.static-welcome-window) {
      width: 95% !important;
      max-width: 650px !important; /* Prevent horizontal stretching on tablet/iPad */
      height: auto !important;
      max-height: 92% !important;
      left: 50% !important;
      top: 50% !important;
      transform: translate(-50%, -50%) !important;
    }

    .mac-window:not(.static-welcome-window) .window-header {
      height: 42px !important;
    }

    .mac-window:not(.static-welcome-window) .window-header .window-title {
      font-size: 16px !important;
    }

    .mac-window:not(.static-welcome-window) .window-body {
      height: auto !important;
      max-height: calc(92vh - 42px) !important; /* subtract 42px header */
      padding: 48px 40px !important;
    }

    /* Details window typography & component upscaling on Tablet */
    .profile-avatar {
      width: 160px !important;
      height: 160px !important;
    }

    .profile-name {
      font-size: 44px !important;
    }

    .profile-role {
      font-size: 22px !important;
    }

    .bio-intro,
    .about-bullets li,
    .faq-ios-a,
    .links-footer-note {
      font-size: 20px !important;
      line-height: 1.6 !important;
    }

    .about-section-title {
      font-size: 24px !important;
      margin-top: 36px !important;
    }

    /* Project entries upscaling */
    .project-entry-custom {
      padding: 22px 70px !important;
      border-radius: 45px !important;
    }

    .project-title-text {
      font-size: 20px !important;
    }

    .project-desc-text {
      font-size: 15px !important;
    }

    .project-left-icon-img {
      width: 40px !important;
      height: 40px !important;
    }

    /* Skills window upscaling */
    .skill-tag-pill {
      font-size: 22px !important;
      padding: 16px 32px !important;
      border-radius: 32px !important;
    }

    .skills-section-hdr {
      font-size: 18px !important;
    }

    /* Socials grid upscaling */
    .link-grid-icon {
      width: 120px !important;
      height: 120px !important;
      border-radius: 26px !important;
    }

    .link-grid-icon svg,
    .link-grid-icon img {
      transform: scale(1.5) !important;
    }

    .link-grid-item span {
      font-size: 20px !important;
    }

    .links-grid-container {
      gap: 32px !important;
    }

    /* Mobile Notice Upscaling on Tablet */
    .mobile-notice {
      padding: 24px 30px !important;
    }

    .mobile-notice-title {
      font-size: 20px !important;
    }

    .mobile-notice-desc {
      font-size: 16px !important;
    }

    .mobile-notice-btn {
      font-size: 17px !important;
      padding: 12px 28px !important;
      border-radius: 10px !important;
    }
  }
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes slideUpNotice {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}