/* =========================================
   OLD WINDOWS ON A CRT TV
   Classic Windows 3.1 / 95 / 98 palette
   ========================================= */

@font-face {
  font-family: 'FFFFORWA';
  src: url('../assets/fonts/FFFFORWA.TTF') format('truetype');
}

:root {
  /* ── Classic Windows palette ── */
  --win-desktop:    #008080;   /* Iconic teal desktop */
  --win-face:       #c0c0c0;   /* Silver window/button face */
  --win-shadow:     #808080;   /* 3D shadow edge */
  --win-dark:       #404040;   /* Darker shadow / text */
  --win-hilight:    #ffffff;   /* 3D highlight edge */
  --win-title:      #000080;   /* Title bar navy */
  --win-title-end:  #1084d0;   /* Title bar gradient end */
  --win-text:       #000000;   /* Window body text */
  --win-white-text: #ffffff;   /* Text on title bar / desktop */
  --win-select:     #000080;   /* Selection blue */
  --win-gray-text:  #808080;   /* Disabled / subdued text */

  /* ── CRT bezel ── */
  --crt-border-size:  20px;
  --crt-border-color: #1a1a1a;
}

/* =========================================
   BASE
   ========================================= */

*,
*::before,
*::after { box-sizing: border-box; }

body {
  font-family: 'Press Start 2P', 'FFFFORWA', 'Courier New', monospace;
  font-size: 11px;
  line-height: 2;
  color: var(--win-white-text);
  min-height: 100vh;
  margin: 0;
  cursor: url('../assets/icons/cursor.png'), auto;
  overflow-x: hidden;
}

img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.clickable {
  cursor: url('../assets/icons/cursor_click.png'), pointer;
}

/* =========================================
   CRT MONITOR BORDER
   ========================================= */

.crt-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  border-radius: 0;
  overflow: hidden;
}

.crt-inner-ring {
  position: absolute;
  top: var(--crt-border-size);
  left: var(--crt-border-size);
  right: var(--crt-border-size);
  bottom: var(--crt-border-size);
  border-radius: 14px;
  border: 2px solid #555;
  pointer-events: none;
  box-shadow:
    0 0 0 calc(var(--crt-border-size) + 80px) var(--crt-border-color),
    0 0 0 calc(var(--crt-border-size) + 82px) #333,
    inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Teal atmosphere tint — same layer as scan lines */
.teal-tint {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 80, 80, 0.35);
  pointer-events: none;
}

.scan-lines {
  position: fixed;
  inset: 0;
  z-index: 1;   /* above background, below content (z-index 10) */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.3) 50%
  );
  background-size: 100% 5px;
  pointer-events: none;
  opacity: 0.55;
  animation: scanline 10s linear infinite;
}

@keyframes scanline {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

.crt-glow {
  position: fixed;
  inset: 0;
  z-index: 1;   /* same layer as scan lines */
  background: radial-gradient(
    ellipse at center,
    rgba(0, 128, 255, 0.06) 0%,
    rgba(0,   0,   0, 0.00) 70%
  );
  pointer-events: none;
  animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1.0; }
}

/* =========================================
   LOADING OVERLAY
   ========================================= */

#loading-overlay {
  position: fixed;
  inset: 0;
  background: #000 url('../assets/images/static.gif') no-repeat center / cover;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: var(--win-white-text);
  text-shadow: 2px 2px 0 #000;
  animation: flicker 1.5s infinite;
  text-align: center;
  line-height: 2;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  48%       { opacity: 1; }
  50%       { opacity: 0.3; }
  52%       { opacity: 1; }
}

/* =========================================
   CONTENT + ROTATING BACKGROUND
   ========================================= */

.main-content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.content-visible { opacity: 1; }

.content-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  margin: var(--crt-border-size);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Fixed teal desktop — never scrolls or bounces */
.background-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background-color: var(--win-desktop);
  background-image: url('../assets/images/win95-bricks.png');
  background-repeat: repeat;
  background-blend-mode: multiply;
}

.background-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  filter: brightness(0.55) saturate(0.4);
  overflow: hidden;
}

