/* Mobile-first base styles */

:root {
  --ribbon-color: #002347;
  --accent-blue: #4a90e2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  /* no top/bottom border on mobile; sides stay inset for header/footer content */
  padding: 0 1rem;
}

header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.header-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.montserrat-thin {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-size: x-large;
}

.elevator-pitch {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  line-height: 1.6;
  color: #767b83;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-photo:hover {
  transform: scale(1.03);
}

.ribbon {
  --f: .5em; /* fold size, top-left */
  --r: 0; /* point size, right end (no point on mobile) */

  display: flex;
  align-items: center;
  align-self: stretch;
  /* offsets body's 1rem padding so the ribbon meets the screen edges */
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 0.75em 1.5em 0.75em calc(0.75em + var(--f));
  background: var(--ribbon-color);
  color: #fff;
  border-top: var(--f) solid #0005;
  border-right: var(--r) solid #0000;
  clip-path: polygon(
    0 100%, 0 var(--f), var(--f) 0,
    var(--f) var(--f), 100% var(--f),
    calc(100% - var(--r)) calc(50% + var(--f) / 2), 100% 100%
  );
  /* clip-path clips box-shadow too, so use drop-shadow instead */
  filter: drop-shadow(10px 12px 4px rgb(0 0 0 / 0.45));
}

.tagline {
  color: rgb(255 255 255 / 0.85);
}

header h1,
.tagline {
  white-space: nowrap;
}

main {
  /* bleed to fill the screen, cancelling body's 1rem padding */
  margin: 0 -1rem;
  padding: 1.5rem 1rem;
  background: #f2f2f2;
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--ribbon-color);
  color: #fff;
  border-radius: 0;
  box-shadow: 10px 12px 14px rgb(0 0 0 / 0.45);
}

section > h2 {
  /* in-flow (not absolutely positioned) so it still pushes later
     content down correctly even when it wraps to multiple lines */
  align-self: flex-start;
  margin-top: -2.25rem;
  background: var(--accent-blue);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.5em 1em;
  box-shadow: 6px 8px 10px rgb(0 0 0 / 0.4);
}

section a {
  color: #9fc2ff;
}

section ul {
  list-style: none;
}

.section-subtitle {
  color: rgb(255 255 255 / 0.75);
  font-style: italic;
}

.project-media-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-figure {
  margin: 0.25rem 0;
}

.project-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.project-figure figcaption {
  font-size: 0.8rem;
  color: rgb(255 255 255 / 0.6);
  margin-top: 0.35rem;
}

#intro {
  text-align: center;
  background: none;
  color: inherit;
  box-shadow: none;
  padding: 0;
  margin: 2rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgb(255 255 255 / 0.07);
  padding: 1rem;
  box-shadow: 6px 8px 10px rgb(0 0 0 / 0.3);
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1rem 0 0.5rem;
  color: #767b83;
  font-size: 0.8rem;
}

.back-to-top {
  color: var(--accent-blue);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.75rem;
}

.back-to-top:hover {
  text-decoration: underline;
}

.plain-link,
.plain-link:visited {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.85rem;
  color: rgb(255 255 255 / 0.75);
}

.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.6em 0.75em;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.07);
  color: #fff;
  border-radius: 3px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.form-field textarea {
  resize: vertical;
}

.btn-submit {
  align-self: flex-start;
  font: inherit;
  font-weight: 700;
  padding: 0.6em 1.5em;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 6px 8px 10px rgb(0 0 0 / 0.3);
}

.btn-submit:hover {
  background: #3a7bc8;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgb(0 0 0 / 0.75);
}

.modal-overlay .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--ribbon-color);
  color: #fff;
  box-shadow: 10px 12px 14px rgb(0 0 0 / 0.45);
}

.modal-overlay .close,
.modal-overlay .modal-close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: rgb(255 255 255 / 0.7);
}

.modal-overlay .close:hover,
.modal-overlay .modal-close:hover {
  color: #fff;
}

.bio-modal .modal-content {
  background: #f2f2f2;
  color: #333;
}

.bio-modal .modal-close {
  color: rgb(0 0 0 / 0.4);
}

.bio-modal .modal-close:hover {
  color: #000;
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  clear: both;
}

.bio-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bio-label {
  align-self: flex-start;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3em 0.7em;
  box-shadow: 3px 4px 6px rgb(0 0 0 / 0.25);
}

.bio-text a {
  color: #9fc2ff;
}

.bio-modal .bio-text a {
  color: var(--accent-blue);
}
