:root{
  --purple: #271A76;
  --cream: #FFF3D3; 
  --green: #6F9623;
  --green-dark: #5c7f1c;
  --offwhite: #FFFEF7;
  --header-h: 76px;
  --radius: 14px;
}

*{box-sizing:border-box;}
html{
  scroll-behavior:smooth;
  scrollbar-width:thin;
  scrollbar-color: var(--green) var(--cream);
}
::-webkit-scrollbar{
  width:10px;
  height:10px;
}
::-webkit-scrollbar-track{
  background: var(--cream);
}
::-webkit-scrollbar-thumb{
  background: var(--green);
  border-radius:8px;
  border:2px solid var(--cream);
}
::-webkit-scrollbar-thumb:hover{
  background: var(--green-dark);
}
body{
  margin:0;
  font-family:'Poppins', sans-serif;
  background: var(--offwhite);
  color: var(--purple);
  overflow-x:hidden;
}

img{max-width:100%; display:block;}

/* ---------------- Header ---------------- */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 40px;
  background: var(--offwhite);
  z-index:200;
  border-bottom: 1px solid rgba(39,26,118,0.08);
}
.brand{
  display:flex;
  align-items:center;
  gap:15px;
}
.brand-mark{width:30px; height:30px; object-fit:contain;}
.brand-name{
  font-weight:600;
  font-size:1.10rem;
  letter-spacing:0.5px;
  color:var(--purple);
}
.main-nav{
  display:flex;
  gap:44px;
}
.nav-link{
  background:none;
  border:none;
  font-family:inherit;
  font-size:0.95rem;
  letter-spacing:0.5px;
  text-transform:uppercase;
  color:var(--purple);
  cursor:pointer;
  padding:8px 2px;
  position:relative;
  font-weight:500;
}
.nav-link.active{
  font-weight:700;
}
.nav-link:focus-visible, .btn:focus-visible, .carousel-arrow:focus-visible, .modal-close:focus-visible{
  outline:2px solid var(--green);
  outline-offset:2px;
}
.nav-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
}
.nav-toggle span{
  width:24px; height:2px; background:var(--purple); display:block;
}

/* ---------------- Sections / views ---------------- */
main{
  padding-top:var(--header-h);
  min-height:100vh;
}
.view{
  display:flex;
  position:relative;
  justify-content: center;
  width: 100%;
  min-height:calc(100vh - var(--header-h));
  overflow:hidden;
  scroll-margin-top:var(--header-h);
}

.wave{
  position:absolute;
  left:0; bottom:0;
  width:100%; height:60%;
  background-image:url('assets/cream_swoop.png');
  background-repeat:no-repeat;
  background-position:bottom center;
  background-size:100% 100%;
  z-index:0;
  pointer-events:none;
}
.wave--right{
  transform:scaleX(-1);
}

.section-inner{
  position:relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index:1;
  min-width: 80%;
  margin:0 auto;
  padding:64px 40px 100px;
}

.section-inner-wide{
  position:relative;
  align-items: center;
  justify-content: center;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  padding:64px 40px 100px;
}

/* ---------------- Hero ---------------- */
 .hero{
  display:flex;
  min-width: 100%;
  justify-content:space-between;
  align-items:flex-end;      
  min-height:calc(100vh - var(--header-h));
  padding:70px 60px 0;
}

.hero-copy{
  align-self:flex-end;
  margin-bottom:100px;   
  margin-left: 20px;       
  max-width:450px;
  z-index: 1;
}
.hero-copy h1{
  font-size:clamp(2.2rem, 4vw, 3.2rem);
  font-weight:700;
  letter-spacing:0.5px;
  margin:0 0 14px;
  color:var(--purple);
}
.eyebrow{
  font-size:1.05rem;
  font-weight:500;
  letter-spacing:0.5px;
  margin:0 0 34px;
  color:var(--purple);
}
.hero-art{
  flex:0 1 auto;
  width:clamp(240px, 30vw, 460px);
  position:relative;
  display:flex;
  justify-content:center;
  align-items:flex-end;
}
.hero-plant{
  width:100%;
  height:auto;
}

