/* ============================================================
   shanand-os — stylesheet
   Theme: "Espresso Terminal" — a warm, coffee-dark desktop
   environment built for a Java engineer's portfolio.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-void: #120e0b;
  --surface: #1e1712;
  --surface-raised: #291f18;
  --surface-hover: #362a20;
  --surface-input: #170f0a;
  --border: #3d2f24;
  --border-soft: #2a2019;

  /* Accents */
  --accent: #e3a857;        /* crema amber */
  --accent-strong: #f0bd72;
  --accent-soft: rgba(227, 168, 87, 0.14);
  --accent-2: #8fbc94;      /* terminal mint */
  --accent-2-soft: rgba(143, 188, 148, 0.14);
  --danger: #e0705c;
  --danger-soft: rgba(224, 112, 92, 0.14);

  /* Text */
  --text-primary: #f3eade;
  --text-secondary: #c9bbac;
  --text-muted: #8a7c6e;
  --text-on-accent: #1c1409;

  /* Type */
  --font-display: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Misc */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-window: 0 20px 60px -12px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
  --taskbar-h: 52px;
}

* { box-sizing: border-box; }

html, body {
  height: 100% auto;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-void);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}

.hidden { display: none !important; }

::selection { background: var(--accent); color: var(--text-on-accent); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: padding-box; }

button { font-family: inherit; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-logo {
  font-size: 48px;
  margin-bottom: 18px;
  animation: steam 2.4s ease-in-out infinite;
}
@keyframes steam {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-3deg); }
}

.boot-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 28px;
}
.boot-title-accent { color: var(--accent); }

.boot-bar-track {
  width: 220px;
  height: 4px;
  background: var(--surface-raised);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 0.25s ease;
}

.boot-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(227,168,87,0.08), transparent 60%),
    linear-gradient(160deg, #1a130e 0%, #0f0b08 100%);
  transition: opacity 0.4s ease;
}
.login-screen.fade-out { opacity: 0; pointer-events: none; }

.login-clock {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.login-date {
  font-family: var(--font-body);
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 48px;
  font-size: 14px;
}

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 40px 28px;
  background: rgba(30, 23, 18, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}

.login-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #c9863a);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(227,168,87,0.25);
}

.login-name { font-size: 18px; font-weight: 600; }
.login-hint { color: var(--text-muted); font-size: 13px; margin-top: 2px; margin-bottom: 20px; }

.login-button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-on-accent);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.login-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.login-button:active { transform: translateY(0); }

.login-footnote {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}
.login-footnote code {
  font-family: var(--font-mono);
  background: var(--surface-input);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ============================================================
   DESKTOP
   ============================================================ */
.desktop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  transition: opacity 0.4s ease;
}
.desktop.fade-in { animation: desktopIn 0.5s ease; }
@keyframes desktopIn { from { opacity: 0; } to { opacity: 1; } }

/* Wallpapers */
.desktop.wallpaper-espresso {
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(227,168,87,0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(143,188,148,0.06), transparent 55%),
    linear-gradient(165deg, #1a130e 0%, #100b08 65%, #0c0906 100%);
}
.desktop.wallpaper-midnight {
  background:
    radial-gradient(1100px 650px at 90% -5%, rgba(111,159,207,0.12), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(143,188,148,0.08), transparent 55%),
    linear-gradient(165deg, #0d1416 0%, #0a1012 65%, #070b0c 100%);
}
.desktop.wallpaper-sunset {
  background:
    radial-gradient(1100px 650px at 20% 0%, rgba(224,112,92,0.14), transparent 60%),
    radial-gradient(900px 700px at 100% 100%, rgba(227,168,87,0.12), transparent 55%),
    linear-gradient(165deg, #1c120e 0%, #150d0a 65%, #0f0a08 100%);
}
.desktop.wallpaper-slate {
  background:
    radial-gradient(1100px 650px at 85% -10%, rgba(160,160,180,0.10), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(143,188,148,0.06), transparent 55%),
    linear-gradient(165deg, #15161a 0%, #101114 65%, #0b0c0e 100%);
}

/* ============================================================
   DESKTOP ICONS
   ============================================================ */
.desktop-icons {
  position: absolute;
  top: 24px;
  left: 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  height: calc(100vh - 48px);
}

.desktop-icon {
  width: 84px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
}
.desktop-icon:hover, .desktop-icon:focus-visible {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
.desktop-icon.selected {
  background: var(--accent-soft);
  border-color: rgba(227,168,87,0.35);
}
.desktop-icon-glyph {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.desktop-icon-label {
  font-size: 11.5px;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.25;
}

/* ============================================================
   WINDOWS
   ============================================================ */
.window-layer {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  pointer-events: none;
}

.app-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  min-height: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  pointer-events: auto;
  animation: windowOpen 0.16s ease;
}
@keyframes windowOpen {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.app-window.closing { animation: windowClose 0.13s ease forwards; }
@keyframes windowClose {
  to { opacity: 0; transform: scale(0.97) translateY(6px); }
}

.app-window.focused { border-color: rgba(227,168,87,0.4); }
.app-window.maximized {
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  border-radius: 0;
}
.app-window.minimized { display: none; }

.window-titlebar {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-soft);
  cursor: default;
}
.app-window.focused .window-titlebar { background: #302419; }

.window-title-icon { font-size: 14px; opacity: 0.9; }
.window-title-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-window.focused .window-title-text { color: var(--text-primary); }

.window-controls { display: flex; gap: 6px; }
.win-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.win-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.win-btn.win-close:hover { background: var(--danger-soft); color: var(--danger); }

.window-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface);
  position: relative;
}

.window-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}
.window-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px; bottom: 4px;
  width: 7px; height: 7px;
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.app-window.maximized .window-resize-handle { display: none; }

/* ============================================================
   TASKBAR
   ============================================================ */
.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar-h);
  background: rgba(24, 18, 14, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
  z-index: 500;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.start-button:hover, .start-button.active {
  background: var(--accent-soft);
  border-color: rgba(227,168,87,0.3);
  color: var(--accent-strong);
}
.start-icon { font-size: 16px; }

.taskbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.taskbar-tasks {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  height: 100%;
  align-items: center;
}

.taskbar-task {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  max-width: 180px;
  white-space: nowrap;
}
.taskbar-task span.task-label { overflow: hidden; text-overflow: ellipsis; }
.taskbar-task:hover { background: var(--surface-hover); }
.taskbar-task.active {
  border-color: rgba(227,168,87,0.4);
  color: var(--text-primary);
  background: var(--accent-soft);
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
  padding-right: 4px;
}
.tray-icon { cursor: default; opacity: 0.85; }
.tray-clock {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 12.5px;
  min-width: 46px;
  text-align: right;
}

/* ============================================================
   START MENU
   ============================================================ */
.start-menu {
  position: fixed;
  left: 10px;
  bottom: calc(var(--taskbar-h) + 8px);
  width: 320px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-window);
  z-index: 600;
  overflow: hidden;
  animation: startMenuIn 0.15s ease;
}
@keyframes startMenuIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.start-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.start-menu-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #c9863a);
  color: var(--text-on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.start-menu-name { font-weight: 600; font-size: 13.5px; }
.start-menu-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.start-menu-apps {
  padding: 8px;
  max-height: 340px;
  overflow-y: auto;
}
.start-menu-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}
.start-menu-app:hover { background: var(--surface-hover); }
.start-menu-app .app-glyph { font-size: 17px; width: 22px; text-align: center; }
.start-menu-app .app-desc { display: block; font-size: 11px; color: var(--text-muted); }

.start-menu-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-muted);
}
.start-menu-footer code {
  font-family: var(--font-mono);
  background: var(--surface-input);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}

