/* Base Reset and Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  font-size: 1rem;
  padding: 2rem;
  max-width: 860px;
  margin: auto;
  color: #eee;
  background-color: #111;
  background-image: url('assets/background.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background 0.4s ease, color 0.3s ease;
}

/* Light mode override */
body.light-mode {
  background: #fdfdfd;
  color: #222;
  background-image: none;
}

/* Content Background */
header, footer, nav, main, section {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

body.light-mode header,
body.light-mode footer,
body.light-mode nav,
body.light-mode main,
body.light-mode section {
  background-color: rgba(255, 255, 255, 0.85);
}

/* Typography */
h1, h2, h3 {
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: inherit;
}

h2 {
  margin-top: 2.5rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.4rem;
}

p {
  margin-bottom: 1.25rem;
  max-width: 72ch;
}

ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: #aadfff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom: 1px solid #aadfff;
}

body.light-mode a {
  color: #0054cc;
  border-color: #0054cc;
}

body.light-mode a:hover {
  color: #003e9e;
  border-color: #003e9e;
}

/* Navigation */
nav {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 500;
}

nav a {
  margin: 0 1rem;
  font-size: 1.1rem;
}

/* Buttons */
button {
  font-family: inherit;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #000;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease;
}

button:hover {
  background: #eee;
}

body.light-mode button {
  background: #000;
  color: #fff;
}

body.light-mode button:hover {
  background: #222;
}

/* Footer */
footer {
  font-size: 0.9em;
  color: #ccc;
  border-top: 1px solid #444;
  padding-top: 1rem;
  margin-top: 3rem;
  text-align: center;
}

body.light-mode footer {
  color: #777;
  border-color: #ddd;
}

/* Toggle UI */
.toggle-container {
  text-align: right;
  margin-bottom: 1rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

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

/* Responsive iframe */
iframe {
  border: none;
  width: 100%;
  min-height: 600px;
}

body.dark-mode #legal-popup {
  background: #222;
  color: #eee;
  border-color: #555;
}

body.dark-mode #legal-popup a {
  color: #aadfff;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 0.5rem;
  font-size: 1rem;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ccc;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

body.dark-mode input,
body.dark-mode textarea {
  background: #222;
  color: #eee;
  border: 1px solid #555;
}

#form-wrapper {
  margin-top: 1rem;
  animation: fadeIn 0.3s ease-out;
}

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

footer {
  font-size: 0.9em;
  color: #ccc;
  border-top: 1px solid #444;
  padding-top: 2rem;
  margin-top: 4rem;
  line-height: 1.6;
  text-align: left;
}

footer h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: inherit;
}

footer a {
  color: #aadfff;
}

body.light-mode footer {
  color: #666;
  border-color: #ddd;
}

body.light-mode footer a {
  color: #0054cc;
}

main img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto 0.25rem;
  border-radius: 6px;
  cursor: zoom-in;
}

main em {
  display: block;
  text-align: center;
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 1.5rem;
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  background-color: #111;
  color: #eee;
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  display: block;
  line-height: 1.5;
  margin: 1rem 0;
}

body.light-mode code, body.light-mode pre {
  background-color: #f3f3f3;
  color: #222;
}

/* Stop Calendly from injecting any unwanted widget UI */
.calendly-inline-widget,
.calendly-badge-widget {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  position: absolute !important;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-content iframe {
  flex-grow: 1;
  border: none;
}

.close-button {
  align-self: flex-end;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #333;
}

.linkedin-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0077b5;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.linkedin-button:hover {
  background-color: #005582;
}

.contact-row {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  background-color: #0077b5;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.contact-icon:hover {
  background-color: #005582;
}

.linkedin-icon {
  width: 20px;
  height: 20px;
  fill: white;
}

#easter-egg-modal a {
  color: #5dd;
  text-decoration: underline;
}

#easter-egg-modal button {
  background-color: #333;
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.chamber-badge {
  margin-top: 1rem;
  text-align: left;
}

.chamber-badge img {
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.chamber-badge img:hover {
  opacity: 1;
}
