:root {
  --bg: #ffffff;
  --text: #7a828c;
  --heading: #6d7680;
  --heading-strong: #4f5860;
  --accent: #5f8f8b;
  --border: #e8e8e6;
  --sidebar-bg: #fafaf9;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

header.site-header {
  padding: 48px 0 24px;
}

header.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.brand h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2.4rem;
  margin: 0;
  color: var(--heading-strong);
}

.brand h1 a {
  color: inherit;
}

.brand h1 a:hover {
  text-decoration: none;
}

.brand .tagline {
  font-style: italic;
  color: var(--text);
  margin-top: 4px;
  font-size: 1.05rem;
}

nav.site-nav {
  display: flex;
  gap: 28px;
  margin-top: 12px;
}

nav.site-nav a {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

main {
  padding: 24px 0 80px;
}

h1.page-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--heading-strong);
  margin: 32px 0 8px;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 40px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--heading-strong);
  margin: 48px 0 16px;
}

h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--heading-strong);
  margin: 32px 0 12px;
}

p {
  margin: 0 0 18px;
}

ul, ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

.section {
  margin-bottom: 8px;
}

.aside-block {
  background: var(--sidebar-bg);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 2px;
}

.aside-block h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.aside-block p {
  margin-bottom: 0;
}

.img-placeholder {
  border: 1px dashed var(--border);
  background: var(--sidebar-bg);
  color: #b0b6bc;
  text-align: center;
  padding: 60px 20px;
  border-radius: 4px;
  margin: 24px 0;
  font-size: 0.9rem;
}

/* project grid on homepage */
.section-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  color: var(--heading-strong);
  margin: 56px 0 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  transition: box-shadow 0.15s ease;
}

.project-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.project-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.project-card h3 a {
  color: var(--heading-strong);
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.lock-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: #a3a9ae;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 12px;
}

.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  float: right;
  margin: 0 0 24px 32px;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 60px;
  font-size: 0.9rem;
  color: #a3a9ae;
}

footer.site-footer a {
  margin-right: 20px;
}

/* password gate */
.gate {
  max-width: 420px;
  margin: 120px auto;
  text-align: center;
  padding: 0 24px;
}

.gate h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--heading-strong);
  font-size: 1.6rem;
}

.gate input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 16px 0 12px;
}

.gate button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.gate button:hover {
  opacity: 0.9;
}

.gate .error {
  color: #c0524a;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 8px;
}

#gated-content {
  display: none;
}

@media (max-width: 600px) {
  h1.page-title { font-size: 2rem; }
  .brand h1 { font-size: 2rem; }
}
