/* ===========================
   Brand / Theme Variables
   =========================== */
:root {
  /* Brand accents */
  --brand-accent: #C2188B;          /* magenta */
  --brand-accent-dark: #E56AB8;     /* lighter for dark bg */

  /* Primary brand (buttons/chips/kicker) */
  --brand-primary: #9B6DFF;
  --brand-primary-hover: #814CFF;

  /* Secondary neutrals (buttons, text) */
  --brand-secondary-bg: #eeeeee;
  --brand-secondary-hover: #dddddd;
  --brand-secondary-text: #333333;
  --brand-secondary-bg-dark: #29323b;
  --brand-secondary-hover-dark: #37424d;
  --brand-secondary-text-dark: #e9eaf1;

  /* App backgrounds */
  --bg-light: #ffffff;
  --bg-dark: #0D1117;

  /* Panels / cards */
  --bg-card-light: #fafafa;
  --bg-card-dark: #161b22;

  /* Text colors */
  --text-light: #1b1b22;
  --text-dark: #e9eaf1;
  --text-muted: #555555;
  --text-muted-dark: #cccccc;

  /* Component specifics */
  --logo-circle-bg: #f8f8fa;

  /* Shadows */
  --shadow-light: 0 4px 20px rgba(0,0,0,.1);
  --shadow-card: 0 4px 12px rgba(0,0,0,.08);
  --shadow-card-hover: 0 10px 24px rgba(0,0,0,.12);

  /* Third-party brand */
  --linkedin: #0A66C2;
  --linkedin-hover: #004182;
}

/* ===========================
   Base resets
   =========================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-light);
  background: var(--bg-light);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===========================
   Typography
   =========================== */
h1, h2, h3 { font-family: 'Nunito', sans-serif; font-weight: 900; }
.section-title { font-size: 2rem; margin-bottom: 1rem; text-align: center; }
.kicker { font-size: .9rem; font-weight: 600; color: var(--brand-primary); margin-bottom: .5rem; }
.title { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; }
.subtitle { font-size: 1.2rem; color: var(--text-muted); }

/* ===========================
   Utilities
   =========================== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}
.checks { padding-left: 18px; list-style: disc; }
.checks li { margin: 8px 0; }
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--bg-dark); color: #fff; padding: 8px 12px; border-radius: 8px;
  transition: top .15s ease; z-index: 2000;
}
.skip-link:focus { top: 8px; outline: 2px solid var(--brand-primary); }

/* Focus visibility */
:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 8px;
}
a.btn:focus-visible, .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(155,109,255,.45);
  outline: none;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.25rem; border-radius: 8px; font-weight: 600;
  cursor: pointer; transition: background .2s, transform .2s;
  text-decoration: none;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--brand-secondary-bg); color: var(--brand-secondary-text); border: 2px solid #555555; border-radius: 8px;}
.btn-secondary:hover { background: var(--brand-secondary-hover); }

/* ===========================
   Navigation
   =========================== */
.nav {
  background: var(--bg-dark);
  color: #fff;
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 1000;
}
.nav__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand__logo { height: 40px; width: auto; }
.brand__name { font-weight: 700; font-size: 1.2rem; }

/* Desktop links */
.nav__links a { margin-left: 20px; font-weight: 500; }
.nav__links a.btn-ghost {
  padding: .5rem 1rem; border: 2px solid #fff; border-radius: 8px;
  transition: background .2s;
}
.nav__links a.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Header: mobile menu ---------- */
.nav__toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  display: none; /* shown on mobile */
  padding: 6px;
  margin-left: auto;
  border-radius: 8px;
  line-height: 0;
  cursor: pointer;
}

/* Hamburger (3 lines) */
.hamburger {
  position: relative;
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, background .2s ease;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, top .25s ease, opacity .2s ease, background .2s ease;
}
.hamburger::before { top: -8px; }
.hamburger::after  { top:  8px; }

/* Morph to "X" when menu-open */
body.menu-open .hamburger {
  background: transparent; /* hide middle bar */
  transform: rotate(0deg);
}
body.menu-open .hamburger::before {
  top: 0; transform: rotate(45deg);
}
body.menu-open .hamburger::after {
  top: 0; transform: rotate(-45deg);
}

/* Mobile menu panel (closed by default) */
@media (max-width: 768px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
    z-index: 999;
  }
  body.menu-open .nav__links {
    max-height: 60vh;
    opacity: 1;
    transform: translateY(0);
  }

  .nav__links a {
    display: block;       /* full width by default */
    padding: 10px;
    font-size: 1rem;
    text-align: right;
  }

  .nav__links a.btn-ghost {
    display: inline-block;           /* shrink to fit text */
    margin-top: 8px;
    align-self: flex-end;          /* keeps it right aligned */
    padding: .5rem 1rem;             /* consistent with desktop */
    border: 2px solid #fff;
    border-radius: 8px;
  }

  body.menu-open { overflow: hidden; touch-action: none; }
}

/* ===========================
   Hero
   =========================== */
.hero { padding: 4rem 0; display: flex; align-items: center; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.hero__art { display: flex; justify-content: center; }

/* Logo circle + image (mobile-friendly) */
.logo-circle {
  display: grid;
  place-items: center;
  max-width: 320px;
  width: auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0 auto;
}
.logo-img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  background: var(--logo-circle-bg);
  border-radius: 50%;
  object-fit: contain;
}

