/*-----------------------------------*\
  #main.css
\*-----------------------------------*/

/**
 * copyright 2022 codewithsadee
 */





/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  color-scheme: dark;

  /**
   * colors — dark theme (default)
   * researched black & burgundy palette:
   * near-black canvas #0b0b0f, lifted surface #1d0c10,
   * burgundy surface #3b121b, rose accent #e0a3b4,
   * cream text #fff1f4, muted #b08d7a
   */

  --canvas: #0b0b0f;
  --surface: #1d0c10;
  --surface-raised: #2a0f16;
  --surface-highlight: #3b121b;

  --text-primary: #fff1f4;
  --text-secondary: #e0b9c0;
  --text-muted: #b08d7a;
  --text-placeholder: #8a6b5f;

  --accent-rose: #e0a3b4;
  --accent-rose-dim: #b08d7a;
  --accent-burgundy: #7a1330;
  --accent-burgundy-deep: #4c0818;

  --border-subtle: rgba(224, 163, 180, 0.15);
  --border-focus: #e0a3b4;
  --drawer: #3b121b;

  --shadow-1: 0 0 20px rgba(76, 8, 24, 0.4);
  --shadow-2: 0 4px 28px rgba(76, 8, 24, 0.55);

  --overlay-backdrop: rgba(11, 11, 15, 0.8);
  --overlay-hover: rgba(224, 163, 180, 0.08);

  /**
   * light theme (opt-in)
   */
}

/* light theme (opt-in via <html data-theme="light">) */
[data-theme="light"] {
  --canvas: hsla(0, 0%, 100%, 1);
  --surface: hsla(220, 20%, 97%, 1);
  --surface-raised: hsla(345, 57%, 97%, 1);
  --surface-highlight: hsla(216, 14%, 14%, 0.06);
  --drawer: hsla(216, 14%, 14%, 1);

  --text-primary: hsla(216, 14%, 14%, 1);
  --text-secondary: hsla(219, 22%, 26%, 1);
  --text-muted: hsla(220, 12%, 43%, 1);
  --text-placeholder: hsla(219, 10%, 62%, 1);

  --accent-rose: hsla(344, 53%, 62%, 1);
  --accent-rose-dim: hsla(344, 53%, 52%, 1);
  --accent-burgundy: hsla(344, 53%, 62%, 1);
  --accent-burgundy-deep: hsla(344, 53%, 52%, 1);

  --border-subtle: hsla(222, 23%, 71%, 0.2);
  --border-focus: hsla(344, 53%, 62%, 1);

  --shadow-1: 0 0 20px hsla(216, 14%, 14%, 0.05);
  --shadow-2: 0 4px 28px hsla(216, 14%, 14%, 0.07);

  --overlay-backdrop: hsla(216, 14%, 14%, 0.8);
  --overlay-hover: hsla(0, 0%, 100%, 0.12);

  /* logo visibility */
  .logo-dark { display: none !important; }
  .logo-light { display: block !important; }
  .logo-drawer-dark { display: none !important; }
  .logo-drawer-light { display: block !important; }

  /**
   * navbar light mode
   */
  .navbar {
    background-color: hsla(0, 0%, 100%, 0.95);
    border-right: 1px solid var(--border-subtle);
  }

  .navbar.active {
    transform: translateX(300px);
  }

  .navbar-list {
    --fs-7: 1.5rem;
  }

  .navbar-link {
    color: var(--text-secondary);
  }

  .navbar-link:is(:hover, :focus-visible) { color: var(--accent-rose); }

  .contact-link { color: var(--text-secondary); }

  .contact-link:is(:hover, :focus-visible) { color: var(--accent-rose); }

  .social-list { gap: 16px; }

  .social-link {
    color: var(--text-secondary);
    font-size: 1.8rem;
  }

  .social-link:is(:hover, :focus-visible) { color: var(--accent-rose); transform: translateY(0); }
}

/* logo visibility default (dark theme) */
.logo-dark { display: block; }
.logo-light { display: none; }
.logo-drawer-dark { display: block; }
.logo-drawer-light { display: none; }