/* MP4 video backgrounds — fills layer like background-size: cover */
.background-layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.background-layer.active        { opacity: 0.65; }
.background-layer.static-active { opacity: 0.75; filter: brightness(0.7) saturate(0); }

/* =========================================
   STICKY NOTES → Win95 dialog windows
   ========================================= */

.sticky-notes-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.sticky-note {
  position: absolute;
  pointer-events: auto;
  background: var(--win-face);
  border: 1px solid #000;
  border-radius: 0;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    3px 3px 0 #000;
  overflow: hidden;
  user-select: none;
  transition: none;
}

.sticky-note.blue  { --note-title: #000080; }
.sticky-note.green { --note-title: #006400; }
.sticky-note.pink  { --note-title: #800040; }
.sticky-note       { --note-title: #000080; }

.sticky-note.large  { width: 360px; height: 215px; }
.sticky-note.medium { width: 280px; height: 168px; }
.sticky-note.small  { width: 220px; height: 138px; }
.sticky-note.mini   { width: 160px; height: 100px; }

.sticky-title-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: linear-gradient(90deg, var(--note-title, #000080) 0%, #1084d0 100%);
  border-bottom: 1px solid #000;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.42rem;
  color: var(--win-white-text);
  text-shadow: 1px 1px 0 #000040;
  letter-spacing: 0.3px;
  cursor: grab;
}

.sticky-title-bar:active { cursor: grabbing; }

.sticky-title-bar::after {
  content: "□ _ ×";
  position: absolute;
  right: 4px;
  color: var(--win-white-text);
  font-size: 0.38rem;
}

.sticky-content {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: 18px;
  background: var(--win-face);
  display: flex;
  flex-direction: column;
}

.sticky-content::before {
  content: 'File  Edit  View  Help';
  flex-shrink: 0;
  display: block;
  background: var(--win-face);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.32rem;
  color: var(--win-text);
  padding: 3px 6px;
  border-bottom: 1px solid var(--win-shadow);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.mini-slideshow {
  flex: 1;
  position: relative;
  min-height: 0;
}

.mini-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) saturate(0.7);
}

.mini-slide.active { opacity: 1; }

.sticky-note:hover {
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    5px 5px 0 #000;
  z-index: 10 !important;
  transform: none !important;
}

.paperclip {
  position: absolute;
  top: 2px;
  right: 20px;
  width: 6px;
  height: 6px;
  background: var(--win-hilight);
  border-radius: 0;
  z-index: 3;
}

/* =========================================
   LINKTREE LAYOUT
   ========================================= */

.linktree-wrapper {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Main window frame */
.linktree-window {
  background: var(--win-face);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    4px 4px 0 #000;
}

/* Win95 title bar */
.window-title-bar {
  background: linear-gradient(90deg, var(--win-title) 0%, var(--win-title-end) 100%);
  color: var(--win-white-text);
  padding: 5px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.52rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #000;
  letter-spacing: 0.5px;
}

.window-controls {
  font-size: 0.45rem;
  opacity: 0.85;
}

/* Content area inside window */
.window-content {
  padding: 16px;
}

/* ── Profile ── */
.profile-section {
  text-align: center;
  padding: 12px 0;
}

/* Sunken picture frame border */
.profile-photo-frame {
  display: inline-block;
  border: 2px solid #000;
  box-shadow:
    inset  2px  2px 0 var(--win-shadow),
    inset -2px -2px 0 var(--win-hilight),
    2px 2px 0 #000;
  margin-bottom: 14px;
  line-height: 0;
}

.profile-photo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: cover;
  image-rendering: auto;   /* real photo — don't pixelate */
}

.profile-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--win-text);
  text-shadow: none;
  margin: 0 0 6px;
  line-height: 1.6;
}

.profile-handle {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  color: var(--win-gray-text);
  margin: 0 0 10px;
  line-height: 2;
}

.profile-bio {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.46rem;
  color: var(--win-dark);
  line-height: 2.2;
  margin: 0;
}

/* ── Win95 horizontal rule ── */
.win95-hr {
  height: 0;
  border: none;
  border-top: 1px solid var(--win-shadow);
  border-bottom: 1px solid var(--win-hilight);
  margin: 14px 0;
}

/* ── Social icons (IG / YT / SC) ── */
.social-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 4px 0;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 34px;
  background: var(--win-face);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    2px 2px 0 #000;
  color: var(--win-text);
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.44rem;
  letter-spacing: 0.5px;
}

.social-icon-btn:hover {
  background: var(--win-select);
  color: var(--win-white-text);
  text-decoration: none;
}

.social-icon-btn:active {
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight),
    0 0 0 #000;
  padding-top: 2px;
  padding-left: 2px;
}

