:root {
  color-scheme: light;
  --bg: #f5f7f3;
  --panel: #ffffff;
  --ink: #17201a;
  --muted: #657066;
  --line: #dfe6db;
  --accent: #166c5f;
  --accent-dark: #0f4f46;
  --warm: #c76f3f;
  --shadow: 0 22px 60px rgba(23, 32, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(245, 247, 243, 0.88);
  border-bottom: 1px solid rgba(223, 230, 219, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a:focus {
  color: var(--accent);
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  padding: 3px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lang-button {
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.lang-button.active {
  background: var(--accent);
  color: #ffffff;
}

.lang-button:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  min-height: calc(100vh - 72px);
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: 820px;
}

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

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(2.2rem, 5.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.12rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

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

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

.profile-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.avatar {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 3px solid #f0d8c4;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(23, 32, 26, 0.16);
}

.profile-panel h2 {
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.profile-panel p {
  color: var(--muted);
}

.quick-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.quick-facts div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.section {
  padding: clamp(64px, 8vw, 104px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 32px;
  align-items: start;
}

.two-column > p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
}

.highlight-box {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: #e8f1ef;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
}

.highlight-box span {
  color: var(--muted);
}

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

.project-card {
  min-height: 310px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-meta {
  margin-bottom: 36px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card p,
.timeline-item p,
.contact p {
  color: var(--muted);
}

.project-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.playable-section {
  background: #ffffff;
}

.playable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.playable-project {
  border-color: rgba(22, 108, 95, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #eef7f4 100%);
}

.fruity-project {
  border-color: rgba(199, 111, 63, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #fff6e8 100%);
}

.taskflow-project {
  border-color: rgba(59, 130, 196, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #edf7ff 100%);
}

.fruity-project {
  border-color: rgba(199, 111, 63, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, #fff3df 100%);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  background: var(--accent);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
}

.secondary-link {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.project-link:hover,
.project-link:focus {
  background: var(--accent-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.timeline-section {
  background: #ffffff;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.timeline-item span {
  color: var(--accent);
  font-weight: 800;
}

.skills-section {
  background: #eef3ea;
}

.skill-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
}

.skill-groups h3 {
  margin-bottom: 14px;
}

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

.skills span {
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 32px;
  padding: clamp(64px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: #ffffff;
}

.contact p {
  max-width: 640px;
}

.contact-links {
  display: grid;
  gap: 12px;
  align-content: start;
}

.contact-links a {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-links a:hover,
.contact-links a:focus {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 900px) {
  .hero,
  .two-column,
  .skill-groups,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
  }

  .nav {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    gap: 8px 14px;
    font-size: 0.88rem;
  }

  .language-switch {
    width: auto;
  }

  .lang-button {
    min-width: 38px;
    height: 32px;
  }

  .hero,
  .section,
  .contact {
    padding: 44px 18px;
  }

  .hero {
    gap: 24px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 9.5vw, 2.95rem);
    line-height: 1.06;
  }

  h2 {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
    line-height: 1.12;
  }

  .hero-copy,
  .two-column > p {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .button {
    width: 100%;
  }

  .profile-panel {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }

  .avatar {
    width: 76px;
    height: 76px;
  }

  .quick-facts {
    grid-column: 1 / -1;
  }

  .profile-panel,
  .project-card,
  .highlight-box {
    padding: 20px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }

  .project-meta {
    margin-bottom: 20px;
  }

  .skills {
    gap: 8px;
  }

  .skills span {
    border-radius: 8px;
    font-size: 0.92rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    position: static;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nav a {
    padding: 6px 0;
  }

  h1 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

  .hero,
  .section,
  .contact {
    padding-left: 16px;
    padding-right: 16px;
  }
}