/* legacy aliases for any missed refs */
:root {
  --white: var(--canvas);
  --white_a8: var(--overlay-hover);
  --white_a12: var(--overlay-hover);
  --cultured: var(--surface);
  --snow: var(--surface-raised);
  --manatee: var(--text-placeholder);
  --black-coral: var(--text-primary);
  --cadet-blue-crayola_a20: var(--border-subtle);
  --cinnamon-satin: var(--accent-rose);
  --raisin-black: var(--surface-highlight);
  --raisin-black_a6: var(--surface-highlight);
  --gunmetal: var(--text-secondary);
  --charcoal: var(--text-secondary);

  /**
   * typography
   */

  --ff-manrope: 'Manrope', sans-serif;

  --fs-1: calc(2.7rem + 1.38vw);
  --fs-2: calc(2.6rem + .66vw);
  --fs-3: calc(2.6rem + .24vw);
  --fs-4: 1.9rem;
  --fs-5: 1.8rem;
  --fs-6: 1.7rem;
  --fs-7: 1.5rem;
  --fs-8: 1.4rem;
  
  --fw-700: 700;

  /**
   * spacing
   */

  --section-padding: 90px;

  /**
   * box shadow
   */

  --shadow-1: 0 0 20px hsla(216, 14%, 14%, 0.05);
  --shadow-2: 0 4px 28px hsla(216, 14%, 14%, 0.07);

  /**
   * border radius
   */

  --radius-circle: 50%;
  --radius-pill: 100px;
  --radius-8: 8px;
  --radius-6: 6px;

  /**
   * transition
   */

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
  --transition-3: 0.3s ease-in-out;

}





/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

li { list-style: none; }

a,
img,
span,
button,
ion-icon { display: block; }

a {
  color: inherit;
  text-decoration: none;
}

img { height: auto; }

input,
button,
textarea {
  background: none;
  border: none;
  font: inherit;
}

input,
textarea { width: 100%; }

button { cursor: pointer; }

ion-icon { pointer-events: none; }

html {
  font-family: var(--ff-manrope);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--canvas);
  color: var(--text-primary);
  font-size: 1.6rem;
  line-height: 1.7;
}

body.nav-active { overflow: hidden; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background-color: var(--surface); }
::-webkit-scrollbar-thumb { background-color: var(--accent-burgundy-deep); }
::-webkit-scrollbar-thumb:hover { background-color: var(--accent-rose); }





/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container { padding-inline: 16px; }

.social-list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-link {
  font-size: 2rem;
  transition: var(--transition-1);
}

.social-link:is(:hover, :focus-visible) { transform: translateY(-3px); }

.section { padding-block: var(--section-padding); }

.w-100 { width: 100%; }

.h1,
.h2,
.h3,
.h4 {
  color: var(--text-primary);
  line-height: 1.3;
}

.h1 { font-size: var(--fs-1); }

.h2 { font-size: var(--fs-2); }

.h3 { font-size: var(--fs-3); }

.h4 { font-size: var(--fs-4); }

.btn {
  color: var(--accent-rose);
  font-size: var(--fs-6);
  font-weight: var(--fw-700);
  border: 2px solid var(--accent-rose);
  max-width: max-content;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  transition: var(--transition-1);
  will-change: transform;
}

.btn:is(:hover, :focus-visible) { transform: translateY(-4px); }

.btn-primary,
.btn-secondary:is(:hover, :focus-visible) {
  background-color: var(--accent-rose);
  color: var(--surface);
}

.section-text { font-size: var(--fs-5); }

.section-title { margin-block-end: 16px; }

.grid-list {
  display: grid;
  gap: 30px;
}

[data-reveal] {
  opacity: 0;
  transition: 0.75s ease;
}

[data-reveal="top"] { transform: translateY(-30px); }

[data-reveal="bottom"] { transform: translateY(30px); }

[data-reveal="left"] { transform: translateX(-30px); }

[data-reveal="right"] { transform: translateX(30px); }

[data-reveal].revealed {
  transform: translate(0);
  opacity: 1;
}





/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--canvas);
  width: 100%;
  padding-block: 20px;
  box-shadow: var(--shadow-1);
  z-index: 4;
}

.header.active {
  position: fixed;
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(0); }
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-open-btn {
  font-size: 3.5rem;
  color: var(--gunmetal);
}

.navbar {
  position: fixed;
  top: 0;
  left: -300px;
  background-color: var(--drawer);
  color: var(--text-primary);
  max-width: 300px;
  width: 100%;
  height: 100vh;
  padding: 30px;
  padding-block-end: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 2;
  visibility: hidden;
  transition: var(--transition-3);
  border-right: 1px solid var(--border-subtle);
}

.navbar.active {
  visibility: visible;
  transform: translateX(300px);
}

.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-close-btn {
  background-color: var(--surface-highlight);
  color: var(--text-primary);
  font-size: 2rem;
  padding: 6px;
  border-radius: var(--radius-circle);
  transition: var(--transition-1);
}

.nav-close-btn ion-icon { --ionicon-stroke-width: 50px; }

.nav-close-btn:is(:hover, :focus-visible) { background-color: var(--overlay-hover); }

.navbar-list { margin-block-end: auto; }

.navbar-link {
  font-weight: var(--fw-700);
  padding-block: 6px;
  color: var(--text-secondary);
  transition: var(--transition-1);
}

