/* global color variables for dark mode */
:root {
  --bg: #0a0a0a;        /* main background */
  --fg: #f5f5f5;        /* main text color */
  --muted: #9e9e9e;     /* muted/secondary text */
  --line: #2a2a2a;      /* divider lines */
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);   /* dark background */
  color: var(--fg);        /* light text */
  font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(960px, 92vw); /* narrower max width for readability */
  margin: 0 auto;
}

.site-header {
  position: sticky; top: 0;
  backdrop-filter: blur(8px);         /* subtle blur */
  background: rgba(10,10,10,0.8);     /* dark translucent bg */
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0; /* tighter padding for dark theme */
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--fg);  /* logo text stays bright */
  text-decoration: none;
}

.nav {
  display: flex; gap: 16px; /* smaller spacing */
  list-style: none;
  padding: 0; margin: 0;
}

.nav a {
  color: var(--fg); /* nav links bright */
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background .2s ease;
}

.nav a:hover {
  background: #1a1a1a; /* subtle hover */
}

.hero {
  padding: 72px 0 36px;     /* more compact */
  border-bottom: 1px solid var(--line);
}

.headline {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.2;  /* looser for readability */
  margin: 0 0 12px;
}

.kicker {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  margin: 0;
  max-width: 48ch; /* keep text readable width */
}

.section {
  padding: 56px 0;   /* less vertical spacing */
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: 22px;
  margin: 0 0 20px;
}

.lead {
  font-size: 18px;
  line-height: 1.6; /* comfy reading */
}

/* simplified grid */
.grid.two, .grid.three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 860px) {
  .grid.two { grid-template-columns: 1fr 1fr; } /* 2-col on desktop */
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 8px;
  background: #111; /* darker card bg */
}

.project {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  transition: transform .2s ease, background .2s ease;
}

.project:hover {
  background: #1a1a1a;      /* darker hover */
  transform: scale(1.01);   /* slight pop */
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.project h3 {
  margin: 0;
  font-size: 18px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  padding: 20px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.mono {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
}

.contact-rows {
  display: grid;
  gap: 8px;
}

.contact-link {
  display: inline-block;
  font-size: 18px;
  text-decoration: none;
  color: var(--fg);              /* keep link bright */
  border-bottom: 1px solid var(--fg); /* underline style */
  padding-bottom: 2px;
  transition: color .2s ease, border .2s ease;
}

.contact-link:hover {
  color: #9e9e9e;                /* muted on hover */
  border-bottom-color: #9e9e9e;  /* underline changes too */
}

.contact-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
