/* ===== Arimo Font (locally hosted) ===== */
/* latin-ext subset intentionally omitted — site content is DE/EN only (U+0000-00FF sufficient) */
@font-face {
  font-family: 'Arimo';
  src: url('../fonts/arimo-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Arimo';
  src: url('../fonts/arimo-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Arimo';
  src: url('../fonts/arimo-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Arimo';
  src: url('../fonts/arimo-latin-700-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --primary: #ffc250;
  --primary-dark: #e6a832;
  --primary-darker: #c48a10;
  --secondary: #6c757d;
  --dark: #1a1710;
  --darker: #100e08;
  --light: #f8f9fa;
  --white: #ffffff;
  --accent: #ffc250;
  --accent-light: #ffd580;
  --text: #e0e0e0;
  --text-muted: #9e9e9e;
  --card-bg: #1e1b10;
  --border: rgba(255, 194, 80, 0.12);
  --font: 'Arimo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --transition: 0.3s ease;
  /* Theme-sensitive surface colours (overridden in light mode) */
  --navbar-bg: rgba(16, 14, 8, 0.92);
  --dot-color: rgba(255, 255, 255, 0.04);
  --surface-subtle: rgba(255, 255, 255, 0.06);
  --surface-faint: rgba(255, 255, 255, 0.04);
  --outline-border: rgba(255, 255, 255, 0.25);
  --outline-border-hover: rgba(255, 255, 255, 0.5);
  --outline-bg-hover: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--dark);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

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

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  line-height: 1;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== Page Container ===== */
.page {
  padding-top: 64px;
  min-height: 100vh;
}

/* ===== Hero / Landing ===== */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: radial-gradient(ellipse at 60% 40%, rgba(255, 194, 80, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(230, 168, 50, 0.07) 0%, transparent 50%),
              var(--darker);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot-color) 1px, transparent 0);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  width: clamp(180px, 40vw, 320px);
  height: auto;
  display: block;
  margin: 0 auto 2rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(255, 194, 80, 0.1);
  border: 1px solid rgba(255, 194, 80, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--darker);
  box-shadow: 0 4px 16px rgba(255, 194, 80, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 194, 80, 0.4);
  color: var(--darker);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--outline-border);
}

.btn-outline:hover {
  background: var(--outline-bg-hover);
  border-color: var(--outline-border-hover);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== Tech Stack Chips ===== */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 3rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Section Styles ===== */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== About Page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.about-avatar-wrapper {
  position: sticky;
  top: 84px;
  text-align: center;
}

.avatar-photo-wrapper {
  position: relative;
  margin: 0 auto 1.5rem;
  width: 180px;
  height: 180px;
}

.avatar-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  box-shadow: 0 0 40px rgba(255, 194, 80, 0.25);
  border: 3px solid var(--border);
}

.avatar-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark);
  box-shadow: 0 0 40px rgba(255, 194, 80, 0.25);
  letter-spacing: 0.05em;
}

.about-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.about-role {
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.about-location {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.about-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}

.social-link:hover {
  background: rgba(255, 194, 80, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.about-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface-faint);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all var(--transition);
}

.skill-chip:hover {
  background: rgba(255, 194, 80, 0.08);
  border-color: rgba(255, 194, 80, 0.3);
  color: var(--white);
}

.skill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.info-card-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
}

.info-card-value span {
  color: var(--accent);
}

.info-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Projects Page ===== */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 80px; /* fixed navbar (64px) + breathing room */
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: rgba(255, 194, 80, 0.25);
  box-shadow: var(--shadow);
}

.project-card:hover::before {
  opacity: 0.4;
}

.project-card.is-open::before {
  opacity: 1;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}

.project-card-header:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: calc(var(--radius) - 2px);
}

.project-card-header-info {
  flex: 1;
  min-width: 0;
}

.project-toggle-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
  margin-top: 0.15rem;
}

.project-card.is-open .project-toggle-icon {
  transform: rotate(180deg);
  color: var(--accent);
}

.project-card-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

/* After transitionend the inline max-height is removed; this prevents re-collapse on resize */
.project-card.is-open .project-card-body {
  max-height: none;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 194, 80, 0.12);
  border: 1px solid rgba(255, 194, 80, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0;
}

.project-desc,
.project-desc p,
.project-desc li,
.project-role,
.project-role p,
.project-role li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.project-desc p,
.project-role p {
  margin-bottom: 0.4rem;
}

.project-desc ul,
.project-role ul {
  padding-left: 1.2rem;
  margin: 0.25rem 0;
}

