/* ========================================
   Olaf Minten Architectuur — Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg: #f4f3f0;
  --fg: #14110f;
  --primary: #14110f;
  --primary-fg: #f4f3f0;
  --secondary: #e8e6e2;
  --muted-fg: #585451;
  --accent: #94725b;
  --accent-hover: #a8836a;
  --destructive: #cc2827;
  --border: rgba(20, 17, 15, 0.12);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --px: 1.5rem;   /* 24px mobile */
  --px-lg: 2.5rem; /* 40px desktop */
}

@media (min-width: 768px) {
  :root {
    --px: 2.5rem;
  }
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.625;
  color: var(--fg);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font: inherit;
}

/* --- Ghost Background --- */
.ghost-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

/* --- Site Layout --- */
.site-wrapper {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
}

.site-content {
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--px);
  border-bottom: 1px solid var(--border);
  background-color: rgba(244, 243, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

@media (min-width: 768px) {
  .nav-logo {
    font-size: 17px;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--fg);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.nav-cta:hover {
  color: var(--accent-hover);
}

/* Mobile menu toggle */
.nav-mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--fg);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-mobile-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg) translate(2px, 2px);
}

.nav-mobile-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg) translate(2px, -2px);
}

@media (min-width: 768px) {
  .nav-mobile-toggle {
    display: none;
  }
  .nav-cta {
    display: none;
  }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background-color: var(--bg);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
  transition: color 0.2s;
}

.mobile-menu-link:hover {
  color: var(--fg);
}

.mobile-menu-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
}

/* --- Main Content Area --- */
main {
  padding-left: var(--px);
  padding-right: var(--px);
}

/* --- Section Base --- */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* --- Label System --- */
.label-accent {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
}

/* --- Section Titles --- */
.section-title {
  margin-top: 1rem;
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 5rem;
  }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.2s;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary span {
  font-size: 1.1em;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s;
}

.btn-text:hover {
  text-decoration-color: var(--accent);
}

/* --- Hero --- */
.hero {
  display: grid;
  gap: 3rem;
  padding-top: 4rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    padding-top: 6rem;
    padding-bottom: 8rem;
  }
}

.hero-content {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .hero-content {
    grid-column: span 9;
  }
}

.hero-title {
  margin-top: 2rem;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-intro {
  margin-top: 2rem;
  max-width: 46ch;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted-fg);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* --- Stats Bar --- */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .stats-bar {
    padding: 3.5rem 0;
  }
}

.stats-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-number {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 2.5rem;
  }
}

.stat-label {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 4rem;
}

.section-header-row {
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .section-header-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* --- Filter Tags --- */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-fg);
}

.filter-tag {
  cursor: default;
  transition: color 0.2s;
}

.filter-tag:hover,
.filter-tag.active {
  color: var(--fg);
}

/* --- Timeline (Werkwijze) --- */
.timeline {
  position: relative;
  margin-left: 1rem;
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

@media (min-width: 768px) {
  .timeline {
    margin-left: 2rem;
    padding-left: 3rem;
  }
}

.timeline-step {
  position: relative;
  padding-bottom: 3.5rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .timeline-step {
    padding-bottom: 4rem;
  }
}

.timeline-number {
  position: absolute;
  top: 0;
  left: -2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
}

@media (min-width: 768px) {
  .timeline-number {
    left: -3rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 11px;
  }
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .timeline-title {
    font-size: 1.5rem;
  }
}

.timeline-desc {
  margin-top: 0.75rem;
  max-width: 56ch;
  color: var(--muted-fg);
  text-wrap: pretty;
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 2rem;
    row-gap: 5rem;
  }
}

.portfolio-card {
  display: flex;
  flex-direction: column;
}

