:root {
  color-scheme: dark;
  --bg: #171717;
  --panel: #202020;
  --text: #f0eee8;
  --muted: #a5a5a0;
  --border: #373735;
  --accent: #f34d3f;
  --soft: #232321;
  --gutter: 24px;
  --section-space: 60px;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f1efe9;
  --panel: #fff;
  --text: #202020;
  --muted: #676761;
  --border: #d4d1c9;
  --accent: #bd3228;
  --soft: #e8e5dd;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a,
button {
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}
a:hover {
  color: var(--accent);
}
:where(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
header,
main,
footer {
  max-width: 1280px;
  margin-inline: auto;
}
h1,
h2,
h3 {
  font-family: 'Manrope', Arial, sans-serif;
}
h2 {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -1.2px;
  line-height: 1.25;
  margin: 0 0 25px;
}
em {
  font-style: normal;
  color: var(--muted);
}
strong {
  font-weight: 600;
  color: var(--text);
}
.logo span,
h1 span,
h2 > span,
.visual-title > span {
  color: var(--accent);
}
.skip {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 20;
  background: var(--bg);
  padding: 12px;
}
.skip:focus {
  top: 15px;
}

.button {
  min-height: 48px;
  padding: 15px 20px;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-weight: 500;
  cursor: pointer;
}
.primary {
  background: #c6372c;
  color: #fff;
}
.primary:hover {
  background: #aa2d25;
  color: #fff;
  transform: translateY(-2px);
}
.text-link {
  min-height: 44px;
  font-size: 14px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.arrow-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: middle;
  flex-shrink: 0;
}
.arrow-icon.down {
  transform: rotate(90deg);
}
.eyebrow,
.section-label,
.small,
.tiny,
.hero-foot,
.surname,
.mini-toolbar,
.project-visual-caption {
  font-family: monospace;
  letter-spacing: 1.3px;
}
.eyebrow,
.section-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.section-label {
  padding-top: 8px;
}
.small {
  display: none;
  font-size: 10px;
  color: var(--muted);
}

header {
  padding: 14px 20px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -3px;
  min-width: 44px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-self: start;
}
nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 32px;
}
nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  padding: 10px 4px;
  border-radius: 24px;
  color: var(--muted);
}
nav a.active {
  background: var(--text);
  color: var(--bg);
}
nav a:last-child span {
  display: none;
  margin-left: 8px;
  color: var(--accent);
}
nav .arrow-icon {
  width: 10px;
  height: 10px;
}
#theme {
  grid-column: 2;
  grid-row: 1;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.hero {
  padding: 32px var(--gutter) 24px;
  min-height: 570px;
  display: flex;
  flex-direction: column;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.hero-top .eyebrow {
  max-width: 230px;
}
.location {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 7px;
}
.name {
  padding: 70px 0 48px;
}
.name h1 {
  font-size: clamp(42px, 13.5vw, 174px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.08em;
  margin: 0;
}
.surname {
  display: block;
  text-align: right;
  font-size: 9px;
  letter-spacing: 5px;
  margin-top: 10px;
  padding-right: 9px;
  color: var(--muted);
}
.hero-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.hero-bottom p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}
.hero-bottom p span {
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 25px;
}
.hero-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
  margin-top: auto;
  padding-top: 45px;
}
.hero-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-align: right;
}
.stack {
  margin: 0 var(--gutter);
  border-block: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
.stack i {
  font-family: Arial, sans-serif;
  font-style: normal;
  color: var(--accent);
  font-size: 20px;
}
.section {
  margin: 0 var(--gutter);
  padding: var(--section-space) 0;
  border-bottom: 1px solid var(--border);
}
.about {
  display: grid;
  gap: 28px;
}
.about p {
  max-width: 590px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.section-heading h2 {
  margin: 22px 0 0;
}
.project {
  display: grid;
  gap: 28px;
  margin-top: 36px;
  align-items: center;
  min-width: 0;
}
.project + .project {
  margin-top: 55px;
}
.project-visual {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  min-height: 330px;
}
.project-shot {
  min-height: 0;
  background: #eef2f6;
}
.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1363 / 936;
  object-fit: cover;
}
.live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 7px 10px;
  border-radius: 4px;
  background: #0a436d;
  color: #fff;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.project-visual--dark {
  --visual-text: #eee;
  --visual-muted: #b8bdb0;
  --visual-border: #ffffff24;
  background: #222422;
  color: var(--visual-text);
}
.project-visual--light {
  --visual-text: #252525;
  --visual-muted: #56564f;
  --visual-border: #25252530;
  background: #e7e4dc;
  color: var(--visual-text);
}
.mini-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--visual-border);
  font-size: 9px;
  line-height: 1.6;
  color: var(--visual-muted);
  gap: 8px;
}
.red-dot {
  display: inline-block;
  background: #c6372c;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  margin-right: 7px;
}
.project-visual-body {
  padding: 26px 24px;
}
.tiny {
  font-size: 9px;
  color: var(--visual-muted);
}
.visual-title {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -1.6px;
  margin-top: 14px;
}
.data-lines {
  margin-top: 22px;
}
.data-lines > div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--visual-border);
  font-size: 11px;
  color: var(--visual-muted);
}
.data-lines > div > span:first-child {
  flex: 1;
}
.data-lines > div > span:last-child {
  margin-left: auto;
  color: var(--visual-text);
}
.line {
  height: 4px;
  background: var(--visual-muted);
  border-radius: 3px;
  flex-shrink: 1;
}
.long {
  width: 80px;
}
.medium {
  width: 60px;
}
.short {
  width: 40px;
}
.source-tag {
  margin-top: 17px;
  font-family: monospace;
  font-size: 10px;
  color: var(--visual-muted);
}
.project-visual-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--visual-muted);
}
.project-copy {
  min-width: 0;
}
.project-copy h3 {
  font-weight: 500;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 18px 0;
}
.project-copy h3 br {
  display: none;
}
.project-copy p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 23px 0;
}
.tags span {
  font-family: monospace;
  font-size: 11px;
  border: 1px solid var(--border);
  padding: 6px 9px;
  border-radius: 4px;
  color: var(--muted);
}
.project-live-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: -6px 0 17px;
  border-bottom: 1px solid var(--text);
  color: var(--text);
  font-size: 14px;
}
details {
  border-top: 1px solid var(--border);
}
summary {
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 14px;
}
summary::-webkit-details-marker {
  display: none;
}
summary span {
  color: var(--accent);
  font-size: 18px;
}
details[open] summary span {
  transform: rotate(45deg);
}
.project-copy details p {
  font-size: 14px;
  margin-top: 0;
}
.all-work {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 25px;
  margin-top: 55px;
  color: var(--muted);
}
.all-work span {
  color: var(--text);
}

