/* ============================================================
   Nick Roodenrijs — personal landing page
   Swiss grid: bright, precise, technical
   ============================================================ */

:root {
  --bg:     #ffffff;
  --ink:    #111111;
  --muted:  #555555;   /* body copy */
  --faint:  #767676;   /* mono meta (AA-safe faint grey) */
  --line:   #e5e5e5;   /* hairline dividers */
  --rule:   #111111;   /* 2px nav underline */
  --accent: #1a4fff;   /* electric blue */

  --max:    1080px;
  --pad:    56px;

  --sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  font-family: var(--mono);
  font-size: 13px;
}
.skip-link:focus { left: 8px; top: 8px; }

a:focus-visible,
.contact-email:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: opacity 0.15s ease;
}
.nav-links a:hover { opacity: 0.7; }
.nav-contact { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  padding-top: 96px;
  padding-bottom: 96px;
}
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 28px;
  animation: fadeIn 0.6s ease both;
}
.headline {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 62px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  animation: fadeUp 0.7s ease both;
}
.hero-right { padding-bottom: 6px; }
.intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
}
.hero .intro { animation: fadeUp 0.7s ease 0.1s both; }

/* ---------- Sections ---------- */
.section {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}
.section > .label { display: block; margin-bottom: 32px; }

/* ---------- Apps ---------- */
.app-list { display: flex; flex-direction: column; }
.app-row {
  display: grid;
  grid-template-columns: 80px 260px 1fr 40px;
  align-items: center;
  gap: 16px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.app-list li:last-child .app-row { border-bottom: 1px solid var(--line); }
.app-row:hover { opacity: 0.7; }

.app-index {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.app-id {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.app-id-text { display: flex; flex-direction: column; gap: 4px; }
.app-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.app-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.app-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.app-arrow {
  font-size: 20px;
  text-align: right;
  color: var(--ink);
}

/* ---------- Websites & services ---------- */
.websites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.websites-left .label { display: block; margin-bottom: 20px; }
.websites-left .intro { max-width: 34ch; }

.site-list { display: flex; flex-direction: column; }
.site-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.site-list li:last-child .site-row { border-bottom: 1px solid var(--line); }
.site-row:hover { opacity: 0.7; }
.site-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.site-tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- About ---------- */
.about-statement {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--accent);
  color: #fff;
  padding-top: 72px;
  padding-bottom: 72px;
}
.label-on-blue { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }
.contact-email {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: #fff;
  transition: opacity 0.15s ease;
}
.contact-email:hover { opacity: 0.7; }
.contact-email:focus-visible { outline-color: #fff; }
.copyright {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 64px;
    padding-bottom: 64px;
    align-items: start;
  }
  .headline { font-size: 52px; }
  .websites-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --pad: 24px; }

  .nav-inner {
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 14px;
    padding-bottom: 14px;
    min-height: 0;
  }
  .brand { flex: 1 0 100%; }
  .nav-links { gap: 20px; flex-wrap: wrap; }

  .headline { font-size: 42px; }
  .intro { font-size: 16px; }

  /* Apps: stack to single column */
  .app-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "index arrow"
      "id    id"
      "desc  desc";
    gap: 10px 12px;
    padding: 22px 0;
  }
  .app-index { grid-area: index; }
  .app-arrow { grid-area: arrow; }
  .app-id    { grid-area: id; }
  .app-desc  { grid-area: desc; }

  .about-statement { font-size: 23px; }
  .contact-email { font-size: 30px; word-break: break-word; }
}

@media (max-width: 360px) {
  .headline { font-size: 36px; }
  .contact-email { font-size: 26px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}
