
/* ============================================================
   DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* Colors */
  --color-primary:        #4f46e5;   /* indigo */
  --color-primary-light:  #818cf8;
  --color-primary-dark:   #3730a3;
  --color-accent:         #06b6d4;   /* cyan */
  --color-bg:             #f8fafc;
  --color-surface:        #ffffff;
  --color-surface-alt:    #f1f5f9;
  --color-border:         #e2e8f0;
  --color-text:           #1e293b;
  --color-text-muted:     #64748b;
  --color-heading:        #0f172a;
  --color-footer-bg:      #0f172a;
  --color-footer-text:    #94a3b8;

  /* Typography scale (rem — html base is 62.5% → 1rem = 10px) */
  --fs-xs:   1.2rem;
  --fs-sm:   1.4rem;
  --fs-base: 1.6rem;
  --fs-md:   1.8rem;
  --fs-lg:   2rem;
  --fs-xl:   2.4rem;
  --fs-2xl:  3rem;
  --fs-3xl:  3.6rem;
  --fs-4xl:  4.8rem;

  /* Spacing */
  --space-1:  0.4rem;
  --space-2:  0.8rem;
  --space-3:  1.2rem;
  --space-4:  1.6rem;
  --space-5:  2rem;
  --space-6:  2.4rem;
  --space-8:  3.2rem;
  --space-10: 4rem;
  --space-12: 4.8rem;
  --space-16: 6.4rem;
  --space-20: 8rem;

  /* Layout */
  --max-width:      72rem;
  --header-height:  7rem;

  /* Borders & Radius */
  --radius-sm:  0.4rem;
  --radius-md:  0.8rem;
  --radius-lg:  1.2rem;
  --radius-xl:  1.6rem;
  --radius-full: 9999rem;

  /* Shadows */
  --shadow-sm: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.08);
  --shadow-md: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
}


/* ============================================================
   BASE BODY
   ============================================================ */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: 1.7;
}


/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-surface);
  border-bottom: 0.1rem solid var(--color-border);
  box-shadow: var(--shadow-sm);

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  gap: var(--space-4);
}

/* Identity block */
.site-header__identity {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-header__name {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.site-header__tagline {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}


/* ============================================================
   NAVIGATION — site-nav classes
   NOTE: .main-nav overlay behavior is owned by reuse.css.
         We only style the inner list, links, and toggle here.
   ============================================================ */

/* Desktop nav list */
.site-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site-nav__link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-full);

  /* Soft default appearance */
  background-color: rgba(79, 70, 229, 0.07);
  box-shadow: 0 0.1rem 0.4rem rgba(79, 70, 229, 0.08);

  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.site-nav__link:hover {
  background-color: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 0.4rem 1.2rem rgba(79, 70, 229, 0.3);
  transform: translateY(-0.1rem);
}

.site-nav__link:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 0 0 0.3rem rgba(79, 70, 229, 0.35);
  outline: none;
}

/* ── Mobile nav toggle button ── */
.mobile-nav-toggle {
  display: none; /* hidden on desktop */
  background: rgba(79, 70, 229, 0.07);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text);
  z-index: 300; /* always above the overlay */
  line-height: 0;
  box-shadow: 0 0.1rem 0.4rem rgba(79, 70, 229, 0.08);
  transition: background-color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.mobile-nav-toggle:hover {
  background-color: rgba(79, 70, 229, 0.14);
  box-shadow: 0 0.3rem 0.8rem rgba(79, 70, 229, 0.15);
  transform: translateY(-0.1rem);
}

.mobile-nav-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.3rem rgba(79, 70, 229, 0.35);
}

.mobile-nav-toggle ion-icon {
  font-size: 3.2rem;
  display: block;
}

/* Show close icon only when menu is open */
.icon-mobile-nav[name="close-outline"] {
  display: none;
}

/* ============================================================
   MOBILE NAV — ≤ 48em
   reuse.css handles the overlay positioning and animation.
   We handle the inner list layout and link sizing here.
   ============================================================ */