.navbar-link:is(:hover, :focus-visible) { color: var(--accent-rose); }

.contact-link { transition: var(--transition-1); color: var(--text-secondary); }

.contact-link:is(:hover, :focus-visible) { color: var(--accent-rose); }

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--overlay-backdrop);
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-1);
}

.overlay.active {
  pointer-events: all;
  opacity: 1;
}





/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero {
  padding-block-start: calc(var(--section-padding) + 50px);
  background-color: var(--surface);
}

.hero .container {
  display: grid;
  gap: 50px;
}

.hero-banner {
  position: relative;
  max-width: max-content;
  margin-inline: auto;
}

.hero-banner .w-100 {
  mask-image: url("../images/Blob.svg");
  -webkit-mask-image: url("../images/Blog.svg");
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: auto;
  -webkit-mask-size: auto;
}

.hero .shape {
  position: absolute;
  bottom: 10%;
  right: 2%;
  filter: drop-shadow(var(--shadow-2));
}

.hero-content { text-align: center; }

.hero .section-text { margin-block: 24px 36px; }

.btn-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about .wrapper {
  display: grid;
  gap: 50px;
  margin-block-end: 70px;
}

.progress-list .label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 4px;
}

.progress-item:not(:last-child) { margin-block-end: 16px; }

.progress {
  background-color: var(--surface-highlight);
  height: 6px;
  width: 100%;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill { height: inherit; }

.about-card { text-align: center; }

.about-card .card-icon {
  max-width: max-content;
  margin-inline: auto;
}

.about-card .card-title { margin-block: 16px 10px; }





/*-----------------------------------*\
  #PROJECTS
\*-----------------------------------*/

.project { border-block: 1px solid var(--border-subtle); }

.project .title-wrapper { margin-block-end: 40px; }

.project .btn { margin-block-start: 24px; }

.project .grid-list { gap: 40px; }

.project-card {
  --padding: 24px;

  display: flex;
  flex-direction: column;
  gap: var(--padding);
  border-radius: var(--radius-8);
  overflow: hidden;
}

.project-card-1,
.project-card-2,
:is(.project-card-3, .project-card-4) .card-content { padding: var(--padding); }

.project-card-1 { padding-block-end: 0; }

.project :is(.project-card-3, .project-card-4) { gap: 0; }

.project-card .card-tag {
  font-size: var(--fs-8);
  font-weight: var(--fw-700);
  text-transform: uppercase;
}

.project-card .card-title { margin-block: 16px; }

.project-card .card-text { margin-block-end: 20px; }

.project-card .btn-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: var(--fw-700);
  transition: var(--transition-1);
}

.project-card .btn-text:is(:hover, :focus-visible) { gap: 10px; }





/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/

.contact { padding-block-end: 0; }

.contact-card {
  background-color: var(--surface-raised);
  padding: 32px;
  border-radius: var(--radius-8);
  display: grid;
  gap: 40px;
  border: 1px solid var(--border-subtle);
}

.contact .section-title { margin-block-start: 20px; }

.input-field {
  background-color: var(--surface);
  color: var(--text-primary);
  font-size: var(--fs-7);
  padding: 14px 18px;
  border-radius: var(--radius-6);
  outline: none;
  margin-block-end: 20px;
  border: 1px solid var(--border-subtle);
  transition: var(--transition-1);
}

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(224, 163, 180, 0.15);
}

.input-field::placeholder { color: var(--text-placeholder); }

textarea.input-field {
  min-height: 120px;
  height: 120px;
  max-height: 240px;
  resize: vertical;
}





/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer { padding-block: 40px; border-top: 1px solid var(--border-subtle); }

.copyright { margin-block-end: 12px; color: var(--text-muted); }

.footer .social-link { color: var(--text-secondary); transition: var(--transition-1); }

.footer .social-link:is(:hover, :focus-visible) { color: var(--accent-rose); transform: translateY(-3px); }





/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for large than 575px screen
 */

@media (min-width: 575px) {

  /**
   * REUSED STYLE
   */

  .container {
    max-width: 540px;
    width: 100%;
    margin-inline: auto;
  }



  /**
   * PROJECT
   */

  .project-card { --padding: 68px; }



  /**
   * CONTACT
   */

  .contact-card { padding: 68px; }

}





/**
 * responsive for large than 768px screen
 */

@media (min-width: 768px) {

  /**
   * REUSED STYLE
   */

  .container { max-width: 720px; }

  .section-text { --fs-5: 2rem; }



  /**
   * ABOUT
   */

  .about .grid-list { grid-template-columns: 1fr 1fr; }



  /**
   * PROJECT
   */

  .project .title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
  }

  .project .btn { min-width: max-content; }



  /**
   * CONTACT
   */

  .contact .section-text { --fs-5: 1.8rem; }

  .input-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
  }



  /**
   * FOOTER
   */

  .footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .copyright { margin-block-end: 0; }

}





