/* Authentic Windows 95 Font - crisp and readable */
body {
  font-family: "MS Sans Serif", "Microsoft Sans Serif", Arial, Helvetica,
    sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: teal url("public/windows_95_clouds.webp") fixed center center /
    cover no-repeat;
  color: black;
  margin: 0;
  padding: 20px 0;
  line-height: 1.4;
  transition: background 1s ease, color 0.5s ease;
}

body.dark-mode {
  background: #000033 url("public/windows_95_clouds.webp") fixed center center /
    cover no-repeat;
  color: #e0e0e0;
}

/* Main window container */
.wrapper {
  display: flex;
  max-width: 1000px;
  margin: 20px auto;
  background: silver;
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6);
}

body.dark-mode .wrapper {
  background: #1a1a1a;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.9);
}

/* Title bar only for main content (Welcome to My Homepage) */
.main-content .title-bar {
  background: navy;
  color: white;
  padding: 3px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  border-bottom: 2px solid #404040;
}

body.dark-mode .main-content .title-bar {
  background: #000066;
}

.main-content .window-title {
  margin-left: 4px;
}

/* Close button and theme toggle */
.main-content .close-btn,
.main-content .theme-toggle-btn {
  width: 20px;
  height: 20px;
  background: silver;
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  font-size: 14px;
  font-weight: bold;
  color: black;
  cursor: pointer;
  line-height: 16px;
  text-align: center;
}

body.dark-mode .main-content .close-btn,
body.dark-mode .main-content .theme-toggle-btn {
  background: #404040;
  color: white;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #202020;
  border-bottom: 2px solid #202020;
}

.main-content .close-btn:hover,
.main-content .theme-toggle-btn:hover {
  background: #dfdfdf;
}

body.dark-mode .main-content .close-btn:hover,
body.dark-mode .main-content .theme-toggle-btn:hover {
  background: #606060;
}

/* Original sidebar title (no X button) */
.sidebar .window-title {
  background: navy;
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 14px;
  border-bottom: 2px solid #404040;
}

body.dark-mode .sidebar .window-title {
  background: #000066;
}

/* Left Sidebar */
.sidebar {
  width: 300px;
  background: silver;
  padding: 15px;
  border-right: 2px solid #404040;
  flex-shrink: 0;
}

body.dark-mode .sidebar {
  background: #1a1a1a;
}

.profile-img {
  width: 160px;
  height: auto;
  border: 2px solid black;
  display: block;
  margin: 20px auto;
}

.sidebar h1 {
  color: black;
  font-size: 18px;
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
}

.contact-info {
  font-size: 13px;
  margin: 20px 0;
  text-align: left;
}

.contact-info i {
  color: black;
  margin-right: 8px;
}

.contact-info a {
  color: blue;
  text-decoration: underline;
}

.contact-info a:hover {
  color: red;
}

body.dark-mode .contact-info a {
  color: #88aaff;
}

body.dark-mode .contact-info a:hover {
  color: #ffaa00;
}

.sidebar-nav {
  margin: 20px 0;
  text-align: left;
}

.sidebar-nav a {
  display: block;
  margin: 8px 0;
  color: blue;
  text-decoration: underline;
  font-weight: normal;
}

.sidebar-nav a:hover {
  color: red;
}

body.dark-mode .sidebar-nav a {
  color: #88aaff;
}

body.dark-mode .sidebar-nav a:hover {
  color: #ffaa00;
}

.news {
  font-size: 12px;
  color: black;
  margin-top: 20px;
  border-top: 1px dotted gray;
  padding-top: 10px;
}

body.dark-mode .news {
  color: #ccccff;
  border-top: 1px dotted #444;
}

/* Right Main Content */
.main-content {
  flex-grow: 1;
  background: silver;
  padding: 15px 25px 25px;
}

body.dark-mode .main-content {
  background: #1a1a1a;
}

/* Retro Tabs */
.tabs {
  margin-bottom: 20px;
  padding: 10px 0 0 10px;
  background: silver;
  border-bottom: 2px solid #404040;
}

body.dark-mode .tabs {
  background: #1a1a1a;
}

.tab {
  display: inline-block;
  padding: 8px 16px;
  margin-right: 4px;
  background: silver;
  color: black;
  text-decoration: none;
  font-weight: bold;
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
}

body.dark-mode .tab {
  background: #404040;
  color: #e0e0e0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #202020;
  border-bottom: 2px solid #202020;
}

.tab:hover {
  background: #dfdfdf;
}

body.dark-mode .tab:hover {
  background: #606060;
}

