:root {
  --bg: #ffffff;
  --text: #000000;
  --muted: #00065c;
  --line: #000000;
}

:root.dark-mode {
  --bg: #1a1a1a;
  --text: #ffffff;
  --muted: #b8b8ff;
  --line: #404040;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  text-align: justify;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page-shell {
  width: 100%;
  margin: 0;
  padding: 24px 20px 48px;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  margin-bottom: 20px;
  background: #000000;
  color: #ffffff;
  border-bottom: 1px solid var(--line);
  margin-left: -20px;
  margin-right: -20px;
  margin-top: -24px;
  width: calc(100% + 40px);
}

.site-header h1,
.site-header h2 {
  color: #ffffff;
  margin: 0 0 4px;
}

.site-header .lead {
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.8rem;
}

h1,
h2,
h3,
p {
  margin: 0 0 8px;
}

.lead {
  color: var(--muted);
  max-width: 42rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.site-nav a {
  color: #000000;
  text-decoration: none;
  background: #ffdd00;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  background: #ffed4e;
  transform: scale(1.05);
}

.site-nav a.active {
  background: #ff6600;
  color: #ffffff;
  font-weight: bold;
}

.theme-toggle {
  background: #ffdd00;
  color: #000000;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-left: auto;
}

.theme-toggle:hover {
  background: #ffed4e;
  transform: scale(1.05);
}


.content-grid,
.gallery-grid {
  display: grid;
  gap: 16px;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-item {
  margin: 0;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 6px;
}

.gallery-item figcaption {
  color: var(--muted);
  font-size: 0.95rem;
}

.card,
.photo-card,
.hero-card,
.physics-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: auto;
  position: auto;
}

.check-list,
.contact-list,
.skill-list {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
}

.check-list li,
.contact-list li,
.skill-list li {
  margin-bottom: 8px;
}

blockquote {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

blockquote footer {
  margin-top: 8px;
  color: var(--text);
}

.timeline article + article {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.meta {
  color: var(--muted);
  margin: 4px 0 8px;
}

.skill-list {
  list-style: none;
  padding: 0;
}

.link-button,
button[type="submit"] {
  display: inline-block;
  margin-top: 10px;
  background: transparent;
  color: var(--text);
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.physics-list {
  display: grid;
  gap: 12px;
}

.physics-item p {
  margin: 0 0 8px;
  color: var(--muted);
}


.boxed-item {
  border: 2px solid #fdcf00;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #000;
  color: #fff;
}

.boxed-item img {
  flex-shrink: 1;
  filter: contrast(1.3) saturate(1.4) brightness(1.05);
}

.bw {
  filter: contrast(1.3) saturate(1.4) brightness(1.05);
}

.pop-out {
  filter: grayscale(100%);
  transition: all 0.3s ease;
  border-radius: 10px;
}

.pop-out:hover {
  transform: scale(1.15) rotate(-2deg);
  box-shadow: 0 10px 40px rgba(255, 0, 0, 0.7);
  filter: grayscale(0%);
}

.gallery-item img {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: slideIn 0.3s ease;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.dark-yellow {
  filter: none;
}