@font-face {
  font-family: "Fira Code";
  src: url("fonts/FiraCode.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Rokiest";
  src: url("fonts/Rokiest-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f1ede4;
  --ink: #1a1a1a;
  --burgundy: #7c0049;
  --body: #2b2b2b;
  --line: #1a1a1a;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 18px; font-size: 75%; }

body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  font-family: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--body);
  background: var(--bg);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h2, h3 { margin: 0; font-weight: 400; }

.section-title {
  font-family: "Rokiest", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 5.25vw, 4.125rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* DECORATIVE PATTERN */
.deco {
  position: absolute;
  top: 0;
  width: min(23vw, 430px);
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.deco-left { left: 0; }
.deco-right { right: 0; }

/* HEADER */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  padding: 42px 12px 30px;
}
.logo { width: min(330px, 70vw); }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10.5px;
}
.main-nav a {
  padding: 6px 13.5px;
  min-width: 105px;
  text-align: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ABOUT */
.about {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  max-width: 825px;
  margin: 30px auto 0;
  padding: 0 18px 75px;
}

.about-visual {
  position: relative;
  justify-self: end;
  margin-right: 4%;
  width: min(100%, 320px);
  aspect-ratio: 1.39 / 1;
}
.portrait {
  position: absolute;
  left: 58%;
  top: 11%;
  width: 42%;
  z-index: 1;
}
.about-title {
  position: absolute;
  left: 22%;
  top: 36%;
  font-family: "Rokiest", serif;
  font-weight: 400;
  font-size: 3.6rem;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.02em;
  z-index: 2;
}
.balloon { position: absolute; z-index: 2; }
.balloon-making { width: 36%; left: 36%; top: 0; }
.balloon-bringing { width: 36%; left: 0; top: 74%; }
.balloon-dreaming { width: 40%; left: 40%; top: 86%; }

.about-text {
  justify-self: start;
  margin-left: 3%;
  font-size: 1rem;
  text-transform: uppercase;
  line-height: 1.55;
  max-width: 300px;
}
.about-text p { margin: 0 0 1.4em; }
.about-text p:nth-child(n+2) { text-transform: none; }

/* WORK */
.work {
  position: relative;
  z-index: 1;
  max-width: 825px;
  margin: 0 auto;
  padding: 30px 18px 90px;
  text-align: center;
}
.work .section-title { margin-bottom: 27px; }

.subhead {
  display: inline-block;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 33px;
  letter-spacing: 0.02em;
}
.subhead-video { margin-top: 83px; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 36px;
  justify-items: center;
}
.thumb {
  display: block;
  width: 100%;
  max-width: 315px;
  transition: transform 0.25s ease;
}
.thumb img { width: 100%; height: auto; }
.thumb:hover { transform: translateY(-4px); }

/* Odd last item: center it across the row */
.thumbs .thumb:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
}

/* CONTACT */
.contact {
  position: relative;
  z-index: 1;
  max-width: 825px;
  margin: 0 auto;
  padding: 30px 18px 120px;
  text-align: center;
}
.contact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 27px;
}
.contact-balloon { width: min(195px, 60vw); }

/* CONTACT FORM */
.contact-form {
  max-width: 480px;
  margin: 52px auto 0;
  text-align: left;
  display: grid;
  gap: 21px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 21px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-form label > span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.2s;
}
.contact-form select { appearance: none; cursor: pointer; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--burgundy);
  border-bottom-width: 2px;
}
.form-footer {
  display: flex;
  align-items: center;
  gap: 13.5px;
  flex-wrap: wrap;
}
.submit-btn {
  padding: 7.5px 19.5px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.submit-btn:hover { background: var(--ink); color: var(--bg); }
.form-status { margin: 0; font-size: 0.9rem; }

.contact-email {
  margin-top: 82px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  text-align: right;
}
.email-script { width: min(248px, 80vw); }
.contact-email a {
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-all;
}
.contact-email a:hover { color: var(--burgundy); }

/* RESPONSIVE */
@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 80px;
  }
  .about-text { margin: 0 auto; }
  .thumbs { grid-template-columns: 1fr; }
  .contact-email { align-items: center; text-align: center; margin-top: 90px; }
  .deco { width: 30vw; }
}

@media (max-width: 520px) {
  .main-nav a { min-width: 0; flex: 1 1 40%; font-size: 0.75rem; padding: 6px 7.5px; }
  .subhead { font-size: 0.85rem; }
  .about-title { top: 30%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