/* ============================================================
   CONTEXT MENU
   ============================================================ */
.context-menu {
  position: fixed;
  width: 210px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  z-index: 700;
  padding: 6px;
  animation: startMenuIn 0.12s ease;
}
.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-secondary);
}
.context-item:hover { background: var(--surface-hover); color: var(--text-primary); }
.context-icon { width: 18px; text-align: center; font-size: 13px; }
.context-divider { height: 1px; background: var(--border-soft); margin: 5px 4px; }

/* ============================================================
   SHARED WINDOW-BODY CONTENT STYLES
   ============================================================ */
.win-content { padding: 20px 22px 28px; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary); }
.win-content h1, .win-content h2, .win-content h3 { color: var(--text-primary); font-family: var(--font-display); }
.win-content h1 { font-size: 20px; margin: 0 0 6px; }
.win-content h2 { font-size: 14px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-soft); }
.win-content h2:first-child { margin-top: 0; }
.win-content p { margin: 0 0 12px; }
.win-content .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(227,168,87,0.25);
}
.tag.tag-mint { background: var(--accent-2-soft); color: var(--accent-2); border-color: rgba(143,188,148,0.3); }

.card-list { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.card-title { font-weight: 700; color: var(--text-primary); font-size: 14px; }
.card-period { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.card-subtitle { font-size: 12px; color: var(--accent); margin-top: 2px; font-weight: 600; }
.card p { margin: 10px 0 0; font-size: 13px; }
.card ul { margin: 10px 0 0; padding-left: 18px; }
.card li { margin-bottom: 5px; font-size: 13px; }
.card-links { display: flex; gap: 14px; margin-top: 12px; }
.card-links a { font-family: var(--font-mono); font-size: 11.5px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.skills-category-title { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: 8px; }

.contact-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.contact-row .c-icon { font-size: 16px; width: 22px; text-align: center; }
.contact-row .c-label { font-size: 11px; color: var(--text-muted); }
.contact-row .c-value { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; }
.btn.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* about window extras */
.about-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.about-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #c9863a);
  color: var(--text-on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.interest-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ============================================================
   TERMINAL
   ============================================================ */
.terminal-body {
  background: #100b08;
  height: 100%;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #d7cdbf;
  overflow-y: auto;
  cursor: text;
}
.terminal-line { white-space: pre-wrap; word-break: break-word; margin-bottom: 2px; }
.terminal-line .t-prompt { color: var(--accent-2); }
.terminal-line .t-path { color: var(--accent); }
.terminal-line .t-error { color: var(--danger); }
.terminal-line .t-dim { color: var(--text-muted); }
.terminal-line .t-heading { color: var(--accent); font-weight: 700; }
.terminal-line a { color: #7fb3d5; }

.terminal-input-row { display: flex; align-items: center; gap: 6px; }
.terminal-input-row .t-prompt { color: var(--accent-2); white-space: nowrap; }
.terminal-input-row .t-path { color: var(--accent); white-space: nowrap; }
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f3eade;
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--accent-2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .desktop-icons {
    grid-template-columns: repeat(1, 76px);
    top: 14px;
    left: 8px;
    gap: 2px;
  }
  .desktop-icon { width: 76px; }
  .desktop-icon-glyph { font-size: 26px; }
  .desktop-icon-label { font-size: 10.5px; }

  .app-window {
    top: 6px !important;
    left: 6px !important;
    width: calc(100vw - 12px) !important;
    height: calc(100vh - var(--taskbar-h) - 12px) !important;
  }
  .window-resize-handle { display: none; }

  .start-menu { width: calc(100vw - 20px); left: 10px; }
  .taskbar-task .task-label { display: none; }
  .taskbar-task { padding: 0 10px; }
  .start-label { display: none; }
}