.cta { margin-top: 1.5rem; display: flex; gap: 1rem; }

/* Responsive hero adjustments */
@media (max-width: 768px) {
  .hero { padding: 2.5rem 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__art { order: 2; justify-content: center; }
  .hero__grid > div:first-child { text-align: center; }
  .cta { justify-content: center; }
}
@media (max-width: 420px) {
  .logo-img { max-width: 220px; }
  .logo-circle { max-width: 260px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .logo-img { max-width: 300px; }
  .logo-circle { max-width: 340px; }
}

/* ===========================
   Portfolio cards
   =========================== */
.grid { display: grid; gap: 2rem; margin-top: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  border-radius: 12px; overflow: hidden; background: var(--bg-card-light);
  box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.card__body { padding: 1rem; }
.card h3 { margin: .5rem 0; font-size: 1.3rem; }
.chip {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: .8rem; background: var(--brand-primary); color: #fff;
}

/* ===========================
   About
   =========================== */
.about { padding: 3rem 0; }
.about__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1rem; }
.about__panel { background: var(--bg-card-light); padding: 1.2rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.about__panel ul { padding-left: 1.2rem; list-style: disc; }
.about__subhead {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.about__tldr { order: 1; background: linear-gradient(180deg, #ffffff 0%, #f6f6ff 100%); }
.about__story { order: 2; }
.about__story p { max-width: 64ch; }
.about__story p + p { margin-top: 10px; }

/* TL;DR bullet styles (choose one via class on UL) */
.about__tldr .checks {
  list-style: none;
  list-style-position: outside;
  padding-left: 2rem;      /* space for the marker */
}
.about__tldr .checks li {
  position: relative;
  margin: 8px 0;
}

/* --- Variant A: Emoji (cherry blossom) --- */
.about__tldr .checks.checks--emoji-sakura li::before {
  content: "🌸";
  margin-left: -1.75em;
  position: absolute;
  left: 0;
  top: 0.25em;
  font-size: 1.1em;
  line-height: 1;
}

/* --- Variant B: Emoji (hibiscus) --- */
.about__tldr .checks.checks--emoji-hibiscus li::before {
  content: "🌺";
  margin-left: -1.75em;
  position: absolute;
  left: 0;
  top: 0.25em;
  font-size: 1.1em;
  line-height: 1;
}

/* --- Variant C: Unicode (5-petal) --- */
.about__tldr .checks.checks--unicode-dot li::before {
  content: "✿";
  margin-left: -1.4em;
  position: absolute;
  left: 0;
  top: 0.25em; /* slightly different baseline */
  font-size: 1.1em;
  line-height: 1;
  color: var(--brand-accent);
}

/* Larger screens: two columns with emphasis on Story, TL;DR sticky */
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr 1.2fr; /* TL;DR narrower; Story slightly wider */
    align-items: start;
  }
  .about__tldr { order: 1; position: sticky; top: 96px; }
  .about__story { order: 2; }
}

/* ===========================
   Contact
   =========================== */
.contact { padding: 2rem 0; text-align: center; }
.contact-lead { margin-bottom: 1.2rem; font-size: 1.1rem; color: var(--text-muted); }
.contact-actions { display: flex; justify-content: center; gap: 12px; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.btn-linkedin {
  background: var(--linkedin); color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-linkedin:hover { background: var(--linkedin-hover); }
.li-icon { display: inline-block; vertical-align: middle; }

/* ===========================
   Footer
   =========================== */
footer { padding: 1rem 0; text-align: center; background: var(--bg-dark); color: #fff; }

/* ===========================
   Back to Top
   =========================== */
.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1100;
  min-width: 44px;              /* recommended target size */
  min-height: 44px;
  padding: .6rem .8rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-light);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
  opacity: 0;
  pointer-events: none;         /* not focusable/clickable while hidden */
}
.back-to-top:hover { background: var(--brand-primary-hover); transform: translateY(-2px); }
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;         /* becomes interactive */
}
.back-to-top:focus-visible {
  outline: 3px solid var(--brand-primary-hover);
  outline-offset: 3px;
}

/* ===========================
   Reduced motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
  .back-to-top { transition: none; }
}

/* ===========================
   Dark mode adjustments
   =========================== */
@media (prefers-color-scheme: dark) {
  body { background: var(--bg-dark); color: var(--text-dark); }
  .subtitle, .contact-lead { color: var(--text-muted-dark); }
  .logo-img { background: var(--brand-secondary-bg-dark) }
  .card, .about__panel { background: var(--bg-card-dark); }
  .btn-secondary { background: var(--brand-secondary-bg-dark); color: var(--brand-secondary-text-dark); }
  .btn-secondary:hover { background: var(--brand-secondary-hover-dark); }
  .about__tldr { background: linear-gradient(180deg, #161b22 0%, #111722 100%); }
  .back-to-top { box-shadow: 0 2px 10px rgba(0,0,0,.3); }
}

/* ===========================
   Forced-colors / High contrast
   =========================== */
@media (forced-colors: active) {
  .about__tldr .checks{
    list-style: disc;
    padding-left: 1.2rem;
    color: CanvasText;
  }
  .about__tldr .checks li::before{ content: none; }
}