/**
 * responsive for large than 992px screen
 */

@media (min-width: 992px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * spacing
     */

    --section-padding: 120px;

  }



  /**
   * REUSED STYLE
   */

  .container { max-width: 960px; }



  /**
   * HEADER
   */

  .nav-open-btn,
  .navbar-top,
  .navbar .wrapper,
  .overlay { display: none; }

  .navbar,
  .navbar.active {
    all: unset;
    display: flex;
    flex-grow: 1;
  }

  .navbar-list {
    display: flex;
    gap: 36px;
    margin-inline: auto;
  }

  .header-actions {
    margin-left: 24px;
  }

  .navbar-link {
    color: var(--text-secondary);
    transition: var(--transition-1);
  }

  .navbar-link:is(:hover, :focus-visible) { color: var(--accent-rose); }

  .navbar .social-link {
    color: var(--text-secondary);
    font-size: 1.8rem;
  }

  .header {
    top: 45px;
    max-width: 960px;
    left: 50%;
    transform: translateX(-50%);
    padding-inline: 16px;
    border-radius: var(--radius-8);
  }

  .header.active {
    top: 0;
    left: 0;
    max-width: unset;
    border-radius: 0;
  }



  /**
   * HERO
   */

  .hero { padding-block-start: calc(var(--section-padding) + 80px); }

  .hero .container {
    grid-template-columns: 0.8fr 1fr;
    align-items: center;
    gap: 100px;
  }

  .hero-content { text-align: left; }

  .hero .btn-wrapper { justify-content: flex-start; }



  /**
   * ABOUT
   */

  .about .wrapper {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .about .grid-list { grid-template-columns: repeat(4, 1fr); }



  /**
   * PROJECT
   */

  .project .grid-list {
    grid-template-columns: 1fr 1fr;
    row-gap: 50px;
  }

  .project .grid-list > li:nth-child(-n+2) { grid-column: 1 / 3; }

  .project-card-1,
  .project-card-2 {
    flex-direction: row;
    align-items: flex-end;
  }

  :is(.project-card-1, .project-card-2) .card-content { width: 33.33%; }

  :is(.project-card-1, .project-card-2) .card-banner { width: 66.66%; }

  .project-card-1 .card-content { padding-block-end: var(--padding); }

  .project-card-2 .card-content { order: 1; }



  /**
   * CONTACT
   */

  .contact-card {
    grid-template-columns: 0.8fr 1fr;
    align-items: center;
    gap: 90px;
  }

}





/**
 * responsive for large than 1200px screen
 */

@media (min-width: 1200px) {

  /**
   * REUSED STYLE
   */

  .container,
  .header { max-width: 1140px; }



  /**
   * ABOUT
   */

  .about .grid-list { gap: 50px; }



  /**
   * CONTACT
   */

  .contact-card { gap: 150px; }

}





/**
 * responsive for large than 1400px screen
 */

@media (min-width: 1400px) {

  /**
   * REUSED STYLE
   */

  .container,
  .header { max-width: 1320px; }



  /**
   * HERO
   */

  .hero .container { grid-template-columns: 1fr 0.8fr; }

  .hero .section-text { --fs-5: 2.4rem; }



  /**
   * ABOUT
   */

  .about .wrapper { gap: 100px; }

  .about .grid-list { gap: 60px; }

}


/*-----------------------------------*\
  #THEME TOGGLE SWITCH
\*-----------------------------------*/

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.theme-toggle-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 56px;
  height: 28px;
  background-color: var(--surface-highlight);
  border-radius: 14px;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
}

.theme-toggle-icon {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: var(--accent-burgundy);
  border-radius: 50%;
  transition: left 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

/* dark mode (default) - thumb on the right (moon side) */
.theme-toggle .ic-sun { color: var(--text-muted); }
.theme-toggle .ic-moon { color: #fff; }
.theme-toggle-thumb { left: calc(100% - 26px); }

/* light mode - thumb on the left (sun side) */
[data-theme="light"] .theme-toggle-thumb { left: 2px; }
[data-theme="light"] .theme-toggle .ic-sun { color: #fff; }
[data-theme="light"] .theme-toggle .ic-moon { color: var(--text-muted); }

/* toast popup for socials we are not on yet */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  background-color: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-rose);
  padding: 14px 24px;
  border-radius: var(--radius-8);
  font-size: var(--fs-7);
  box-shadow: var(--shadow-2);
  z-index: 10;
  max-width: calc(100% - 32px);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 110px);
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}