.contact-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}
.contact h2 {
  font-size: clamp(32px, 5.6vw, 72px);
  letter-spacing: -1.7px;
  line-height: 1.15;
}
.contact-arrow {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.contact-arrow .arrow-icon {
  width: 26px;
  height: 26px;
}
.contact-arrow:hover {
  color: #fff;
  background: #c6372c;
  border-color: #c6372c;
  transform: rotate(5deg);
}
.contact-bottom p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}
.contact-bottom .button {
  margin-top: 13px;
}
.contact-form {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 850px;
}
.form-grid {
  display: grid;
  gap: 20px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  margin-bottom: 20px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-width: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 15px;
  font-size: 16px;
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.form-actions button {
  width: 100%;
}
.form-actions button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.form-actions p,
.form-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.form-note {
  max-width: 650px;
}
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 14px;
}
.email-row > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}
#copy-email {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
#copy-email:hover {
  background: var(--soft);
}
#copy-status {
  color: var(--muted);
  font-size: 13px;
}

footer {
  padding: 28px var(--gutter) 16px;
}
.footer-top,
.footer-bottom {
  display: flex;
  gap: 14px;
}
.footer-top {
  align-items: flex-start;
  flex-direction: column;
}
.footer-signature {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -1px;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.footer-signature > span {
  color: var(--accent);
}
.footer-links {
  display: flex;
  width: 100%;
  gap: 10px;
}
.footer-links a,
.back-top {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  font-size: 14px;
}
.footer-links a {
  flex: 1;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 4px;
  gap: 12px;
  padding: 12px 16px;
}
.footer-bottom {
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 16px;
  color: var(--muted);
  font-size: 11px;
}
.back-top {
  gap: 14px;
  padding-right: 0;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

@media (min-width: 600px) {
  :root {
    --section-space: 70px;
  }
  header {
    height: 104px;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  nav {
    display: flex;
    width: auto;
  }
  nav a {
    padding: 12px 16px;
  }
  nav a:last-child span {
    display: inline;
  }
  .hero {
    padding-top: 42px;
    min-height: 560px;
  }
  .hero-top {
    align-items: center;
  }
  .hero-top .eyebrow {
    max-width: none;
  }
  .name {
    padding-top: 80px;
  }
  .hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
  }
  .hero-actions {
    margin-top: 0;
  }
  .hero-foot {
    font-size: 9px;
  }
  .stack {
    justify-content: space-between;
    gap: 12px;
  }
  .contact-arrow {
    width: 80px;
    height: 80px;
  }
  .contact-arrow .arrow-icon {
    width: 42px;
    height: 42px;
  }
  .contact-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
  }
  .contact-bottom .button {
    margin-top: 0;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-actions button {
    width: auto;
  }
  .footer-top {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
  .footer-links {
    width: auto;
  }
  .footer-bottom {
    font-size: 12px;
  }
}
@media (min-width: 900px) {
  :root {
    --gutter: 48px;
    --section-space: 100px;
  }
  h2 {
    font-size: 38px;
    letter-spacing: -1.7px;
  }
  nav a {
    padding-inline: 22px;
  }
  .hero {
    padding-top: 66px;
    min-height: 650px;
  }
  .hero-bottom p {
    font-size: 21px;
  }
  .surname {
    font-size: 11px;
    letter-spacing: 7px;
  }
  .stack {
    font-size: 14px;
    padding-block: 25px;
  }
  .about {
    grid-template-columns: 1fr 2fr;
    gap: 55px;
  }
  .about p {
    font-size: 16px;
  }
  .small {
    display: inline;
  }
  .section-heading {
    margin-bottom: 48px;
  }
  .section-heading h2 {
    font-size: 36px;
  }
  .project {
    grid-template-columns: 1.2fr 1fr;
    gap: 62px;
    margin-top: 50px;
  }
  .project-visual {
    min-height: 350px;
  }
  .project-visual-body {
    padding: 30px 34px;
  }
  .project-copy h3 {
    font-size: 30px;
  }
  .project-copy h3 br {
    display: inline;
  }
  .project-copy p,
  details {
    max-width: 365px;
  }
  .contact h2 {
    letter-spacing: -3px;
  }
  .contact-arrow {
    width: 118px;
    height: 118px;
  }
  .contact-arrow .arrow-icon {
    width: 60px;
    height: 60px;
  }
  footer {
    padding-block: 36px 24px;
  }
}
@media (min-width: 1500px) {
  .hero {
    min-height: 730px;
  }
  .name {
    padding-top: 90px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .primary,
  nav a.active {
    border: 1px solid ButtonText;
  }
  :focus-visible {
    outline: 2px solid Highlight;
  }
}
