:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #171717;
  --muted: #67645f;
  --line: #ded9cf;
  --accent: #314f43;
  --accent-strong: #22372f;
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.08);
}

:root.dark {
  color-scheme: dark;
  --bg: #111312;
  --surface: #191c1a;
  --text: #f2f0eb;
  --muted: #aaa39a;
  --line: #2c302d;
  --accent: #a9c7b8;
  --accent-strong: #d5eadf;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 72px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  backdrop-filter: blur(18px);
}

.logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav a,
.social-links a,
.project-card a {
  transition: color 180ms ease;
}

.nav a:hover,
.social-links a:hover,
.project-card a:hover {
  color: var(--accent-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-toggle,
.theme-toggle {
  display: grid;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.language-toggle {
  min-width: 48px;
  padding: 0 12px;
  font-weight: 700;
}

.theme-toggle {
  width: 42px;
}

main {
  padding: 0 clamp(20px, 5vw, 72px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  align-content: center;
  min-height: calc(100vh - 87px);
  max-width: 1180px;
  padding: 84px 0 96px;
}

.hero-content {
  min-width: 0;
}

.hero-portrait {
  display: grid;
  width: 220px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-portrait img {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}

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

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

h1 {
  max-width: 980px;
  margin-bottom: 28px;
  font-size: clamp(3.1rem, 9vw, 7.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h1 span {
  color: var(--accent-strong);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 16px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.availability {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 34px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--bg);
}

.button.secondary {
  color: var(--accent-strong);
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

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

.project-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

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

.project-card a,
.certificate-card a {
  color: var(--accent-strong);
  font-weight: 700;
}

.project-year {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.project-tags,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags {
  margin: 0 0 20px;
}

.project-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.project-actions {
  margin-top: 18px;
}

.project-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
}

.about {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(32px, 7vw, 96px);
}

.about-content p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.skills li {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.certificate-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.certificate-card img {
  width: 150px;
  height: 108px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.certificate-card h3 {
  margin-bottom: 12px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact h2 {
  max-width: 760px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header {
    gap: 14px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding-top: 68px;
  }

  .section-heading,
  .contact,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-grid,
  .about,
  .certificate-grid,
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    width: min(220px, 100%);
  }

  .project-card {
    min-height: 250px;
  }

  .certificate-card {
    grid-template-columns: 1fr;
  }

  .certificate-card img {
    width: 100%;
    height: auto;
    max-height: 220px;
  }
}

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

  .nav {
    font-size: 0.88rem;
  }

  .button {
    width: 100%;
  }
}