@keyframes sway{
  0%,100%{ transform: rotate(-1.2deg); }
  50%{ transform: rotate(1.2deg); }
}
.hero-fly{
  position:absolute;
  width:9%;
  top:32%;
  left:18%;
  transform-origin:50% 60%;
  animation: buzz 12s ease-in-out infinite;
}
@keyframes buzz{
  0%    { transform: translate(0,0) rotate(0deg) scale(1); }
  8%    { transform: translate(16px,-9px) rotate(13deg) scale(1.04); }
  16%   { transform: translate(29px,-19px) rotate(19deg) scale(0.96); }
  23%   { transform: translate(36px,-11px) rotate(9deg) scale(1.02); }
  31%   { transform: translate(27px,5px) rotate(-6deg) scale(0.97); }
  40%   { transform: translate(12px,18px) rotate(-16deg) scale(1.03); }
  49%   { transform: translate(-5px,13px) rotate(-21deg) scale(0.96); }
  58%   { transform: translate(-21px,-1px) rotate(-12deg) scale(1.02); }
  67%   { transform: translate(-32px,-15px) rotate(3deg) scale(0.98); }
  76%   { transform: translate(-22px,-24px) rotate(15deg) scale(1.04); }
  85%   { transform: translate(-7px,-11px) rotate(8deg) scale(0.99); }
  93%   { transform: translate(4px,-2px) rotate(2deg) scale(1.01); }
  100%  { transform: translate(0,0) rotate(0deg) scale(1); }
}

/* ---------------- Buttons ---------------- */
.btn{
  font-family:inherit;
  cursor:pointer;
  border:none;
  border-radius:8px;
  font-weight:600;
  letter-spacing:0.4px;
  text-transform:uppercase;
  transition: background .18s ease, transform .12s ease;
}
.btn:active{ transform: scale(0.98); }
.btn-primary{
  background:var(--green);
  color:var(--offwhite);
  padding:16px 34px;
  font-size:0.95rem;
}
.btn-primary:hover{ background:var(--green-dark); }
.btn-block{ width:100%; padding:14px 0; }

/* ---------------- Portfolio ---------------- */
.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:32px;
}
.project-card{
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:10px;
  padding:18px 18px 22px;
  display:flex;
  flex-direction:column;
  box-shadow:0 4px 14px rgba(39,26,118,0.06);
}
.project-thumb{
  width:100%;
  height:190px;
  border-radius:6px;
  overflow:hidden;
  margin-bottom:18px;
  background:#e7e0c9;
}
.project-thumb img{ width:100%; height:100%; object-fit:cover; }
.placeholder-tree{ width:100%; height:100%; }
.placeholder-tree svg{ width:100%; height:100%; display:block; }
.project-card h3{
  margin:0 0 6px;
  font-size:1.25rem;
  font-weight:600;
}
.project-type{ margin:0 0 4px; font-size:0.92rem; }
.project-tags{ margin:0 0 20px; font-size:0.85rem; opacity:0.75; }
.project-card .btn{ margin-top:auto; }

/* ---------------- Modal ---------------- */
.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(39,26,118,0.14);
  z-index:500;
  align-items:center;
  justify-content:center;
  padding:30px;
}
.modal-overlay.active{ display:flex; }
body.modal-open{overflow:hidden;}
.modal-card{
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:12px;
  width:100%;
  max-width:860px;
  max-height:82vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px 30px;
  border-bottom:1px solid rgba(39,26,118,0.12);
}
.modal-header h2{ margin:0; font-size:1.3rem; font-weight:600; }
.modal-close{
  background:none;
  border:none;
  font-size:1.1rem;
  color:var(--purple);
  cursor:pointer;
  line-height:1;
  padding:4px 8px;
}
.modal-body{
  padding:26px 30px;
  overflow-y:auto;
}
.modal-body::-webkit-scrollbar{ width:8px; }
.modal-body::-webkit-scrollbar-track{ background:transparent; }
.modal-body::-webkit-scrollbar-thumb{ background:var(--green); border-radius:8px; border:none; }
.modal-row{
  display:flex;
  gap:24px;
  align-items:flex-start;
  margin-bottom:26px;
}
.modal-row:last-child{ margin-bottom:0; }
.modal-thumb{
  width:170px;
  height:105px;
  flex:0 0 auto;
  background:#d9d9d9;
  border-radius:6px;
  overflow:hidden;
}
.modal-thumb img{ width:100%; height:100%; object-fit:cover; cursor:zoom-in; transition:transform .25s ease, filter .25s ease; }
.modal-thumb img:hover{ transform:scale(1.04); filter:brightness(0.96); }

/* ---------------- Lightbox ---------------- */
.lightbox-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(30, 26, 36, 0.748);
  z-index:700;
  align-items:center;
  justify-content:center;
  padding:50px;
}
.lightbox-overlay.active{ display:flex; }
.lightbox-overlay img{
  max-width:100%;
  max-height:100%;
  border-radius:10px;
  box-shadow:0 24px 60px rgba(0,0,0,0.45);
}
.lightbox-close{
  position:absolute;
  top:24px; right:30px;
  background:rgba(255,255,255,0.12);
  border:none;
  color:#fff;
  font-size:1.2rem;
  line-height:1;
  width:42px; height:42px;
  border-radius:50%;
  cursor:pointer;
  transition:background .18s ease;
}
.lightbox-close:hover{ background:rgba(255,255,255,0.24); }
.modal-row p{
  margin:0.2rem;
  font-size:0.92rem;
  line-height:1.55;
}

