@font-face {
  font-family: "Austin Cyr";
  src: url("assets/austin-cyr-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #e9e7df;
  --light: #f6f4ed;
  --ink: #11110f;
  --muted: #68665f;
  --dark: #151513;
  --dark-line: #393936;
  --dark-muted: #a5a29a;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin-top: 0; }
p, li { text-wrap: pretty; }
h2, h3 { text-wrap: balance; }

header { position: fixed; top: 22px; right: 28px; z-index: 10; display: flex; gap: 8px; padding: 6px; border-radius: 30px; background: rgba(246,244,237,.88); backdrop-filter: blur(12px); box-shadow: 0 5px 24px rgba(17,17,15,.08); }
header a { padding: 8px 13px; border-radius: 20px; font-size: 12px; }
header a:hover { background: var(--ink); color: var(--light); }

main, footer { width: 100%; max-width: none; margin: 0; }
main { display: flex; flex-direction: column; gap: 18px; padding: 18px; }
.intro { order: 1; }
.profile-summary { order: 2; }
#projects { order: 3; }
#experience { order: 4; }
#skills { order: 5; }
.contact { order: 6; }

section { padding: clamp(70px, 8vw, 112px) clamp(24px, 5vw, 72px); }
h2 { margin: 0 0 54px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .11em; }
h3 { margin-bottom: 8px; font-size: 25px; line-height: 1.15; letter-spacing: -.025em; font-weight: 500; }

.intro { min-height: calc(100svh - 36px); display: grid; grid-template-rows: auto 1fr auto; padding: 28px 34px 34px; border-radius: 6px; background: var(--light); }
.intro-label, .intro-bottom { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.intro-main { align-self: center; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 390px); gap: 60px; align-items: end; padding: 70px 0; }
h1 { margin: 0; font-family: "Austin Cyr", Georgia, serif; font-size: clamp(88px, 12vw, 172px); line-height: .72; letter-spacing: -.055em; font-weight: 400; }
.intro-main > p { margin: 0 0 4px; max-width: 380px; font-size: clamp(22px, 2.2vw, 31px); line-height: 1.12; letter-spacing: -.035em; }
.intro-bottom { align-items: flex-end; }
.intro-bottom p { margin: 0; }
.intro-bottom a { color: var(--ink); font-size: 14px; }
.intro-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }

.profile-summary { display: grid; grid-template-columns: 26% 1fr; gap: 44px; border-radius: 6px; background: var(--light); }
.profile-summary h2 { margin-top: 8px; }
.profile-summary > div { max-width: 850px; }
.profile-summary p { margin-bottom: 18px; font-size: clamp(23px, 2.8vw, 38px); line-height: 1.16; letter-spacing: -.035em; }
.profile-summary p:last-child { margin-bottom: 0; color: var(--muted); }

#projects { border-radius: 6px; background: var(--dark); color: #f1efe8; }
#projects h2 { color: var(--dark-muted); }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: project; border-top: 1px solid var(--dark-line); border-left: 1px solid var(--dark-line); }
.project { min-width: 0; counter-increment: project; border-right: 1px solid var(--dark-line); border-bottom: 1px solid var(--dark-line); }
.project a { min-height: 285px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: 20px; padding: 30px; transition: background .2s ease, color .2s ease; }
.project h3 { margin: 0; font-family: "Austin Cyr", Georgia, serif; font-size: clamp(36px, 4vw, 54px); line-height: .92; font-weight: 400; letter-spacing: -.035em; }
.project h3::before { content: counter(project, decimal-leading-zero); display: block; margin-bottom: 14px; color: var(--dark-muted); font-family: "Avenir Next", Avenir, sans-serif; font-size: 11px; line-height: 1; font-style: normal; letter-spacing: .04em; }
.project p { grid-column: 1 / -1; align-self: end; max-width: 520px; margin: 0; color: #cfccc4; line-height: 1.4; }
.project span { color: var(--dark-muted); font-size: 12px; }
.project b { white-space: nowrap; color: var(--dark-muted); font-size: 12px; font-weight: 400; transition: transform .2s ease, color .2s ease; }
.project b::before { content: "Figma "; }
.project a:hover { background: #f1efe8; color: var(--ink); }
.project a:hover p, .project a:hover span, .project a:hover h3::before { color: var(--muted); }
.project a:hover b { color: var(--ink); }
.project a:hover b { transform: translate(3px, -3px); }

#experience { border-radius: 6px; background: var(--light); }
.job { display: grid; grid-template-columns: 30% 1fr; gap: 52px; padding: 34px 0; }
.job + .job { border-top: 1px solid #d4d1c8; }
.job > div:last-child { max-width: 730px; }
.job p { margin-bottom: 14px; }
.job ul { margin: 0; padding-left: 18px; }
.job li { margin-bottom: 6px; }
.date, .position { display: block; color: var(--muted); font-size: 12px; }
.position { margin-bottom: 3px !important; color: var(--ink); }

#skills { display: grid; grid-template-columns: 26% 1fr; gap: 44px; border-radius: 6px; background: var(--dark); color: #f1efe8; }
#skills h2 { margin-top: 9px; color: var(--dark-muted); }
.skills { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 9px; }
.skills p { margin: 0; padding: 9px 13px; border: 1px solid var(--dark-line); border-radius: 3px; background: #1d1d1b; color: #d8d5cd; font-size: 13px; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.skills p:hover { border-color: #f1efe8; background: #f1efe8; color: var(--ink); }

.contact { min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 6px; background: var(--light); }
.contact h2 { margin-bottom: 60px; }
.contact a { align-self: stretch; min-height: 1.05em; text-align: right; font-size: clamp(42px, 7vw, 88px); line-height: .95; letter-spacing: -.055em; }
.contact a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
footer { padding: 12px 34px 34px; color: var(--muted); font-size: 12px; }

@media (min-width: 761px) {
  header { opacity: 0; transform: translateY(-14px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
  header.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
}

@media (max-width: 760px) {
  header { top: auto; right: 14px; bottom: 14px; left: 14px; justify-content: space-between; box-shadow: 0 5px 30px rgba(17,17,15,.16); }
  header a { padding: 9px 10px; }
  main { gap: 10px; padding: 10px; }
  section { padding: 58px 22px; }
  .intro { min-height: calc(100svh - 20px); padding: 22px; }
  .intro-label span:last-child { display: none; }
  .intro-main { grid-template-columns: 1fr; gap: 38px; align-self: center; padding: 64px 0; }
  h1 { font-size: clamp(78px, 25vw, 108px); }
  .intro-main > p { max-width: 320px; font-size: 22px; }
  .intro-bottom { display: grid; gap: 10px; }
  .profile-summary { grid-template-columns: 1fr; gap: 4px; }
  .profile-summary p { font-size: 23px; }
  .projects { grid-template-columns: 1fr; }
  .project a { min-height: 245px; padding: 24px; }
  .project h3 { font-size: 42px; }
  .project p { font-size: 15px; }
  .job { grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
  #skills { grid-template-columns: 1fr; gap: 4px; }
  .skills { gap: 7px; }
  .skills p { padding: 8px 10px; font-size: 12px; }
  .contact { min-height: 300px; }
  .contact a { text-align: left; font-size: 40px; }
  footer { padding: 12px 22px 90px; }
}