.tab.active {
  background: silver;
  border-bottom: none;
  padding-bottom: 10px;
  position: relative;
  top: 2px;
}

body.dark-mode .tab.active {
  background: #222233;
}

/* Panels */
.panel {
  display: none;
  background: white;
  padding: 20px;
  border: 2px inset silver;
  min-height: 400px;
  color: black;
}

.panel.active {
  display: block;
}

body.dark-mode .panel {
  background: #222233;
  color: #e0e0e0;
  border: 2px inset #404040;
}

.panel h2 {
  color: navy;
  font-size: 20px;
  margin: 0 0 15px 0;
  border-bottom: 2px solid teal;
  padding-bottom: 5px;
}

body.dark-mode .panel h2 {
  color: #88aaff;
  border-bottom: 2px solid #004488;
}

.panel h3 {
  color: black;
  font-size: 16px;
  margin-top: 20px;
}

body.dark-mode .panel h3 {
  color: #ccccff;
}

/* Publications and awards */
.publication strong,
.award-title {
  color: purple;
}

body.dark-mode .publication strong,
body.dark-mode .award-title {
  color: #ff88ff;
}

/* Honors & Awards Section */
.award-item {
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 1px dotted #aaa;
}

.award-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body.dark-mode .award-item {
  border-bottom: 1px dotted #555;
}

.award-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.award-meta-inline {
  font-size: 13px;
  color: #444;
  text-align: right;
  font-style: italic;
  white-space: nowrap;
}

body.dark-mode .award-meta-inline {
  color: #aaa;
}

.award-role {
  font-size: 15px;
  font-weight: bold;
  color: navy;
  margin: 8px 0 10px 0;
}

body.dark-mode .award-role {
  color: #88aaff;
}

.award-details {
  margin: 8px 0 0 20px;
  padding-left: 0;
  color: #333;
}

body.dark-mode .award-details {
  color: #ccccff;
}

/* Blog Card */
.blog-card {
  background: white;
  border: 2px inset white;
  padding: 15px;
  max-width: 500px;
  margin: 20px 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  gap: 15px;
  transition: all 0.1s ease-in-out;
}

body.dark-mode .blog-card {
  background: #222233;
  border: 2px inset #404040;
}

.blog-card:hover {
  border-color: #404040;
  transform: translateY(-2px);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.blog-card img {
  width: 120px;
  height: auto;
  border: 2px solid black;
  flex-shrink: 0;
}

.blog-card h3 {
  margin: 0 0 5px 0;
  color: purple;
  font-weight: bold;
  font-size: 16px;
}

body.dark-mode .blog-card h3 {
  color: #ff88ff;
}

.blog-button {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  background-color: navy;
  color: white;
  text-decoration: none;
  border: 2px outset white;
  transition: all 0.1s;
}

body.dark-mode .blog-button {
  background-color: #000066;
}

.blog-button:hover {
  background-color: #1a1a99;
  border: 2px inset white;
}

/* Production Credit */
.production-credit {
  text-align: center;
  margin-top: 50px;
  font-size: 14px;
  font-family: "MS Sans Serif", "Microsoft Sans Serif", Arial, sans-serif;
  color: white;
  font-weight: bold;
  letter-spacing: 1px;
}

body.dark-mode .production-credit {
  color: #ccccff;
}

/* Calculator dark mode */
body.dark-mode .calculator {
  background: #1a1a1a;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

body.dark-mode .calc-title {
  background: #000066;
}

body.dark-mode .calc-display {
  background: #003300;
  color: #00ff00;
  border: 2px inset #404040;
}

body.dark-mode .calc-btn {
  background: #404040;
  color: white;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #202020;
  border-bottom: 2px solid #202020;
}

/* Responsive */
@media (max-width: 900px) {
  .wrapper {
    flex-direction: column;
  }
  .sidebar {
    border-right: none;
    border-bottom: 2px solid #404040;
  }

  body.dark-mode .sidebar {
    border-bottom: 2px solid #404040;
  }

  .award-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .award-meta-inline {
    text-align: left;
    margin-top: 4px;
    font-style: normal;
  }
}

.real-weather {
  font-family: "DS-Digital", "Electronic", "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
  color: red;
  background: black;
  padding: 2px 6px;
  min-width: 60px;
  text-align: center;
  border: 2px inset silver;
}

body.dark-mode .contact-info i {
  color: white;
}

#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;     /* Clicks pass through */
  z-index: 999;             /* On top of content */
  opacity: 0;
  transition: opacity 0.8s ease;
}

#fireworks-canvas.active {
  opacity: 1;
}