@media (max-width: 48em) {

  /* Show the toggle button */
  .mobile-nav-toggle {
    display: block;
  }

  /* The nav list stacks vertically inside the overlay */
  .site-nav__list {
    flex-direction: column;
    gap: var(--space-8);
    text-align: center;
  }

  .site-nav__link {
    font-size: var(--fs-2xl);
    font-weight: 800;
    padding: var(--space-3) var(--space-10);
    color: var(--color-heading);
    border-radius: var(--radius-lg);

    /* Soft default in mobile overlay */
    background-color: rgba(79, 70, 229, 0.07);
    box-shadow: 0 0.2rem 0.8rem rgba(79, 70, 229, 0.08);
  }

  .site-nav__link:hover {
    background-color: var(--color-primary);
    color: var(--color-surface);
    box-shadow: 0 0.4rem 1.6rem rgba(79, 70, 229, 0.3);
    transform: translateY(-0.1rem);
  }

  .site-nav__link:focus-visible {
    background-color: var(--color-primary);
    color: var(--color-surface);
    box-shadow: 0 0 0 0.3rem rgba(79, 70, 229, 0.35);
  }

  /* Raise the toggle above the overlay */
  .mobile-nav-toggle {
    position: relative;
    z-index: 300;
  }
}


/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}


/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.section__heading {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--color-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: var(--space-3);
}

/* Decorative underline on section headings */
.section__heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4rem;
  height: 0.3rem;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
}

.section__text {
  font-size: var(--fs-base);
  color: var(--color-text);
  line-height: 1.8;
  max-width: 65rem;
}


/* ============================================================
   ABOUT / PROFILE SECTION
   ============================================================ */
.profile {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.profile__figure {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.profile__avatar {
  width: 12rem;
  height: 12rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 0.3rem solid var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.profile__caption {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-style: italic;
}


/* ============================================================
   CALLOUT / ASIDE
   ============================================================ */
.callout {
  background-color: rgba(255, 255, 255, 0.75);
  border-left: 0.4rem solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: 0 0.2rem 0.8rem rgba(79, 70, 229, 0.07),
              0 0.1rem 0.3rem rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.callout__heading {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.callout__text {
  font-size: var(--fs-base);
  color: var(--color-text);
  line-height: 1.8;
}

.callout__text strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}


/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skill-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: var(--space-6);
}

.skill-list__item {
  display: flex;
}

.skill-card {
  background-color: rgba(255, 255, 255, 0.75);
  border: 0.1rem solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  padding: var(--space-6);

  /* Soft default depth */
  box-shadow: 0 0.2rem 0.8rem rgba(79, 70, 229, 0.07),
              0 0.1rem 0.3rem rgba(0, 0, 0, 0.05);

  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;

  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal),
              background-color var(--transition-normal);
}

.skill-card:hover {
  transform: translateY(-0.4rem);
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 0.8rem 2.4rem rgba(79, 70, 229, 0.15),
              0 0.2rem 0.6rem rgba(0, 0, 0, 0.06);
}

.skill-card__title {
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--color-primary);
}

.skill-card__description {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ============================================================
   GOALS SECTION
   ============================================================ */
.goal-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.goal-group__heading {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-heading);
}

.goal-group__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-left: var(--space-4);
}

.goal-group__item {
  font-size: var(--fs-base);
  color: var(--color-text);
  line-height: 1.7;
  padding-left: var(--space-5);
  position: relative;
}

/* Custom bullet */
.goal-group__item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}


/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-list {
  font-style: normal;
}

.contact-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-base);
}

.contact-list__label {
  color: var(--color-text-muted);
  font-weight: 700;
  min-width: 8rem;
}

.contact-list__link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;

  /* Soft pill default appearance */
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background-color: rgba(79, 70, 229, 0.07);
  box-shadow: 0 0.1rem 0.4rem rgba(79, 70, 229, 0.08);

  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.contact-list__link:hover {
  background-color: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 0.4rem 1.2rem rgba(79, 70, 229, 0.3);
  transform: translateY(-0.1rem);
  outline: none;
}

.contact-list__link:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-surface);
  box-shadow: 0 0 0 0.3rem rgba(79, 70, 229, 0.35);
  outline: none;
}


/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: var(--space-10) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer__copyright {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.site-footer__note {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.site-footer__note small {
  font-size: inherit;
}


/* ============================================================
   RESPONSIVE SCALING SYSTEM
   ─────────────────────────────────────────────────────────────
   Strategy: change html font-size at each breakpoint.
   Because every value in this project uses rem, shrinking the
   root font-size proportionally scales the entire layout —
   no need to rewrite individual sizes per breakpoint.

   Breakpoints use em (relative to browser default 16px):
     48em  = ~768px   → tablet / small screens
     34em  = ~544px   → mobile

   Styles inside each query continue to use rem as normal.
   ============================================================ */

/* ── Tablet and below (≤ 48em / ~768px) ── */
@media (max-width: 48em) {
  html {
    font-size: 56.25%; /* 1rem = 9px — gentle scale-down */
  }
}

/* ── Mobile (≤ 34em / ~544px) ── */
@media (max-width: 34em) {
  html {
    font-size: 50%; /* 1rem = 8px — compact mobile scale */
  }
}
