:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #555555;
  --accent: #d93025;
  --border: #e5e5e5;
  --field-bg: #fafafa;
}

html.dark {
  --bg: #0f0f0f;
  --fg: #f2f2f2;
  --muted: #a0a0a0;
  --accent: #ff5a4e;
  --border: #2a2a2a;
  --field-bg: #1a1a1a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 32px 80px;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 2rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 1.5rem;
}

.accent {
  color: var(--accent);
}

.accent-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.accent-link:hover {
  opacity: 0.75;
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 4px;
  letter-spacing: -0.01em;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.9;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--fg);
}

.breadcrumb-sep {
  opacity: 0.5;
}

.breadcrumb [aria-current="page"] {
  color: var(--fg);
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--fg);
}

.theme-toggle .icon {
  color: var(--fg);
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: block;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.submit-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
  align-self: flex-start;
  letter-spacing: -0.01em;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* Dialog */
.dialog {
  font-family: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  max-width: 380px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

html.dark .dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.dialog-message {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.dialog.dialog-success .dialog-message {
  border-left-color: var(--fg);
}

.dialog.dialog-error .dialog-message {
  border-left-color: var(--accent);
}

.dialog-close {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.dialog-close:hover {
  border-color: var(--fg);
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 88px 20px 56px;
  }

  h1 {
    font-size: 1.75rem;
  }

  p {
    font-size: 0.95rem;
  }

  .theme-toggle {
    top: 16px;
    right: 16px;
  }
}