.project-desc li,
.project-role li {
  line-height: 1.65;
  margin-bottom: 0.25rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.project-domain-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-icon-sm {
  font-size: 1rem;
  line-height: 1;
}

.project-domain-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2px;
}

.project-customer-name {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-customer-name::before {
  content: '·';
  margin: 0 0.35rem;
  opacity: 0.6;
}

.project-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.project-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  opacity: 0.8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  padding: 0.25rem 0.65rem;
  background: var(--surface-subtle);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.contact-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.contact-item:hover {
  border-color: rgba(255, 194, 80, 0.3);
}

.contact-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 194, 80, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-text strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-item-text span,
.contact-item-text a {
  color: var(--white);
  font-size: 0.95rem;
}

/* ===== Contact Form ===== */
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-faint);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(255, 194, 80, 0.5);
  background: rgba(255, 194, 80, 0.04);
}

.form-group select option {
  background: var(--dark);
  color: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success .success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form-success h4 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--text-muted);
}

/* ===== Language Toggle ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-toggle-sep {
  color: var(--border);
  font-size: 0.85rem;
  line-height: 1;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  font-family: var(--font);
  line-height: 1.4;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 194, 80, 0.08);
}

/* ===== Theme Toggle ===== */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  line-height: 1;
  display: flex;
  align-items: center;
}

.theme-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 194, 80, 0.08);
}

/* Sun shown in dark mode (click → go light); moon shown in light mode (click → go dark) */
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }

html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-icon-moon { display: block; }

/* ===== Footer ===== */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--accent);
}

/* ===== Impressum Page ===== */
.impressum-content {
  max-width: 760px;
  margin: 0 auto;
}

.impressum-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.impressum-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.impressum-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.impressum-content a {
  color: var(--accent);
}

.impressum-content a:hover {
  color: var(--primary);
}

.impressum-content ul {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.impressum-content ul li {
  margin-bottom: 0.4rem;
}

.impressum-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: var(--surface-subtle);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* ===== Light Mode ===== */
html[data-theme="light"] {
  --dark: #f5f3ee;
  --darker: #eae6da;
  --card-bg: #ffffff;
  --white: #1e1b10;
  --text: #3a3530;
  --text-muted: #7a7060;
  --border: rgba(180, 140, 50, 0.22);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  --navbar-bg: rgba(240, 236, 220, 0.95);
  --dot-color: rgba(0, 0, 0, 0.06);
  --surface-subtle: rgba(0, 0, 0, 0.05);
  --surface-faint: rgba(0, 0, 0, 0.03);
  --outline-border: rgba(30, 27, 16, 0.25);
  --outline-border-hover: rgba(30, 27, 16, 0.45);
  --outline-bg-hover: rgba(0, 0, 0, 0.05);
  /* Dark amber overrides – the bright golden (#ffc250) is unreadable on light
     backgrounds (~1.5:1). These values achieve 5.2:1 on the page bg and
     5.8:1 on card bg, meeting WCAG AA (≥ 4.5:1) for normal text. */
  --accent: #8a5c00;
  --accent-light: #a06a00;
  --primary: #8a5c00;
  --primary-dark: #6b4600;
  --primary-darker: #503400;
}

/* btn-primary needs explicit dark text in light mode (--darker becomes light cream) */
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-primary:hover {
  color: #1e1b10;
}

/* Hero logo: logo.svg uses hardcoded near-white (#e0e0e0) and bright amber (#ffc250)
   fills that are illegible on the light beige background. Place the logo on a dark
   tile so it renders on the surface it was designed for. */
html[data-theme="light"] .hero-logo {
  background: rgba(26, 23, 16, 0.92);
  border-radius: var(--radius);
  padding: 1rem 2rem;
}

/* Navbar icon: amber gradient end (#ffc250) has ~1.4:1 contrast on the light navbar.
   Darken via filter so the icon meets WCAG non-text contrast (≥ 3:1). */
html[data-theme="light"] .navbar-brand img {
  filter: brightness(0.65);
}

/* ===== Project Filter ===== */
.project-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  line-height: 1.5;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 194, 80, 0.08);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.filter-btn--group {
  font-style: italic;
}

.filter-btn--overflow {
  display: none;
}

.project-filter[data-overflow-expanded] .filter-btn--overflow {
  display: inline-block;
}

.filter-btn--toggle-overflow {
  border-style: dashed;
}

.project-card.is-hidden {
  display: none;
}

/* ===== Domain Filter ===== */
.project-filter--domain {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* ===== Accessibility utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--darker);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid var(--accent);
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--darker);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-avatar-wrapper {
    position: static;
  }

  .info-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .info-cards {
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
