
:root {
  --cream: #f8f7f1;
  --teal: #287873;
  --dark: #183c4a;
  --gold: #f1b638;
  --white: #ffffff;
  --muted: #657875;
  --border: #d7e8e3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  background: var(--cream);
  color: var(--dark);
  font-family: "DM Sans", sans-serif;
}

body.popup-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* NAVBAR */

.navbar {
  position: relative;
  z-index: 20;
  width: 86%;
  max-width: 1360px;
  min-height: 116px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 24px;
}

.logo {
  color: #292929;
  font-size: clamp(23px, 2.4vw, 34px);
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.logo span {
  color: var(--teal);
  font-weight: 700;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(15px, 2.2vw, 32px);
}

.nav-links > a {
  position: relative;
  color: #294957;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links > a:hover,
.nav-links > a.active {
  color: var(--teal);
}

.nav-links > a.active::before {
  content: "•";
  margin-right: 5px;
}

.nav-links > a.active::after {
  content: "•";
  margin-left: 5px;
}

/* ABOUT ME BADGE */

.nav-links > a.special-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.special-nav-link .nav-badge {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--gold);
  color: var(--dark);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px #183c4a20;
  animation: badge-float 2s ease-in-out infinite;
}

.special-nav-link .nav-badge::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gold);
}

.external-arrow {
  color: var(--teal);
}

@keyframes badge-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--dark);
  font-size: 27px;
  cursor: pointer;
}

/* HERO */

.hero {
  position: relative;
  width: min(1360px, 86%);
  min-height: min(780px, calc(100svh - 116px));
  margin: 0 auto;
  overflow: hidden;
}

.intro {
  position: absolute;
  z-index: 2;
  top: 19%;
  left: 0;
}

.intro h1 {
  color: var(--dark);
  font-family: "Patrick Hand", cursive;
  font-size: clamp(32px, 3vw, 46px);
}

.intro h2 {
  margin-top: 12px;
  color: var(--gold);
  font-size: clamp(30px, 3.3vw, 49px);
  overflow-wrap: anywhere;
}

.tagline {
  position: absolute;
  top: 17%;
  right: 0;
  text-align: right;
  font-size: clamp(14px, 1.3vw, 20px);
  line-height: 1.65;
}

.portrait {
  position: absolute;
  left: 42%;
  bottom: 1%;
  width: 33%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 5px solid #f9e9bd;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 -5px 0 var(--gold);
}

.portrait img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 115%;
  object-fit: contain;
  object-position: center bottom;
}

.curved-arrow {
  position: absolute;
  top: 42%;
  left: 7%;
  width: 28%;
  color: var(--teal);
}

.experience {
  position: absolute;
  top: 76%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.experience strong {
  color: var(--teal);
  font-size: 38px;
}

.experience span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.signature {
  position: absolute;
  right: 0;
  bottom: 2%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signature span {
  font-family: "Pacifico", cursive;
  font-size: 36px;
  transform: rotate(-5deg);
}

.signature strong {
  margin-left: 35px;
  color: var(--teal);
  font-size: 23px;
}

/* GENERAL SECTIONS */

.below {
  padding: 80px 7%;
  text-align: center;
}

.below > h2 {
  margin-bottom: 15px;
  color: var(--dark);
  font-size: clamp(28px, 3vw, 36px);
}

.below > p {
  line-height: 1.8;
}

.section-description {
  color: #294957;
}

/* INTERESTS AND PROJECTS */

.interest-container,
.project-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  width: 100%;
  max-width: 1050px;
  margin: 40px auto 0;
}

.cool-box {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  max-width: 440px;
  min-height: 240px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #f5faf8);
  box-shadow: 0 8px 25px #183c4a0f;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.cool-box:hover {
  transform: translateY(-7px);
  border-color: var(--teal);
  box-shadow: 0 18px 40px #28787324;
}

.cool-box::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(110deg, transparent, #ffffffcc, transparent);
  transform: skewX(-20deg);
  transition: left 0.65s;
  pointer-events: none;
}

.cool-box:hover::before {
  left: 150%;
}

.box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}

.box-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e4f3ef;
  color: var(--teal);
  font-size: 25px;
  font-weight: 700;
  transition: transform 0.3s;
}

.cool-box:hover .box-icon {
  transform: rotate(-8deg) scale(1.08);
}

.box-top > span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.cool-box h3 {
  margin-bottom: 12px;
  color: var(--dark);
  font-size: 23px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cool-box p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.progress {
  height: 4px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 10px;
  background: #e2eeea;
}

.progress-fill {
  width: 65%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #65b9a7);
  transition: width 0.4s;
}

.cool-box:hover .progress-fill {
  width: 100%;
}

/* CONTACT SECTION */

.contact-section {
  background: var(--cream);
}

.contact-section > h2 {
  margin-bottom: 12px;
}

.contact-section > h2 span {
  color: var(--teal);
}

.contact-section > .section-description {
  max-width: 550px;
  margin: 0 auto;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: start;
  gap: 28px;
  width: 100%;
  max-width: 1050px;
  margin: 45px auto 0;
  text-align: left;
}

.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #f5faf8);
  box-shadow: 0 8px 25px #183c4a0a;
  text-align: left;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 15px 35px #28787321;
}

.contact-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e4f3ef;
  color: var(--teal);
  font-size: 24px;
  font-weight: 700;
  transition: transform 0.3s;
}

.contact-card:hover .contact-icon {
  transform: rotate(-6deg) scale(1.07);
}

