:root {
  --white:   #ffffff;
  --bg:      #fafafa;
  --ink:     #111111;
  --muted:   #666666;
  --subtle:  #999999;
  --rule:    #e5e5e5;
  --surface: #f5f5f5;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  background: var(--white);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ─── HEADER ─── */

.site-header {
  padding: 2rem 2rem 0;
  background: var(--white);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
}

.header-identity {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}

.header-photo {
  width: 56px;
  height: 70px;
  object-fit: cover;
  flex-shrink: 0;
}

.header-text {
  flex: 1;
}

.site-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--ink);
}

.site-credentials {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.site-company {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--subtle);
  margin-top: 0.15rem;
}

/* ─── NAV ─── */

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  border-top: 1px solid var(--rule);
  padding: 0.65rem 0;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link--active {
  color: var(--ink);
}

.nav-link--email {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.8rem;
}

/* ─── FLASH ─── */

.flash-messages {
  max-width: 960px;
  margin: 1rem auto 0;
  padding: 0 2rem;
}

.flash {
  position: relative;
  padding: 0.7rem 2.25rem 0.7rem 0.9rem;
  font-size: 0.85rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-bottom: 0.5rem;
}

.flash--success { border-color: #c3e6cb; background: #f0fff4; color: #276749; }
.flash--danger,
.flash--error   { border-color: #f5c6cb; background: #fff5f5; color: #9b1c1c; }

.flash-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  opacity: 0.6;
  line-height: 1;
}

.flash-close:hover { opacity: 1; }

/* ─── MAIN ─── */

.site-main {
  flex: 1;
  padding: 3rem 2rem 4rem;
}

.content-wrap {
  max-width: 960px;
  margin: 0 auto;
}

/* ─── HOMEPAGE ─── */

.homepage-prose {
  max-width: 66ch;
}

.homepage-prose p {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.homepage-prose p:last-child {
  margin-bottom: 0;
}

/* ─── CONTACT ─── */

.contact-section {
  margin-top: 3.5rem;
    max-width: 66ch;
}

.contact-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.contact-field {
  position: relative;
  margin-bottom: 2rem;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  outline: none;
  padding: 1.15rem 0 0.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  transition: border-color 0.15s;
  resize: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-bottom-color: var(--ink);
}

.contact-field label {
  position: absolute;
  top: 1.15rem;
  left: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: #aaa;
  pointer-events: none;
  transition: top 0.18s ease-out, font-size 0.18s ease-out, color 0.18s;
}

.contact-field input:focus ~ label,
.contact-field input:not(:placeholder-shown) ~ label,
.contact-field textarea:focus ~ label,
.contact-field textarea:not(:placeholder-shown) ~ label {
  top: 0.1rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.cf-turnstile {
  margin-bottom: 1rem;
}

.form-submit {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: var(--white);
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 1.1rem;
}

.form-submit:hover {
  background: #333;
}

.consent-text {
  font-size: 0.75rem;
  color: var(--subtle);
  line-height: 1.6;
}

.consent-text a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── CV ─── */

.cv-wrap {
  max-width: 720px;
}

.cv-section {
  margin-bottom: 3rem;
}

.cv-section:last-child {
  margin-bottom: 0;
}

.cv-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1.25rem;
  margin-bottom: 0.9rem;
  align-items: baseline;
}

.cv-year {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.cv-role {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.6;
}

/* ─── MEDIA ─── */

.media-wrap {
  max-width: 66ch;
}

.media-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.media-wrap p {
  font-size: 0.975rem;
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.media-wrap p:last-child {
  margin-bottom: 0;
}

/* ─── PRIVACY ─── */

.privacy-wrap {
  max-width: 66ch;
}

.privacy-wrap h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.privacy-section {
  margin-bottom: 1.75rem;
}

.privacy-section-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
}

.privacy-wrap p {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.privacy-wrap p:last-child {
  margin-bottom: 0;
}

.privacy-wrap > p:first-of-type {
  margin-bottom: 2rem;
}

.privacy-wrap a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-toc {
  font-size: 0.9rem;
  line-height: 1.9;
  padding-left: 1.2rem;
  margin-bottom: 2rem;
}

.privacy-toc li {
  margin-bottom: 0;
}

.privacy-wrap ul:not(.privacy-toc) {
  font-size: 0.95rem;
  line-height: 1.75;
  padding-left: 1.4rem;
  margin-bottom: 0.85rem;
}

.privacy-wrap ul:not(.privacy-toc) li {
  margin-bottom: 0.4rem;
}

.privacy-subsection-heading {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.privacy-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.85rem;
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.6;
}

.privacy-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
}

.privacy-table td {
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0.75rem;
}

.privacy-table tr:last-child td {
  border-bottom: none;
}

.privacy-meta {
  font-size: 0.78rem;
  color: var(--subtle);
  margin-top: 2rem;
}

/* ─── FOOTER ─── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 2rem 2rem 0;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.footer-socials a {
  color: var(--subtle);
  transition: color 0.15s;
}

.footer-socials a:hover {
  color: var(--ink);
}

.footer-company {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.footer-reg {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--subtle);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid var(--rule);
  text-align: center;
  padding: 0.7rem 2rem;
  font-size: 0.72rem;
  color: var(--subtle);
}

/* ─── RESPONSIVE ─── */

@media (max-width: 600px) {
  .site-header { padding: 1.5rem 1.25rem 0; }
  .site-main   { padding: 2.25rem 1.25rem 3rem; }

  .nav-link--email {
    margin-left: 0;
    width: 100%;
  }

  .cv-entry {
    grid-template-columns: 5.5rem 1fr;
    gap: 0 0.75rem;
  }

  .contact-section { max-width: 100%; }
  .flash-messages  { padding: 0 1.25rem; }
  .site-footer     { padding: 1.75rem 1.25rem 0; }
  .footer-bottom   { padding: 0.7rem 1.25rem; }
}
