/* Lisa OS Landing Page — Lisa Office System aesthetic
 * Theme tokens matched to portfolio/src/themes/lisa-office.ts */

:root {
  /* Structural tokens (shared across themes) */
  --border-thin: 0.5px;
  --border-medium: 1px;
  --border-thick: 1px;
  --border-window: 1px;
  --window-radius: 0px;
  --font-display: 'Press Start 2P', 'Courier New', monospace;
  --font-mono: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-sans: 'Bitter', Georgia, 'Times New Roman', serif;
}

/* Sand theme (default) */
[data-theme="sand"], :root {
  --bg: #f7f4eb;
  --paper: #fffdfa;
  --ink: #15120e;
  --ink-secondary: #666666;
  --muted: #888880;
  --border: #060606;
  --highlight: #fbf8ef;
  --link: #0B4F9E;
  --grid-dot: rgba(0, 0, 0, 0.15);
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-window: 6px 6px 0 rgba(0, 0, 0, 0.5);
  --shadow-button: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

/* Classic gray */
[data-theme="classic"] {
  --bg: #c0c0c0;
  --paper: #ffffff;
  --ink: #000000;
  --ink-secondary: #4a4a4a;
  --muted: #666666;
  --border: #000000;
  --highlight: #e8e8e8;
  --link: #0645AD;
  --grid-dot: rgba(0, 0, 0, 0.24);
  --shadow: rgba(0, 0, 0, 0.6);
  --shadow-window: 6px 6px 0 rgba(0, 0, 0, 0.6);
  --shadow-button: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

/* Dark */
[data-theme="dark"] {
  --bg: #1a1a1a;
  --paper: #0a0a0a;
  --ink: #e8e8e8;
  --ink-secondary: #b0b0b0;
  --muted: #909090;
  --border: #d0d0d0;
  --highlight: #2a2a2a;
  --link: #6BA4FF;
  --grid-dot: rgba(255, 255, 255, 0.06);
  --shadow: rgba(0, 0, 0, 0.8);
  --shadow-window: 6px 6px 0 rgba(0, 0, 0, 0.8);
  --shadow-button: 3px 3px 0 rgba(0, 0, 0, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  transition: background-color 0.3s, color 0.3s;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: radial-gradient(
    circle at 1px 1px,
    var(--grid-dot) 1px,
    transparent 0
  );
  background-size: 6px 6px;
  image-rendering: pixelated;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

main {
  transition: background-color 0.3s, box-shadow 0.3s;
  max-width: 600px;
  width: 100%;
  background: var(--paper);
  border: var(--border-thick) solid var(--border);
  border-radius: var(--window-radius);
  box-shadow: var(--shadow-window);
  padding: 0;
}

/* Titlebar — matches portfolio .lisa-titlebar */
main > header {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  background: var(--paper);
  border-radius: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* Links — matches portfolio globals */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
}

a:hover {
  background-color: var(--highlight);
}

.tagline a {
  color: var(--link);
}

/* Header avatar */
.header-avatar {
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
  object-fit: contain;
  border: var(--border-medium) solid var(--border);
  margin-bottom: 0.5rem;
}

/* Content area */
.about {
  background: var(--paper);
  padding: 0 1.5rem 0;
}

.about p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about p:last-child {
  margin-bottom: 0;
}

.links {
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 1.5rem;
  border-bottom: var(--border-thick) solid var(--border);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.9rem;
  border: var(--border-thick) solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow-button);
  text-decoration: none;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    opacity: 0.9;
  }
}

.button:active {
  transform: scale(0.97);
  box-shadow: 2px 2px 0 var(--shadow);
}

.button span {
  font-weight: 700;
}

.currently {
  padding: 1.5rem;
  border-bottom: var(--border-thick) solid var(--border);
}

.currently h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.currently ul {
  list-style: none;
}

.currently li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--highlight);
  font-size: 0.95rem;
}

.currently li:last-child {
  border-bottom: none;
}

.currently a {
  color: var(--link);
}

footer {
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 1rem;
}

.theme-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.theme-btn {
  font-size: 1rem;
  background: none;
  border: var(--border-medium) solid transparent;
  border-radius: 0;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.theme-btn:hover {
  opacity: 0.8;
}

.theme-btn.active {
  opacity: 1;
  border-color: var(--border);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--ink);
}

/* Boot screen */
.boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0);
  background-size: 6px 6px;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.4s ease-out;
}

.boot-screen.boot-done {
  opacity: 0;
  pointer-events: none;
}

.boot-window {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.boot-icon {
  opacity: 1;
}

.boot-mac {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  object-fit: contain;
  border: var(--border-medium) solid var(--border);
}

.boot-bar-container {
  width: 200px;
  height: 14px;
  border: var(--border-thick) solid var(--border);
  background: var(--paper);
  overflow: hidden;
}

.boot-bar {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    var(--border) 4px,
    var(--border) 8px
  );
  animation: bootFill 1.8s ease-in-out forwards;
}

.boot-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

@keyframes bootPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes bootFill {
  0% { width: 0; }
  20% { width: 15%; }
  50% { width: 45%; }
  80% { width: 80%; }
  100% { width: 100%; }
}

main.hidden {
  display: none;
}

/* Entrance animations — staggered reveal */
@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  will-change: transform;
  animation: windowOpen 0.25s ease-out both;
}

main > header {
  will-change: transform;
  animation: fadeUp 0.2s ease-out 0.1s both;
}

.about {
  will-change: transform;
  animation: fadeUp 0.2s ease-out 0.2s both;
}

.links {
  will-change: transform;
  animation: fadeUp 0.2s ease-out 0.28s both;
}

.currently {
  will-change: transform;
  animation: fadeUp 0.2s ease-out 0.36s both;
}

footer {
  will-change: transform;
  animation: fadeUp 0.2s ease-out 0.42s both;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1rem;
  }

  .about {
    padding: 1rem;
  }
}