.modal-row-title{
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-row-content {
  display: flex;
  flex-direction: column;
}

/* ---------------- Embedded Figma frames (modal) ---------------- */
.modal-embed{
  margin-bottom:26px;
}
.modal-embed:last-child{ margin-bottom:0; }
.modal-embed-title{
  font-weight:600;
  font-size:0.92rem;
  margin:0 0 10px;
}
.modal-embed-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:8px;
  overflow:hidden;
  border:1px solid rgba(39,26,118,0.15);
  background:#e7e0c9;
}
.modal-embed-frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:none;
}

.modal-embed-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:100%;
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:8px;
  padding:16px 18px;
  text-decoration:none;
  color:var(--purple);
  transition:background .18s ease, transform .12s ease;
}
.modal-embed-link:hover{ background:rgba(111,150,35,0.08); }
.modal-embed-link:active{ transform:scale(0.99); }
.modal-embed-link-main{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-weight:600;
  font-size:0.92rem;
}
.modal-embed-link-note{
  font-weight:400;
  font-size:0.78rem;
  opacity:0.7;
}
.modal-embed-link-arrow{
  flex:0 0 auto;
  width:18px; height:18px;
  color:var(--green);
}
.modal-embed-link-arrow svg{ width:100%; height:100%; display:block; }

/* ---------------- Accordion (Malahat plant details) ---------------- */
.accordion{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.accordion-item{
  border:1.5px solid rgba(39,26,118,0.25);
  border-radius:10px;
  overflow:hidden;
}
.accordion-header{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:var(--offwhite);
  border:none;
  cursor:pointer;
  font-family:inherit;
  font-weight:600;
  font-size:0.95rem;
  color:var(--purple);
  padding:16px 18px;
  text-align:left;
}
.accordion-header:hover{ background:rgba(111,150,35,0.08); }
.accordion-icon{
  flex:0 0 auto;
  width:18px; height:18px;
  color:var(--green);
  transition:transform .25s ease;
}
.accordion-icon svg{ width:100%; height:100%; display:block; }
.accordion-item.open .accordion-icon{ transform:rotate(180deg); }
.accordion-panel{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .35s ease;
}
.accordion-item.open .accordion-panel{ grid-template-rows:1fr; }
.accordion-panel-inner{
  overflow:hidden;
  min-height:0;
  padding:0 18px;
  transition:padding .35s ease;
}
.accordion-item.open .accordion-panel-inner{
  padding:2px 18px 18px;
}
.accordion-panel .modal-row{ margin-bottom:22px; }
.accordion-panel .modal-row:last-child{ margin-bottom:0; }

/* ---------------- About / carousel ---------------- */
.about-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  min-height:calc(100vh - var(--header-h));
  padding-top:40px;
  padding-bottom:40px;
}
.carousel-arrow{
  background:none;
  border:none;
  color:var(--green);
  cursor:pointer;
  width:40px; height:40px;
  flex:0 0 auto;
}
.carousel-arrow svg{ width:100%; height:100%; }
.about-card{
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:12px;
  width:min(860px, 100%);
  padding:34px 40px;
  min-height:340px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:26px;
}
.about-row{
  display:flex;
  align-items:center;
  gap:30px;
}
.about-row img{
  width:250px;
  height:250px;
  object-fit:contain;
  flex:0 0 auto;
}
.about-row p{
  margin:0;
  font-size:0.95rem;
  line-height:1.6;
}
.carousel-dots{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:6px;
}
.dot{
  width:8px; height:8px;
  border-radius:50%;
  background:rgba(39,26,118,0.25);
  border:none;
  cursor:pointer;
  padding:0;
}
.dot.active{ background:var(--purple); }

