:root {
  color-scheme: light;
  --white: #fff;
  --text: #1b3029;
  --body: #5b6675;
  --link: #285641;
  --line: #d6e1dd;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.page { width: min(1160px, calc(100% - 96px)); margin: 0 auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color .18s ease; }
a:hover { color: #123a2a; text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; border-radius: 3px; }
.skip-link { position: absolute; z-index: 40; top: 12px; left: 12px; padding: 10px 16px; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.arrow, .project-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.arrow { display: inline-block; width: 19px; height: 19px; vertical-align: middle; flex: 0 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid #e4eae7; backdrop-filter: blur(12px); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 74px; gap: 24px; }
.wordmark { font: bold 29px/1.1 var(--serif); letter-spacing: -.045em; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 34px; font-size: 16px; }
.site-header nav a { text-decoration: none; color: var(--body); }
.site-header nav a:hover { color: var(--link); }
.hero { background: linear-gradient(120deg, #f7faf8 0%, #fff 48%, #eaf2ed 100%); }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 84px; align-items: center; padding-top: 42px; padding-bottom: 42px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.035em; }
h1 { font-size: clamp(54px, 5.5vw, 76px); line-height: 1.06; margin: 0 0 25px; }
p { color: var(--body); font-size: 17px; line-height: 1.65; margin: 0; }
.profile-copy > p { font-size: 18px; line-height: 1.58; max-width: 620px; }
.profile-copy > p + p { margin-top: 19px; }
.hero-links { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.button { display: inline-flex; align-items: center; gap: 20px; min-height: 52px; padding: 13px 23px; border-radius: 9px; background: linear-gradient(110deg, #285b48, #1e4d3e); background-size: 180% 100%; color: #fff; font-size: 17px; font-weight: 600; text-decoration: none; transition: background-position .2s ease, transform .2s ease, box-shadow .2s ease; }
.button:hover { color: white; background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 5px 14px #214c3c21; text-decoration: none; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; }
.portrait-frame { aspect-ratio: 1 / 1.04; border-radius: 7px; overflow: hidden; box-shadow: 0 1px 8px #1b30290b; }
.portrait { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.projects { padding-top: 40px; padding-bottom: 62px; }
h2 { font-size: 39px; line-height: 1.2; margin: 0; }
.section-heading { display: flex; align-items: center; gap: 28px; margin-bottom: 25px; }
.section-heading > span { height: 1px; background: #c9d9d2; flex: 1; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project { display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid #d8e4df; border-radius: 11px; background: linear-gradient(140deg, #fff, #fbfdfc); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.project:hover, .project:focus-within { border-color: #9eb8aa; box-shadow: 0 8px 24px #173e2d0c; transform: translateY(-3px); }
.project-heading { display: flex; align-items: center; gap: 21px; margin-bottom: 18px; }
.project-icon { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; border-radius: 10px; color: #174b3b; background: linear-gradient(140deg, #edf4f1, #e0ede7); }
.project-icon svg { width: 32px; height: 32px; }
h3 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.025em; }
.project .category { margin-top: 5px; color: #667387; font-size: 15px; line-height: 1.4; }
.project > p:not(.project-stack) { margin-bottom: 10px; }
.project-stack { margin-top: auto; padding-top: 10px; border-top: 1px solid #dde7e3; color: #67768a; font-size: 14px; line-height: 1.6; }
.project-stack span { display: inline-block; margin: 0 5px; }
.project-link { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; font-size: 16px; line-height: 1.5; margin-top: 12px; }
.skills { padding: 50px 0 54px; background: linear-gradient(150deg, #edf5f0 0%, #f8fbf9 52%, #fff 100%); }
.section-intro { font-size: 18px; margin-top: 10px; margin-bottom: 28px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.skill-group { border: 1px solid #cad9d1; border-radius: 10px; padding: 23px 25px 26px; background: #ffffff70; min-width: 0; }
.skill-group h3 { font-size: 23px; margin-bottom: 16px; }
.skill-group p { font-size: 18px; line-height: 1.7; color: #28343e; }
.background { padding-top: 28px; padding-bottom: 44px; border-top: 1px solid #d4ded9; }
.background h2 { font-size: 31px; margin: 20px 0 14px; }
.path { margin: 0; font-size: 17px; line-height: 1.6; color: #38454e; }
.path > div { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 20px; padding: 17px 0; }
.path > div + div { border-top: 1px solid #e0e6e2; }
.path dt { margin: 0; color: #657078; }
.path dd { margin: 0; }
.contact { color: #fff; background: linear-gradient(120deg, #183c30 5%, #234b3c 58%, #1a372e 100%); padding-top: 38px; }
.contact h2 { font-size: 33px; margin-bottom: 12px; }
.contact p { color: #e3eee7; font-size: 17px; }
.contact-links { display: flex; align-items: center; flex-wrap: wrap; gap: 34px; margin-top: 22px; margin-bottom: 28px; }
.contact a { color: #e7f3eb; }
.contact a:hover { color: #fff; }
.contact-button { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid #91b6a2; border-radius: 6px; text-decoration: none; font-size: 17px; transition: background .18s ease; }
.contact-button:hover { text-decoration: none; background: #ffffff10; }
footer { border-top: 1px solid #91af9f70; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 78px; color: #cdded3; font-size: 14px; }
@media (max-width: 1050px) {
  .page { width: calc(100% - 64px); }
  .profile { grid-template-columns: minmax(0, 1fr) 330px; gap: 38px; }
  .profile-copy > p { font-size: 17px; }
  .project { padding: 21px; }
  .project-heading { gap: 16px; }
  .project-icon { width: 50px; height: 50px; flex-basis: 50px; }
  h3 { font-size: 24px; }
  .skill-group { padding: 21px; }
  .skill-group h3 { font-size: 21px; }
  .skill-group p { font-size: 17px; }
}
@media (max-width: 760px) {
  .page { width: calc(100% - 44px); }
  .header-inner { min-height: 64px; gap: 16px; }
  .wordmark { font-size: 25px; }
  .site-header nav { gap: 18px; font-size: 14px; }
  .profile { grid-template-columns: minmax(0, 1fr) 255px; gap: 26px; padding-top: 30px; padding-bottom: 34px; }
  h1 { font-size: 51px; margin-bottom: 18px; }
  .profile-copy > p { font-size: 16px; }
  .hero-links { gap: 20px; margin-top: 24px; }
  .button { min-height: 46px; font-size: 16px; padding: 11px 17px; gap: 14px; }
  .text-link { font-size: 16px; }
  h2 { font-size: 33px; }
  .section-heading { gap: 16px; }
  .project-grid { gap: 18px; }
  .project-heading { align-items: flex-start; }
  .project-icon { width: 43px; height: 43px; flex-basis: 43px; }
  .project-icon svg { width: 27px; height: 27px; }
  h3 { font-size: 23px; }
  .project p { font-size: 16px; }
  .project .project-stack { font-size: 13px; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .path > div { grid-template-columns: 150px minmax(0,1fr); }
}
@media (max-width: 580px) {
  html { scroll-padding-top: 84px; }
  .header-inner { gap: 12px; }
  .wordmark { font-size: 23px; }
  .site-header nav { gap: 15px; font-size: 14px; }
  .profile { display: flex; flex-direction: column; align-items: stretch; padding-top: 24px; gap: 28px; }
  .portrait-frame { order: -1; aspect-ratio: 1.12 / 1; max-height: 315px; }
  h1 { font-size: 51px; line-height: 1.06; }
  .profile-copy > p + p { margin-top: 14px; }
  .hero-links { gap: 26px; }
  .projects { padding-top: 32px; padding-bottom: 38px; }
  .section-heading { margin-bottom: 22px; }
  .section-heading > span { display: none; }
  .section-heading h2 { max-width: 320px; }
  .project-grid { grid-template-columns: 1fr; }
  .project { padding: 21px; }
  .project-heading { align-items: center; margin-bottom: 16px; }
  .project-icon { width: 49px; height: 49px; flex-basis: 49px; }
  .project p { line-height: 1.65; }
  .project-link { margin-top: 14px; }
  .skills { padding-top: 34px; padding-bottom: 32px; }
  .section-intro { font-size: 16px; line-height: 1.6; margin-bottom: 22px; }
  .skill-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-group { padding: 22px; }
  .skill-group h3 { font-size: 23px; margin-bottom: 12px; }
  .skill-group p { font-size: 17px; }
  .background { padding-top: 12px; padding-bottom: 32px; }
  .background h2 { font-size: 29px; }
  .path { font-size: 15px; }
  .path > div { grid-template-columns: 93px minmax(0,1fr); gap: 12px; padding: 14px 0; }
  .contact { padding-top: 30px; }
  .contact h2 { font-size: 30px; }
  .contact p { font-size: 16px; line-height: 1.6; }
  .contact-links { gap: 22px; align-items: flex-start; margin-bottom: 26px; }
  .contact .text-link { font-size: 15px; min-height: 44px; }
  .contact-button { font-size: 16px; }
  .footer-inner { min-height: 74px; font-size: 13px; }
}
@media (hover: none) { .project:hover, .button:hover { transform: none; box-shadow: none; } }
@media (max-width: 380px) {
  .wordmark { font-size: 20px; }
  .site-header nav { gap: 11px; }
  .header-inner { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .project:hover, .project:focus-within, .button:hover { transform: none; }
}