/* ── Link buttons ── */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  vertical-align: middle;
  margin-right: 10px;
  flex-shrink: 0;
}

.link-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--win-face);
  color: var(--win-text);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    3px 3px 0 #000;
  padding: 12px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

.link-btn:hover {
  background: var(--win-select);
  color: var(--win-white-text);
  text-decoration: none;
}

.link-btn:active {
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight),
    0 0 0 #000;
  padding: 13px 15px 11px 17px;
  color: var(--win-white-text);
  background: var(--win-select);
}

/* =========================================
   CONTACT MODAL — Win95 dialog box
   ========================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  /* Classic Win95 desktop dimming */
  background: rgba(0, 0, 0, 0.4);
}

.modal-overlay.open { display: block; }

.modal-window {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 501;
  width: min(380px, calc(100vw - 60px));
  background: var(--win-face);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    4px 4px 0 #000;
}

.modal-window.open { display: block; }

.modal-title-bar {
  background: linear-gradient(90deg, var(--win-title) 0%, var(--win-title-end) 100%);
  color: var(--win-white-text);
  padding: 5px 6px 5px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #000;
  letter-spacing: 0.4px;
}

.modal-close-btn {
  background: var(--win-face);
  color: var(--win-text);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow);
  width: 20px;
  height: 18px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:active {
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight);
}

.modal-body {
  padding: 20px 16px 16px;
}

.modal-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  color: var(--win-text);
  margin: 0 0 12px;
  line-height: 2;
}

.modal-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  /* Sunken text field look */
  background: var(--win-hilight);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight);
  padding: 6px 8px;
}

.modal-email {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.42rem;
  color: var(--win-text);
  flex: 1;
  word-break: break-all;
  line-height: 2;
  user-select: all;
}

.modal-copy-btn {
  flex-shrink: 0;
  background: var(--win-face);
  color: var(--win-text);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    2px 2px 0 #000;
  padding: 4px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.4rem;
  white-space: nowrap;
}

.modal-copy-btn:active,
.modal-copy-btn.copied {
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight),
    0 0 0 #000;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Reuse windows-btn inside modal */
.windows-btn {
  background: var(--win-face);
  color: var(--win-text);
  border: 1px solid #000;
  box-shadow:
    inset  1px  1px 0 var(--win-hilight),
    inset -1px -1px 0 var(--win-shadow),
    2px 2px 0 #000;
  padding: 6px 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.44rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
}

.windows-btn:hover {
  background: var(--win-face);
  color: var(--win-text);
  text-decoration: none;
}

.windows-btn:active {
  box-shadow:
    inset  1px  1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-hilight),
    0 0 0 #000;
  padding: 7px 13px 5px 15px;
}

/* =========================================
   FOOTER
   ========================================= */

footer {
  margin-top: 12px;
  padding: 8px 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.4rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  text-shadow: 1px 1px 0 #000;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  :root { --crt-border-size: 10px; }

  .profile-name   { font-size: 0.75rem; }
  .profile-bio    { font-size: 0.4rem; }
  .link-btn       { font-size: 0.44rem; padding: 10px 12px; }

  .sticky-note.large  { width: 280px; height: 168px; }
  .sticky-note.medium { width: 220px; height: 132px; }
  .sticky-note.small  { width: 170px; height: 104px; }
  .sticky-note.mini   { width: 130px; height: 80px;  }
}

@media (max-width: 480px) {
  .sticky-notes-container { display: none; }
  body { font-size: 9px; }
  .content-wrapper { padding: 16px 10px; }
}