.contact-card-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.contact-card-text strong {
  color: var(--dark);
  font-size: 16px;
}

.contact-card-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.contact-arrow {
  color: var(--teal);
  font-size: 23px;
  transition: transform 0.25s;
}

.contact-card:hover .contact-arrow {
  transform: translate(3px, -3px);
}

.contact-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 5px;
  color: var(--muted);
  font-size: 13px;
}

.availability-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px #28787318;
}

/* CONTACT FORM */

.contact-form-card {
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 35px #183c4a0f;
}

.contact-form-card h3 {
  margin-bottom: 9px;
  font-size: 25px;
}

.form-intro {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce8e4;
  border-radius: 11px;
  outline: none;
  background: #fbfcfa;
  color: var(--dark);
  font-size: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a0afaa;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  background: white;
  box-shadow: 0 0 0 4px #28787317;
}

.form-group textarea {
  resize: vertical;
}

.contact-submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 51px;
  padding: 14px 20px;
  border: 0;
  border-radius: 11px;
  background: var(--teal);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-3px);
  background: var(--dark);
  box-shadow: 0 10px 25px #28787333;
}

.contact-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-submit span:last-child {
  font-size: 20px;
}

.form-status {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: #e4f3ef;
  color: #205f54;
}

.form-status.error {
  background: #fff0ed;
  color: #9b3434;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* EMAIL POPUP */

.email-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #0c1d23a6;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}

.email-popup-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.email-popup {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 38px 30px 28px;
  border: 1px solid #28787340;
  border-radius: 25px;
  background: var(--cream);
  color: var(--dark);
  box-shadow: 0 25px 90px #00000040;
  text-align: center;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.25s;
}

.email-popup-overlay.show .email-popup {
  transform: translateY(0) scale(1);
}

.email-popup-close {
  position: absolute;
  top: 12px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #e8eee8;
  color: var(--dark);
  font-size: 27px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.email-popup-close:hover {
  background: #d6e5df;
  transform: rotate(90deg);
}

.email-popup-icon {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--teal);
  color: white;
  font-size: 30px;
  box-shadow: 0 8px 25px #28787340;
}

.email-eyebrow {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}

.email-popup h2 {
  margin-bottom: 12px;
  font-size: clamp(27px, 6vw, 35px);
  letter-spacing: -1px;
}

.email-popup h2 span {
  color: var(--gold);
}

.email-popup-description {
  max-width: 320px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.email-address-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  margin-bottom: 14px;
  border: 1px solid #dce5df;
  border-radius: 13px;
  background: white;
}

.email-address-box > span {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.email-address-box button {
  flex-shrink: 0;
  padding: 9px 13px;
  border: 0;
  border-radius: 9px;
  background: #e4f0e9;
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.email-address-box button:hover {
  background: #d1e6db;
}

.email-popup-send {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  background: var(--dark);
  color: white;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}

.email-popup-send:hover {
  transform: translateY(-2px);
  background: var(--teal);
}

.email-popup-status {
  min-height: 18px;
  margin-top: 12px;
  color: var(--teal);
  font-size: 12px;
}

/* FOOTER */

footer {
  padding: 25px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

/* TABLET */

@media (max-width: 1000px) {
  .navbar {
    width: 90%;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
  }

  .nav-links {
    gap: 13px;
  }

  .nav-links > a {
    font-size: 12px;
  }

  .special-nav-link .nav-badge {
    font-size: 9px;
  }
}

/* MOBILE NAVIGATION */

@media (max-width: 760px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    min-height: 82px;
  }

  .logo {
    font-size: 27px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: white;
    box-shadow: 0 12px 30px #00000012;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
  }

  .nav-links > a {
    padding: 12px;
    font-size: 15px;
  }

  .nav-links > a.active::before,
  .nav-links > a.active::after {
    content: none;
  }

  .nav-links > a.special-nav-link {
    align-self: flex-start;
    margin-top: 7px;
  }

  .special-nav-link .nav-badge {
    position: static;
    transform: none;
    animation: none;
  }

  .special-nav-link .nav-badge::after {
    content: none;
  }

  .hero {
    width: 90%;
    min-height: 720px;
  }

  .intro {
    top: 7%;
  }

  .intro h1 {
    font-size: 32px;
  }

  .intro h2 {
    max-width: 250px;
    font-size: 34px;
  }

  .tagline {
    top: 19%;
    font-size: 12px;
  }

  .portrait {
    left: 50%;
    bottom: 22%;
    width: min(76%, 350px);
    transform: translateX(-50%);
  }

  .curved-arrow {
    top: 35%;
    left: 0;
    width: 34%;
  }

  .experience {
    top: 44%;
    gap: 6px;
  }

  .experience strong {
    font-size: 28px;
  }

  .experience span {
    font-size: 10px;
  }

  .signature {
    bottom: 4%;
  }

  .signature span {
    font-size: 23px;
  }

  .signature strong {
    margin-left: 20px;
    font-size: 16px;
  }

  .interest-container,
  .project-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
  }

  .cool-box {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .contact-socials {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .contact-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 650px;
  }

  .below {
    padding: 60px 6%;
  }

  .below > h2 {
    font-size: 28px;
  }

  .cool-box {
    padding: 21px;
  }

  .contact-socials,
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 21px;
  }

  .email-popup {
    padding: 35px 20px 22px;
  }

  .email-address-box {
    gap: 6px;
    padding-left: 10px;
  }

  .email-address-box > span {
    font-size: 11px;
  }
}

/* ACCESSIBILITY: REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