/* ---------------- Experience ---------------- */
.resume-frame{
  position:relative;
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:10px;
  min-height:560px;
  width:100%;
  margin:0 auto;
  padding:70px 25px 25px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.resume-label{
  position:absolute;
  top:26px; left:50%;
  transform:translateX(-50%);
  color: var(--purple);
  font-weight:700;
  font-size:1.6rem;
  margin-bottom: 10px;
  letter-spacing:2px;
  text-transform:uppercase;
}
.resume-download{
  position:absolute;
  top:30px; right:22px;
  background:var(--green);
  color:var(--offwhite);
  font-weight:600;
  font-size:0.82rem;
  letter-spacing:0.4px;
  text-transform:uppercase;
  text-decoration:none;
  padding:9px 16px;
  border-radius:7px;
  transition:background .18s ease;
}
.resume-download:hover{ background:var(--green-dark); }
.resume-embed{
  width:100%;
  flex:1;
  min-height:640px;
  border:none;
  border-radius:6px;
  background:var(--offwhite);
}

.resume-title{
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Contact ---------------- */
.contact-inner{ max-width:1100px; width:92%; margin:0 auto; }
.contact-form{
  display:flex;
  flex-direction:column;
  gap:26px;
}
.contact-form label{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.contact-form span{
  font-size:0.78rem;
  font-weight:600;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--purple);
  opacity:0.85;
}
.contact-form input,
.contact-form textarea{
  font-family:inherit;
  font-size:0.95rem;
  padding:14px 16px;
  border-radius:6px;
  border:1.5px solid rgba(39,26,118,0.35);
  background:var(--offwhite);
  color:var(--purple);
  resize:vertical;
}
.contact-form input:focus,
.contact-form textarea:focus{
  outline:none;
  border-color:var(--green);
}
.form-status{
  min-height:1.2em;
  font-size:0.9rem;
  color:var(--green-dark);
  font-weight:600;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 880px){
  .site-header{ padding:0 20px; }
  .main-nav{ display:none; position:absolute; top:var(--header-h); left:0; right:0; background:var(--offwhite); flex-direction:column; gap:0; border-bottom:1px solid rgba(39,26,118,0.1); }
  .main-nav.open{ display:flex; }
  .main-nav .nav-link{ padding:16px 24px; text-align:left; border-top:1px solid rgba(39,26,118,0.06); }
  .nav-toggle{ display:flex; }

  .hero{justify-content:center; flex-direction:column; align-items:center; text-align:center; padding:30px 24px 60px; gap:24px; }
  .hero-copy{flex:none; max-width:100%; margin:0; align-self:center; }
  .hero-art{flex:none; width:min(70vw, 320px); margin:0 auto; justify-content:center; }

  .portfolio-grid{ grid-template-columns:1fr; }
  .section-inner{ padding:48px 20px 80px;  }

  .about-inner{ flex-direction:column; padding-top:24px; }
  .about-row{ flex-direction:column; text-align:left; }
  .about-card{ padding:26px 22px; touch-action:pan-y; }
  .carousel-arrow{ display:none; }

  .modal-row{ flex-direction:column; }
  .modal-thumb{ width:100%; height:150px; }

  .resume-frame{ padding-top:60px; }
  .resume-label{ top:20px; font-size:1.35rem; }
  .resume-embed{ filter:blur(6px); pointer-events:none; user-select:none; }
  .resume-download{
    position:absolute;
    top:50%; left:50%;
    right:auto; bottom:auto;
    transform:translate(-50%, -50%);
    z-index:5;
    font-size:0.57rem;
    padding:15px 25px;
    box-shadow:0 12px 28px rgba(39,26,118,0.3);
  }
}
/* ---------------- Toast ---------------- */
.toast{
  position:fixed;
  bottom:28px;
  left:28px;
  z-index:800;
  display:flex;
  align-items:flex-start;
  gap:14px;
  max-width:360px;
  background:var(--offwhite);
  border:1.5px solid var(--purple);
  border-radius:12px;
  padding:18px 20px;
  box-shadow:0 12px 30px rgba(39,26,118,0.18);
  transform:translateY(20px);
  opacity:0;
  pointer-events:none;
  transition:transform .35s cubic-bezier(0.22,0.61,0.36,1), opacity .35s ease;
}
.toast.show{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}
.toast-icon{
  font-size:1.3rem;
  line-height:1;
  flex:0 0 auto;
}
.toast-content{ flex:1; }
.toast-title{
  margin:0 0 4px;
  font-weight:600;
  font-size:0.92rem;
  color:var(--purple);
}
.toast-text{
  margin:0;
  font-size:0.85rem;
  line-height:1.5;
  color:var(--purple);
  opacity:0.85;
}
.toast-close{
  flex:0 0 auto;
  background:none;
  border:none;
  color:var(--purple);
  opacity:0.6;
  cursor:pointer;
  font-size:0.85rem;
  padding:2px 4px;
  transition:opacity .15s ease;
}
.toast-close:hover{ opacity:1; }

@media (max-width:600px){
  .toast{ left:16px; right:16px; bottom:16px; max-width:none; }
}



/* ---------------- Scroll reveal ---------------- */
.reveal{
  opacity:0;
  transform:translateY(36px);
  transition:opacity .7s cubic-bezier(0.22,0.61,0.36,1), transform .7s cubic-bezier(0.22,0.61,0.36,1);
}
.reveal.in-view{
  opacity:1;
  transform:translateY(0);
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .hero-plant, .hero-fly{ animation:none !important; }
  .reveal{ opacity:1; transform:none; transition:none; }
}

@media(max-width:768px){
  .hero{ overflow:hidden; }
}