.portfolio-image-wrap {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.portfolio-image {
  aspect-ratio: 5 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-card:hover .portfolio-image {
  transform: scale(1.03);
}

.portfolio-meta {
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.portfolio-title {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.portfolio-category {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

.portfolio-year {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-fg);
}

/* --- Expertise --- */
.expertise-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .expertise-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
  }
}

.expertise-image {
  overflow: hidden;
}

@media (min-width: 768px) {
  .expertise-image {
    grid-column: span 5;
    margin-top: 2.35rem;
  }
}

.image-wrap {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aspect-5-4 {
  aspect-ratio: 5 / 4;
}

.aspect-4-5 {
  aspect-ratio: 4 / 5;
}

.expertise-content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .expertise-content {
    grid-column: span 7;
  }
}

.expertise-intro {
  margin-top: 1.5rem;
  max-width: 52ch;
  color: var(--muted-fg);
  text-wrap: pretty;
}

.expertise-grid-2x2 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--border);
}

@media (min-width: 640px) {
  .expertise-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.expertise-card {
  padding: 1.5rem;
  background-color: var(--bg);
}

.expertise-card-title {
  font-size: 1rem;
  font-weight: 500;
}

.expertise-card-desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

/* --- Info / About --- */
.info-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
  }
}

.info-portrait {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .info-portrait {
    grid-column: span 4;
  }
}

.portrait-figure {
  margin-top: 1.5rem;
}

.portrait-caption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

.info-content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .info-content {
    grid-column: span 8;
  }
}

.info-lead {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .info-lead {
    font-size: 2.5rem;
  }
}

.info-body {
  margin-top: 1.5rem;
  max-width: 60ch;
  color: var(--muted-fg);
  text-wrap: pretty;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
  }
}

.contact-form-side {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .contact-form-side {
    grid-column: span 7;
  }
}

.contact-title {
  margin-top: 1rem;
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 3.75rem;
  }
}

.serif-italic {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

.contact-subtitle {
  margin-top: 1.5rem;
  max-width: 46ch;
  color: var(--muted-fg);
}

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

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

.form-input {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input::placeholder {
  color: rgba(88, 84, 81, 0.7);
}

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

.form-textarea {
  resize: vertical;
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.link-accent {
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* --- Contact Sidebar --- */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-sidebar {
    grid-column: span 5;
  }
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

.sidebar-value {
  margin-top: 0.5rem;
  font-size: 1rem;
}

.sidebar-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  transition: color 0.2s;
}

.sidebar-link:hover {
  color: var(--accent);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem var(--px);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

.footer-copy,
.footer-link,
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

.footer-link:hover {
  color: var(--fg);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in portfolio grid */
.portfolio-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.portfolio-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.portfolio-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.portfolio-grid .reveal:nth-child(4) { transition-delay: 240ms; }
.portfolio-grid .reveal:nth-child(5) { transition-delay: 320ms; }
.portfolio-grid .reveal:nth-child(6) { transition-delay: 400ms; }

/* Timeline steps stagger */
.timeline .reveal:nth-child(1) { transition-delay: 0ms; }
.timeline .reveal:nth-child(2) { transition-delay: 60ms; }
.timeline .reveal:nth-child(3) { transition-delay: 120ms; }
.timeline .reveal:nth-child(4) { transition-delay: 180ms; }
.timeline .reveal:nth-child(5) { transition-delay: 240ms; }
.timeline .reveal:nth-child(6) { transition-delay: 300ms; }
.timeline .reveal:nth-child(7) { transition-delay: 360ms; }
.timeline .reveal:nth-child(8) { transition-delay: 420ms; }

/* --- Section border-top utility --- */
.projecten,
.info,
.contact {
  border-top: 1px solid var(--border);
}

/* --- Selection highlight --- */
::selection {
  background-color: rgba(148, 114, 91, 0.2);
}

/* --- Scrollbar styling (subtle) --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(20, 17, 15, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 17, 15, 0.25);
}

/* --- Smooth scroll for anchor links offset by nav --- */
[id] {
  scroll-margin-top: 80px;
}

/* --- Mobile hero --- */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .contact-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 2.25rem;
  }
  .info-lead {
    font-size: 1.25rem;
  }
}
