﻿:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --text: #17211d;
  --muted: #64716b;
  --line: #dce5df;
  --accent: #0b7a63;
  --accent-strong: #095f4e;
  --accent-soft: #dff3ec;
  --ink: #0f1f1a;
  --shadow: 0 20px 50px rgba(20, 35, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(247, 244, 239, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  filter: grayscale(1);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.15rem;
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.projects-main {
  width: min(1500px, calc(100% - 36px));
}

.hero,
.page-hero,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 42px;
}

.hero.single {
  grid-template-columns: minmax(0, 820px);
}

.page-hero {
  grid-template-columns: minmax(0, 780px);
}

.page-hero.compact {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  color: var(--ink);
  font-size: 1.08rem;
}

.hero-text,
.page-hero p,
.contact-layout p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.hero-panel,
.feature-card,
.project-card,
.contact-form,
.info-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}


.hero-portrait {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
  filter: grayscale(1);
}
.hero-panel {
  padding: 18px;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--surface-soft);
  filter: grayscale(1);
}

.profile-photo.small {
  width: 220px;
  margin: 0;
}

.status,
.tag {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.quick-facts div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts span,
.muted {
  color: var(--muted);
}

.section,
.split-section,
.timeline,
.project-grid {
  padding: 48px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card {
  padding: 24px;
}

.feature-card p,
.project-card p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.info-list {
  overflow: hidden;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list span {
  color: var(--muted);
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-cloud span {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 22px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.date {
  color: var(--accent);
  font-weight: 800;
}

li + li {
  margin-top: 8px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1);
}

.project-card > div {
  padding: 24px;
}

.project-card > div > img {
  width: calc(100% + 48px);
  margin: -24px -24px 24px;
}

.project-card a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.contact-layout {
  align-items: start;
}

.contact-cards {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-cards a {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.contact-form {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.contact-form label {
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.form-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-note.is-warning {
  color: var(--accent-strong);
  font-weight: 700;
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 28px auto 0;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

body.dark-theme {
  color-scheme: dark;
  --bg: #101412;
  --surface: #171f1b;
  --surface-soft: #1d2a24;
  --text: #e9f0ec;
  --muted: #a8b7b0;
  --line: #2b3b34;
  --accent: #59d2aa;
  --accent-strong: #8ce7c7;
  --accent-soft: #18392f;
  --ink: #f5fbf8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

body.dark-theme .site-nav {
  background: rgba(16, 20, 18, 0.9);
}


.competence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0 56px;
}

.competence-card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.competence-card.featured {
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
}

.competence-card.featured img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1);
}

.competence-card.featured > div {
  padding: 24px;
}

.skill-cloud.compact span {
  font-size: 0.92rem;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 0 56px;
}

.experience-card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.experience-card p {
  color: var(--muted);
}
@media (max-width: 1200px) and (min-width: 861px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .competence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
  }

  .brand {
    min-width: 0;
    font-size: 0.98rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    justify-content: stretch;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 6px;
    font-size: 0.82rem;
    text-align: center;
  }

  .hero,
  .page-hero.compact,
  .contact-layout,
  .split-section,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero,
  .contact-layout {
    gap: 22px;
    padding: 34px 0 28px;
  }

  .hero-portrait {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-portrait img {
    aspect-ratio: 1 / 1.08;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-grid,
  .feature-grid.two,
  .competence-grid,
  .experience-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo.small {
    width: min(260px, 100%);
  }

  .project-card img,
  .competence-card.featured img {
    height: 190px;
  }

  .project-card > div,
  .competence-card,
  .experience-card,
  .feature-card,
  .contact-form {
    padding: 18px;
  }

  .project-card > div > img {
    width: calc(100% + 36px);
    margin: -18px -18px 18px;
  }

  .competence-card.featured > div {
    padding: 18px;
  }

  .section,
  .split-section,
  .timeline,
  .project-grid,
  .competence-grid,
  .experience-grid {
    padding: 30px 0;
  }
}

@media (max-width: 560px) {
  main,
  .projects-main,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 2rem;
    line-height: 1.04;
  }

  h2 {
    font-size: 1.45rem;
    line-height: 1.14;
  }

  .hero-text,
  .page-hero p,
  .contact-layout p {
    font-size: 1rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  .nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .info-list div {
    display: grid;
  }

  .skill-cloud {
    gap: 8px;
  }

  .skill-cloud span {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .project-card img,
  .competence-card.featured img {
    height: 170px;
  }
}

@media (max-width: 380px) {
  main,
  .projects-main,
  .site-footer {
    width: min(100% - 18px, 1120px);
  }

  .site-nav {
    padding: 10px 9px;
  }

  .brand {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.78rem;
  }

  .project-card > div,
  .competence-card,
  .experience-card,
  .feature-card,
  .contact-form {
    padding: 16px;
  }
}

/* Mobile readability tuning */
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2.35rem;
    line-height: 1.04;
  }

  h2 {
    font-size: 1.7rem;
    line-height: 1.15;
  }

  h3 {
    font-size: 1.15rem;
  }

  .hero-text,
  .page-hero p,
  .contact-layout p,
  .feature-card p,
  .project-card p,
  .experience-card p,
  .competence-card p {
    font-size: 1.05rem;
  }

  .nav-links a {
    min-height: 44px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .btn {
    min-height: 50px;
    font-size: 1rem;
  }

  .tag {
    font-size: 0.86rem;
    padding: 7px 11px;
  }

  .project-card > div,
  .competence-card,
  .experience-card,
  .feature-card,
  .contact-form {
    padding: 20px;
  }

  .project-card > div > img {
    width: calc(100% + 40px);
    margin: -20px -20px 20px;
  }

  .project-card img,
  .competence-card.featured img {
    height: 210px;
  }

  .skill-cloud span {
    font-size: 0.95rem;
    padding: 9px 11px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 2.05rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .nav-links a {
    font-size: 0.86rem;
  }
}
