:root{
  --bg:#f7fcfa;
  --bg-soft:#f0faf6;
  --surface:#ffffff;
  --surface-alt:rgba(255,255,255,0.72);
  --text:#162624;
  --text-soft:#57706c;
  --line:#dcebe6;
  --accent:#58d7a5;
  --accent-deep:#17a67a;
  --blue:#73c9ff;
  --blue-deep:#2b9cf1;
  --shadow:0 10px 30px rgba(36,96,77,0.08);
  --shadow-strong:0 18px 48px rgba(36,96,77,0.14);
  --radius:24px;
  --radius-md:18px;
  --header-bg:rgba(247,252,250,0.75);
}
:root[data-theme="dark"]{
  --bg:#0f1717;
  --bg-soft:#121f1e;
  --surface:#162321;
  --surface-alt:rgba(22,35,33,0.78);
  --text:#ecf6f3;
  --text-soft:#a5beb8;
  --line:#2a3a38;
  --accent:#6de5ba;
  --accent-deep:#28b188;
  --blue:#86d6ff;
  --blue-deep:#4fb7f1;
  --shadow:0 10px 30px rgba(0,0,0,0.25);
  --shadow-strong:0 18px 48px rgba(0,0,0,0.35);
  --header-bg:rgba(15,23,23,0.78);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]){
    --bg:#0f1717;
    --bg-soft:#121f1e;
    --surface:#162321;
    --surface-alt:rgba(22,35,33,0.78);
    --text:#ecf6f3;
    --text-soft:#a5beb8;
    --line:#2a3a38;
    --accent:#6de5ba;
    --accent-deep:#28b188;
    --blue:#86d6ff;
    --blue-deep:#4fb7f1;
    --shadow:0 10px 30px rgba(0,0,0,0.25);
    --shadow-strong:0 18px 48px rgba(0,0,0,0.35);
    --header-bg:rgba(15,23,23,0.78);
  }
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:100px}
body{
  margin:0;
  font-family:Inter,system-ui,sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,var(--bg) 0%, var(--bg-soft) 100%);
  line-height:1.65;
}
body.nav-open{overflow:hidden}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
h1,h2,h3,h4,strong,.brand{font-family:"Space Grotesk",Inter,sans-serif}
h1,h2,h3,h4,p{margin:0}
.page-bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 15% 15%, rgba(88,215,165,0.17), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(115,201,255,0.17), transparent 24%),
    radial-gradient(circle at 78% 70%, rgba(88,215,165,0.10), transparent 20%);
  z-index:-1;
}
.container{width:min(1160px, calc(100% - 2rem)); margin-inline:auto}
.section{padding:96px 0}
.soft-section{background:linear-gradient(180deg, transparent, rgba(88,215,165,0.035), transparent)}
.site-header{
  position:sticky;top:0;z-index:50;
  backdrop-filter:blur(18px);
  background:var(--header-bg);
  border-bottom:1px solid rgba(220,235,230,0.65);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;padding:16px 0;
}
.brand{display:flex;align-items:center;gap:.8rem}
.brand-mark{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--blue));
  color:#fff;font-weight:800;font-size:1.15rem;box-shadow:var(--shadow);
}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.brand-text small{font-family:Inter,sans-serif;color:var(--text-soft);font-size:.75rem}
.site-nav{display:flex;align-items:center;gap:1.25rem}
.site-nav a{
  color:var(--text-soft);font-size:.95rem;font-weight:600;position:relative;
}
.site-nav a.active,.site-nav a:hover{color:var(--text)}
.site-nav a.active::after{
  content:"";position:absolute;left:0;right:0;bottom:-8px;height:2px;border-radius:2px;
  background:linear-gradient(90deg,var(--accent),var(--blue));
}
.header-actions{display:flex;align-items:center;gap:.75rem}
.theme-switcher select{
  appearance:none;border:1px solid var(--line);background:var(--surface);
  color:var(--text);border-radius:999px;padding:.7rem .95rem;box-shadow:var(--shadow);
}
.menu-toggle{
  display:none;background:var(--surface);border:1px solid var(--line);border-radius:14px;
  width:46px;height:46px;padding:10px;cursor:pointer;box-shadow:var(--shadow);
}
.menu-toggle span{display:block;height:2px;background:var(--text);margin:6px 0;border-radius:2px}
.button{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.95rem 1.2rem;border-radius:999px;font-weight:700;border:none;cursor:pointer;
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff;
  box-shadow:var(--shadow);
}
.button:hover{transform:translateY(-1px)}
.button-small{padding:.78rem 1rem;font-size:.92rem}
.button-outline{
  background:transparent;color:var(--text);border:1px solid var(--line);
}
.button-ghost{
  background:var(--surface);color:var(--text);border:1px solid var(--line);
}
.hero{padding:64px 0 78px}
.hero-grid{
  display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);align-items:center;gap:2.4rem;
}
.eyebrow,.section-kicker,.kicker{
  text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;font-weight:800;
}
.badge{
  display:inline-flex;align-items:center;padding:.5rem .8rem;border-radius:999px;
  background:rgba(88,215,165,0.12);color:var(--accent-deep);margin-bottom:1rem;
}
.kicker{color:var(--text-soft);margin-bottom:.85rem}
.hero-copy h1{
  max-width:12.2ch;font-size:clamp(2.65rem, 5.7vw, 4.65rem);line-height:1.045;letter-spacing:-.052em;margin-bottom:1.1rem;
}
.gradient-text{
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-text{font-size:1.08rem;color:var(--text-soft);max-width:62ch;margin-bottom:1.4rem}
.hero-actions{display:flex;gap:.85rem;flex-wrap:wrap;margin-bottom:1.35rem}
.hero-chips{display:flex;gap:.65rem;flex-wrap:wrap;margin-bottom:1rem}
.hero-chips span{
  padding:.6rem .9rem;border:1px solid var(--line);border-radius:999px;background:var(--surface);
  box-shadow:var(--shadow);font-size:.92rem;font-weight:600
}
.hero-note{
  padding:1rem 1.1rem;border:1px solid var(--line);border-radius:18px;background:var(--surface);
  color:var(--text-soft);box-shadow:var(--shadow);max-width:52ch;
}
.hero-visual{position:relative;min-height:500px;display:grid;place-items:center;padding:28px 34px}
.hero-orb{
  position:absolute;border-radius:50%;filter:blur(8px);opacity:.85;
}
.orb-a{width:260px;height:260px;background:rgba(88,215,165,0.18);top:50px;right:60px}
.orb-b{width:220px;height:220px;background:rgba(115,201,255,0.16);bottom:36px;left:18px}
.glass{
  background:var(--surface-alt);border:1px solid rgba(255,255,255,0.35);
  backdrop-filter:blur(18px);box-shadow:var(--shadow-strong);
}
.profile-card{
  width:min(350px,86%);padding:.8rem;border-radius:30px;position:relative;z-index:2;transform:translateY(4px);
}
.profile-photo{
  background:linear-gradient(145deg, rgba(88,215,165,0.22), rgba(115,201,255,0.22));
  border-radius:23px;
  padding:0;
  height:430px;
  display:block;
  overflow:hidden;
}
.profile-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  border-radius:inherit;
  display:block;
}
.photo-placeholder{
  width:100%;height:100%;border-radius:18px;border:1.5px dashed rgba(22,38,36,0.2);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;text-align:center;
  color:var(--text-soft);background:linear-gradient(155deg,rgba(255,255,255,.42),rgba(115,201,255,.10));
}
:root[data-theme="dark"] .photo-placeholder{border-color:rgba(236,246,243,0.2);background:linear-gradient(155deg,rgba(255,255,255,.055),rgba(115,201,255,.07))}
.photo-placeholder span{display:block;font-size:1.15rem;font-weight:700;color:var(--text)}
.profile-meta{padding:.95rem .35rem .3rem}
.profile-meta h3{font-size:1.4rem;margin-bottom:.35rem}
.profile-meta p{color:var(--text-soft)}
.floating-card{
  position:absolute;width:min(218px, 62%);padding:.9rem .95rem;border-radius:18px;z-index:3;
}
.floating-card strong{display:block;margin-bottom:.35rem}
.floating-card p{color:var(--text-soft);font-size:.86rem;line-height:1.5}
.floating-card-top{top:34px;right:-2px;left:auto;transform:none}
.floating-card-bottom{left:-4px;right:auto;bottom:34px;transform:none}
.section-head{
  display:flex;align-items:flex-start;gap:1rem;margin-bottom:2rem;
}
.section-head.compact{margin-bottom:1rem}
.section-index{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;
  background:linear-gradient(135deg, rgba(88,215,165,0.18), rgba(115,201,255,0.18));
  font-weight:800;color:var(--accent-deep);flex-shrink:0
}
.section-kicker{color:var(--text-soft);margin-bottom:.35rem}
.section-head h2{font-size:clamp(1.9rem,4vw,3rem);line-height:1.1}
.content-grid{display:grid;gap:1.25rem}
.content-grid-2{grid-template-columns:1fr 1fr}
.panel,.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:1.4rem;box-shadow:var(--shadow);
}
.soft-panel{background:linear-gradient(180deg, rgba(88,215,165,0.08), rgba(115,201,255,0.06))}
.lead{font-size:1.14rem}
.timeline{display:grid;gap:1.2rem}
.timeline-item{position:relative;padding-left:1.4rem}
.timeline-dot{
  position:absolute;left:0;top:1.7rem;width:12px;height:12px;border-radius:50%;
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));
}
.timeline-meta,.project-tags,.hero-chips,.contact-buttons,.resume-links{display:flex;flex-wrap:wrap;gap:.65rem}
.badge,.card-tag,.project-tags span{
  display:inline-flex;padding:.45rem .75rem;border-radius:999px;font-size:.78rem;font-weight:700;
  background:rgba(88,215,165,0.12);color:var(--accent-deep)
}
.card-tag{margin-bottom:.75rem}
.muted{color:var(--text-soft)}
.strong{font-weight:700}
.metric{margin-top:1rem;padding:.8rem 1rem;background:var(--bg-soft);border-radius:16px;font-weight:600}
.card-grid,.skill-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem
}
.projects-wrap{display:grid;gap:1.25rem}
.project-card{display:grid;grid-template-columns:.9fr 1.1fr;gap:1.2rem;align-items:center}
.project-primary{grid-template-columns:1fr 1fr}
.project-visual{
  min-height:280px;border-radius:26px;position:relative;overflow:hidden;
  background:linear-gradient(160deg, rgba(88,215,165,.18), rgba(115,201,255,.16));
}
.project-visual {
  position: relative;
  overflow: hidden;
}
.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-escore,.project-tea{display:grid;place-items:center}
.phone-shell{
  width:200px;height:360px;border-radius:34px;padding:10px;background:#111827;box-shadow:var(--shadow-strong);
}
.phone-screen{
  height:100%;border-radius:26px;background:linear-gradient(180deg,#f7fffd,#d6f8ea);
  padding:1.2rem;color:#163028;display:flex;flex-direction:column;justify-content:flex-start;
}
.phone-screen h4{font-size:1.5rem;margin:.5rem 0}
.phone-screen p{color:#2b5950;margin-bottom:1rem}
.mini-badge{align-self:flex-start;padding:.35rem .6rem;border-radius:999px;background:#ffffff99;font-size:.72rem;font-weight:700}
.score-block{
  margin-top:auto;padding:1rem;border-radius:18px;background:#ffffffb8;font-weight:700
}
.score-block strong{font-size:1.4rem}
.leaf-shape{
  position:absolute;border-radius:80% 20% 80% 20% / 60% 40% 60% 40%;
  background:linear-gradient(180deg,#41bf89,#228d63);
  box-shadow:var(--shadow);
}
.leaf-1{width:120px;height:180px;left:80px;top:60px;transform:rotate(-18deg)}
.leaf-2{width:110px;height:170px;left:170px;top:86px;transform:rotate(10deg)}
.leaf-3{width:96px;height:150px;left:138px;top:128px;transform:rotate(-6deg)}
.research-ring{
  position:absolute;width:220px;height:220px;border-radius:50%;
  border:2px solid rgba(43,156,241,.35);top:46px;left:92px
}
.project-body h3{margin:0 0 .75rem;font-size:1.5rem}
.project-body p{color:var(--text-soft);margin-bottom:.9rem}
.project-body ul{padding-left:1.05rem;margin:.2rem 0 0}
.project-body li{margin:.25rem 0}
.skill-card h3,.cert-card h3,.info-card h3{margin-bottom:.45rem}
.accent-card{background:linear-gradient(180deg, rgba(88,215,165,.08), rgba(115,201,255,.06))}
.contact-box{padding:1.5rem}
.contact-copy{color:var(--text-soft);max-width:60ch;margin-bottom:1rem}
.resume-panel{
  margin-top:1.25rem;padding:1rem 1.1rem;background:var(--bg-soft);border-radius:20px;
  display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;
}
.resume-link{
  padding:.8rem 1rem;border-radius:999px;background:var(--surface);border:1px solid var(--line);
  box-shadow:var(--shadow);font-weight:700
}
.resume-link.disabled{opacity:.55;pointer-events:none}
.site-footer{padding:1.2rem 0 2rem;color:var(--text-soft)}
.footer-inner{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:1.25rem}
.chat-launcher{
  position:fixed;right:22px;bottom:22px;width:58px;height:58px;border-radius:50%;
  border:none;cursor:pointer;box-shadow:var(--shadow-strong);font-size:1.2rem;
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff;z-index:60;
}
.chat-panel{
  position:fixed;right:22px;bottom:92px;width:min(380px, calc(100vw - 24px));z-index:70;
  border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:var(--shadow-strong);
  overflow:hidden
}
.chat-header{
  display:flex;justify-content:space-between;align-items:center;padding:1rem 1rem .8rem;
  border-bottom:1px solid var(--line)
}
.chat-header small{display:block;color:var(--text-soft)}
.chat-header button{
  border:none;background:transparent;font-size:1.4rem;cursor:pointer;color:var(--text-soft)
}
.chat-messages{padding:1rem;display:grid;gap:.75rem;max-height:280px;overflow:auto;background:var(--bg-soft)}
.bot-message,.user-message{
  white-space:pre-line;
  padding:.85rem 1rem;border-radius:18px;max-width:85%;box-shadow:var(--shadow);font-size:.95rem
}
.bot-message{
  white-space: pre-line;background:var(--surface);color:var(--text)}
.user-message{background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff;justify-self:end}
.chat-prompts{display:flex;flex-wrap:wrap;gap:.5rem;padding:1rem;border-top:1px solid var(--line)}
.chat-prompts button{
  border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:.55rem .8rem;cursor:pointer
}
.chat-form{
  display:flex;gap:.5rem;padding:1rem;border-top:1px solid var(--line)
}
.chat-form input{
  flex:1;border:1px solid var(--line);background:var(--bg);color:var(--text);
  border-radius:14px;padding:.95rem 1rem;font:inherit
}
.chat-form button{
  border:none;border-radius:14px;padding:0 1rem;background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff;font-weight:700
}
.reveal{opacity:0;transform:translateY(24px);transition:opacity .7s ease, transform .7s ease}
.reveal.visible{opacity:1;transform:translateY(0)}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0
}

/* V2.1 visual refinement: balanced portrait, clearer glass surfaces, and theme parity */
:root:not([data-theme="dark"]) .glass{
  background:rgba(255,255,255,.78);
  border-color:rgba(255,255,255,.82);
}
:root[data-theme="dark"] .glass{
  background:rgba(22,35,33,.82);
  border-color:rgba(145,185,174,.24);
}
:root:not([data-theme="dark"]) .profile-card{
  box-shadow:0 24px 60px rgba(35,104,82,.15);
}
:root[data-theme="dark"] .profile-card{
  box-shadow:0 24px 60px rgba(0,0,0,.34);
}
:root:not([data-theme="dark"]) .floating-card{
  border-color:rgba(196,224,214,.85);
}
:root[data-theme="dark"] .floating-card{
  border-color:rgba(145,185,174,.28);
}
.hero-note strong{color:var(--text)}

@media (max-width: 980px){
  .hero-grid,.content-grid-2,.project-card,.project-primary{grid-template-columns:1fr}
  .hero-grid{gap:1.2rem}
  .hero-copy h1{max-width:13ch}
  .hero-visual{min-height:470px;max-width:650px;width:100%;margin-inline:auto}
  .floating-card-top{right:2px;left:auto;transform:none}
  .floating-card-bottom{left:2px;right:auto;transform:none}
}
@media (max-width: 820px){
  .site-nav{
    position:fixed;left:1rem;right:1rem;top:84px;background:var(--surface);border:1px solid var(--line);
    border-radius:24px;box-shadow:var(--shadow-strong);padding:1rem;display:none;flex-direction:column;align-items:flex-start
  }
  .site-nav.open{display:flex}
  .menu-toggle{display:block}
  .card-grid,.skill-grid{grid-template-columns:1fr}
  .header-actions .button-small{display:none}
}
@media (max-width: 640px){
  .section{padding:78px 0}
  .hero{padding-top:48px}
  .hero-copy h1{font-size:clamp(2.35rem,11vw,3.25rem);max-width:11.5ch}
  .hero-visual{min-height:410px;padding:18px 12px}
  .profile-card{width:min(300px,78%)}
  .profile-photo{height:310px}
  .floating-card{width:min(190px,58%);padding:.75rem .8rem}
  .floating-card p{font-size:.76rem}
  .chat-panel{right:12px;bottom:82px}
  .chat-launcher{right:12px;bottom:12px}
}



/* V2.2: Auto mode must style glass cards to match the operating-system theme.
   Explicit Light and Dark selections continue to take precedence. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .glass {
    background: rgba(22, 35, 33, .84);
    border-color: rgba(145, 185, 174, .28);
    color: var(--text);
  }
  :root:not([data-theme="light"]) .photo-placeholder {
    border-color: rgba(236, 246, 243, .2);
    background: linear-gradient(155deg, rgba(255,255,255,.055), rgba(115,201,255,.07));
    color: var(--text-soft);
  }
  :root:not([data-theme="light"]) .photo-placeholder span {
    color: var(--text);
  }
  :root:not([data-theme="light"]) .profile-card {
    box-shadow: 0 24px 60px rgba(0,0,0,.34);
  }
  :root:not([data-theme="light"]) .floating-card {
    border-color: rgba(145,185,174,.28);
    color: var(--text);
  }
}


/* V2.3 Home refinement */
.hero-grid{align-items:start}
.hero-copy{padding-top:4px}
.hero-copy h1{max-width:12.2ch;line-height:1.035}
.headline-line{display:block}
.headline-line.gradient-text{width:fit-content}
.technology-gradient{
  background:linear-gradient(115deg,var(--accent-deep),var(--blue-deep));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-visual{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:1rem;min-height:0;padding:0 18px 8px;margin-top:88px;
}
.profile-card{width:min(330px,82%);transform:none;z-index:2}
.profile-photo{height:390px}
.hero-highlights{
  position:relative;z-index:3;width:min(100%,460px);
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;align-items:stretch;margin-top:-.1rem;
}
.floating-card{
  position:relative;inset:auto;width:auto;min-width:0;
  padding:.85rem .9rem;border-radius:18px;transform:none;
  backdrop-filter:blur(18px);
}
.floating-card strong{font-size:.95rem}
.floating-card p{font-size:.82rem;overflow-wrap:anywhere}
.floating-card-top,.floating-card-bottom{position:relative;inset:auto}
@media (max-width:980px){
  .hero-grid{align-items:start}
  .hero-visual{margin-top:0;max-width:650px}
  .profile-card{width:min(330px,78%)}
  .hero-highlights{width:min(100%,520px)}
}
@media (max-width:640px){
  .hero-copy h1{max-width:none;font-size:clamp(2.35rem,10.5vw,3.25rem);line-height:1.04}
  .hero-visual{min-height:0;padding:0 4px 4px;gap:.85rem}
  .profile-card{width:min(290px,78%)}
  .profile-photo{height:320px}
  .hero-highlights{grid-template-columns:1fr;width:min(100%,360px);gap:.65rem}
  .floating-card{width:100%;padding:.85rem .95rem}
  .floating-card p{font-size:.84rem}
}


/* V2.4 Home refinement: portrait aligns with the main headline; hero stays uncluttered. */
@media (min-width:981px){
  .hero-visual{align-self:start;margin-top:88px}
}
@media (max-width:980px){
  .hero-visual{margin-top:0}
}


/* V2.5 micro-adjustment: raise the portrait 28px on desktop for headline alignment. */
@media (min-width:981px){
  .hero-visual{margin-top:88px}
}
@media (max-width:980px){
  .hero-visual{margin-top:0}
}


/* V2.6 About section */
.about-headline{
  display:flex;
  flex-direction:column;
  gap:.02em;
  line-height:1.02;
}
.about-headline > span{
  display:block;
}
@media (max-width:640px){
  .about-headline{font-size:clamp(2.2rem,9vw,3.2rem)}
}


/* V2.7 About content hierarchy and balance */
.about-panels{
  align-items:stretch;
}
.about-panels > .panel{
  min-height:100%;
}
.about-panel-kicker{
  margin:0 0 .8rem;
  color:var(--accent-deep);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.12em;
  line-height:1.4;
  text-transform:uppercase;
}
.about-background .lead{
  margin-top:0;
}
.about-interests{
  margin-top:1.65rem;
  padding-top:1.25rem;
  border-top:1px solid var(--border);
}
.about-interest-tags{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.interest-tag{
  display:inline-flex;
  align-items:center;
  padding:.55rem .8rem;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface-soft);
  color:var(--text);
  font-size:.84rem;
  font-weight:650;
}
.about-journey > p:not(.about-panel-kicker),
.about-subsection > p:not(.about-panel-kicker){
  line-height:1.75;
}
.about-subsection{
  margin-top:1.5rem;
  padding-top:1.25rem;
  border-top:1px solid var(--border);
}
.about-subsection > p:last-child{
  margin-bottom:0;
}
@media (max-width:760px){
  .about-panels{
    grid-template-columns:1fr;
  }
  .about-panels > .panel{
    min-height:0;
  }
}


/* V2.8 About editorial layout */
.about-headline-inline{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.18em .28em;
  line-height:1.08;
  margin:0;
}
.about-headline-inline > span{
  display:inline;
  white-space:nowrap;
}
.about-editorial{
  width:min(100%, 920px);
  margin:2rem auto 0;
  padding-left:clamp(0px, 5vw, 64px);
}
.about-editorial-kicker{
  margin:0 0 .65rem;
  color:var(--accent-deep);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.12em;
  line-height:1.45;
  text-transform:uppercase;
}
.about-editorial p:not(.about-editorial-kicker){
  max-width:78ch;
  line-height:1.8;
}
.about-editorial-lead{
  font-size:1.12rem;
  font-weight:550;
}
.about-editorial-interests{
  margin:1.55rem 0 1.8rem;
}
.about-editorial-group{
  margin-top:1.8rem;
  padding-top:1.35rem;
  border-top:1px solid var(--border);
}
.about-editorial-group p:last-child{
  margin-bottom:0;
}
.about-interest-tags{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}
.interest-tag{
  display:inline-flex;
  align-items:center;
  padding:.52rem .8rem;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface-soft);
  color:var(--text);
  font-size:.84rem;
  font-weight:650;
}
@media (max-width:760px){
  .about-headline-inline{
    gap:.12em .22em;
    font-size:clamp(1.9rem,7.2vw,3rem);
  }
  .about-editorial{
    margin-top:1.5rem;
    padding-left:0;
  }
  .about-editorial-lead{
    font-size:1.02rem;
  }
}


/* V2.10 About alignment and typography refinement */
.about-editorial{
  width:calc(100% - 58px);
  max-width:none;
  margin:2rem 0 0 58px;
  padding-left:0;
}
.about-editorial p:not(.about-editorial-kicker){
  max-width:none;
  text-align:justify;
  text-justify:inter-word;
}
.about-editorial-lead{
  font-weight:500;
}
.about-editorial-interests{
  margin:1.8rem 0 0;
  padding-top:1.3rem;
  border-top:1px solid var(--border);
}
@media (max-width:760px){
  .about-editorial{
    width:calc(100% - 58px);
    margin:1.5rem 0 0 58px;
    padding-left:0;
  }
}
@media (max-width:480px){
  .about-editorial{
    width:100%;
    margin:1.5rem 0 0;
  }
  .about-editorial p:not(.about-editorial-kicker){
    text-align:left;
  }
}


/* V2.11 About text flow and alignment refinements */
.about-editorial{
  width:min(calc(100% - 58px), 1080px);
}
.about-editorial-lead{
  font-weight:400;
}
.about-interest-tags{
  margin-left:0;
  padding-left:0;
  gap:.75rem 1.1rem;
}
.about-interest-tags .interest-tag{
  padding:.35rem 0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
@media (max-width:760px){
  .about-editorial{
    width:calc(100% - 58px);
  }
}
@media (max-width:480px){
  .about-editorial{
    width:100%;
  }
}


/* V2.12 final About narrative width refinement */
.about-editorial{
  width:min(calc(100% - 58px), 980px);
}
@media (max-width:760px){
  .about-editorial{
    width:calc(100% - 58px);
  }
}
@media (max-width:480px){
  .about-editorial{
    width:100%;
  }
}


/* V2.13: unify typography across all About narrative paragraphs */
.about-editorial .about-editorial-lead{
  font-size:inherit;
  font-weight:inherit;
  line-height:inherit;
}


/* V2.14: simple, high-contrast About headline */
.about-title-plain{
  color:var(--text);
  background:none;
  -webkit-text-fill-color:currentColor;
}


/* V2.16: align Education timeline cards with the section heading text */
#education .timeline{
  width:calc(100% - 58px);
  margin-left:58px;
}
@media (max-width:480px){
  #education .timeline{
    width:100%;
    margin-left:0;
  }
}


/* V2.17: Experience timeline refinement */
#experience .experience-timeline{
  width:calc(100% - 58px);
  margin-left:58px;
  gap:1.25rem;
}
#experience .experience-item{
  padding:1.5rem 1.6rem 1.5rem 2rem;
}
#experience .experience-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.6rem 1rem;
  margin-bottom:.9rem;
}
#experience .experience-item h3{
  margin-bottom:.45rem;
}
#experience .experience-item p{
  line-height:1.75;
}
#experience .experience-list-title{
  font-weight:700;
  margin:.95rem 0 .35rem;
}
#experience .experience-item ul{
  margin:.35rem 0 0;
  padding-left:1.2rem;
}
#experience .experience-item li{
  margin:.3rem 0;
  line-height:1.65;
}
@media (max-width:760px){
  #experience .experience-timeline{
    width:calc(100% - 58px);
    margin-left:58px;
  }
  #experience .experience-item{
    padding:1.25rem 1.15rem 1.25rem 1.5rem;
  }
}
@media (max-width:480px){
  #experience .experience-timeline{
    width:100%;
    margin-left:0;
  }
  #experience .experience-item{
    padding:1.2rem;
  }
}


/* V2.17.1: Improve Experience narrative alignment */
#experience .experience-item > p:not(.muted):not(.experience-list-title){
  text-align:justify;
  text-justify:inter-word;
}


/* V2.18: Featured Project Showcase */
#projects .featured-projects{gap:1.5rem}
#projects .featured-project{
  grid-template-columns:.88fr 1.12fr;
  align-items:stretch;
  padding:1.1rem;
  gap:1.5rem;
}
#projects .featured-project .project-visual{
  min-height:100%;
  min-height:360px;
}
#projects .featured-project .project-body{padding:1.1rem .8rem 1.1rem 0}
#projects .featured-project .project-body > p:not(.project-links):not(.project-result-note){
  text-align:justify;
  text-justify:inter-word;
  line-height:1.75;
}
#projects .featured-project .project-body h4{
  margin:1rem 0 .5rem;
  font-size:.98rem;
}
#projects .featured-project .project-body ul{padding-left:1.15rem}
#projects .featured-project .project-body li{margin:.4rem 0;line-height:1.6}
#projects .project-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.65rem;
  margin:1.1rem 0;
}
#projects .project-stats > div{
  background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:14px;
  padding:.75rem .8rem;
}
#projects .project-stats b{display:block;font-size:1.25rem}
#projects .project-stats small{display:block;color:var(--text-soft);font-size:.72rem;line-height:1.35}
#projects .project-links{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem 1rem;
  margin-top:.9rem;
  font-size:.88rem;
}
#projects .project-links a{font-weight:700;text-decoration:underline;text-underline-offset:3px}
#projects .project-result-note{
  color:var(--text-soft);
  font-size:.78rem;
  line-height:1.55;
  margin-top:.75rem;
}
#projects .research-visual-label{
  position:absolute;
  left:1rem;
  bottom:1rem;
  z-index:2;
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  padding:.5rem .75rem;
  background:rgba(15,35,30,.72);
  color:#fff;
  font-size:.75rem;
  font-weight:700;
}
@media (max-width:760px){
  #projects .featured-project{grid-template-columns:1fr}
  #projects .featured-project .project-visual{min-height:300px}
  #projects .featured-project .project-body{padding:.5rem .25rem .25rem}
}
@media (max-width:420px){
  #projects .project-stats{grid-template-columns:1fr 1fr}
  #projects .project-stats > div:last-child{grid-column:1 / -1}
}


/* V2.18.1: Align featured project cards with section heading text */
#projects .featured-projects{
  width:calc(100% - 58px);
  margin-left:58px;
}
@media (max-width:480px){
  #projects .featured-projects{
    width:calc(100% - 58px);
    margin-left:58px;
  }
}


/* V2.18.2: Project chronology and EsCore training performance */
#projects .project-period{
  color:var(--text-soft);
  font-size:.82rem;
  font-weight:650;
  margin:.35rem 0 .85rem;
}
#projects .project-performance-chart{
  margin:1.1rem 0 .85rem;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
#projects .project-performance-chart img{
  display:block;
  width:100%;
  height:auto;
}
#projects .project-performance-chart figcaption{
  padding:.55rem .8rem;
  color:#64748b;
  font-size:.74rem;
  background:#fff;
}
#projects .project-achievement{
  border-left:3px solid var(--accent);
  padding:.55rem .8rem;
  margin:.8rem 0;
  background:var(--bg-soft);
  border-radius:0 10px 10px 0;
  font-size:.88rem;
  line-height:1.55;
}


/* V2.19: Technical Skills taxonomy */
#skills .skill-grid-five{
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
}
#skills .skill-card{
  padding:1.35rem;
}
#skills .skill-card h3{
  margin-bottom:.65rem;
}
#skills .skill-card p{
  line-height:1.8;
  margin:0;
}
@media (max-width:900px){
  #skills .skill-grid-five{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:560px){
  #skills .skill-grid-five{
    grid-template-columns:1fr;
  }
}


/* V2.19.1: Align Technical Skills cards with section heading text */
#skills .skill-grid-five{
  width:calc(100% - 55px);
  margin-left:55px;
}
@media (max-width:560px){
  #skills .skill-grid-five{
    width:calc(100% - 55px);
    margin-left:55px;
  }
}


/* V2.20: Certificates and Achievements presentation */
#certificates .credential-group{margin-top:1.8rem}
#certificates .credential-group-head{margin-bottom:1rem}
#certificates .credential-group-head h3{font-size:1.25rem;margin:.25rem 0 0}
#certificates .achievement-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}
#certificates .achievement-card{
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  gap:1rem;
  align-items:start;
  padding:1.25rem;
}
#certificates .achievement-icon{
  width:52px;height:52px;border-radius:16px;
  display:grid;place-items:center;
  background:var(--bg-soft);
  color:var(--accent);
  font-size:1.6rem;font-weight:800;
}
#certificates .achievement-card h3,
#certificates .certification-card h3{margin:.5rem 0;line-height:1.4}
#certificates .achievement-card p{margin:.25rem 0;color:var(--text-soft)}
#certificates .credential-year{
  display:block;
  margin:.55rem 0 0;
  color:var(--text-soft);
  font-size:.82rem;
}
#certificates .certification-group{margin-top:2.4rem}
#certificates .certification-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
}
#certificates .certification-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:1.2rem;
  min-height:205px;
}
#certificates .certification-card h3{flex:1}
#certificates .credential-link{
  display:inline-flex;
  margin-top:1rem;
  font-size:.86rem;
  font-weight:700;
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
}
@media (max-width:900px){
  #certificates .certification-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  #certificates .achievement-grid,
  #certificates .certification-grid{grid-template-columns:1fr}
  #certificates .achievement-card{grid-template-columns:48px minmax(0,1fr)}
  #certificates .achievement-icon{width:44px;height:44px}
}


/* V2.20.1: Three-group credential structure and heading alignment */
#certificates .credential-content{
  width:calc(100% - 48px);
  margin-left:48px;
}
#certificates .credential-group{margin-top:1.8rem}
#certificates .credential-group-head{margin-bottom:1rem}
#certificates .credential-group-head h3{font-size:1.25rem;margin:.25rem 0 0}
#certificates .achievement-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}
#certificates .achievement-card{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:1rem;
  align-items:start;
  padding:1.25rem;
}
#certificates .achievement-icon{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:var(--bg-soft);
  color:var(--accent);
  font-size:1.5rem;font-weight:800;
}
#certificates .achievement-card h3,
#certificates .certification-card h3{margin:.5rem 0;line-height:1.4}
#certificates .achievement-card p{margin:.25rem 0;color:var(--text-soft);line-height:1.55}
#certificates .credential-year{
  display:block;
  margin:.55rem 0 0;
  color:var(--text-soft);
  font-size:.82rem;
}
#certificates .certification-group,
#certificates .professional-contributions{margin-top:2.4rem}
#certificates .certification-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
}
#certificates .certification-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:1.2rem;
  min-height:205px;
}
#certificates .certification-card h3{flex:1}
#certificates .credential-link{
  display:inline-flex;
  margin-top:1rem;
  font-size:.86rem;
  font-weight:700;
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
}
@media (max-width:900px){
  #certificates .certification-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  #certificates .credential-content{
    width:calc(100% - 48px);
    margin-left:48px;
  }
  #certificates .achievement-grid,
  #certificates .certification-grid{grid-template-columns:1fr}
}


/* V2.20.3: final credential labels, icon consistency, and exact heading alignment */
#certificates .credential-content{
  width:calc(100% - 58px);
  margin-left:58px;
}
@media (max-width:620px){
  #certificates .credential-content{
    width:calc(100% - 58px);
    margin-left:58px;
  }
}


/* V2.21: Contact section */
#contact .contact-box{padding:clamp(1.4rem,3vw,2.2rem)}
#contact .contact-copy{
  max-width:62ch;
  line-height:1.75;
  margin:0 0 1.35rem;
}
#contact .contact-location{
  display:flex;
  align-items:center;
  gap:.85rem;
  margin-top:1.35rem;
  padding:.9rem 1rem;
  width:fit-content;
  border:1px solid var(--line);
  border-radius:16px;
}
#contact .contact-location-icon{
  display:grid;
  place-items:center;
  width:38px;height:38px;
  border-radius:12px;
  background:var(--bg-soft);
  color:var(--accent-deep);
  font-size:1.4rem;
}
#contact .contact-location strong{display:block}
#contact .contact-location p{margin:.15rem 0 0;color:var(--text-soft)}


/* V2.21.1: Simplified Contact layout and icon buttons */
#contact .contact-copy{
  max-width:none;
  width:100%;
  line-height:1.75;
  margin:0 0 1.35rem;
  white-space:nowrap;
}
#contact .contact-button-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#contact .contact-brand-icon{
  fill:currentColor;
  stroke:none;
}
@media (max-width:760px){
  #contact .contact-copy{white-space:normal}
}


/* V2.22: Personal brand placeholder, active navigation, and unified hover states */
.brand-avatar{
  width:56px;height:56px;flex:0 0 56px;
  display:grid;place-items:center;overflow:hidden;border-radius:50%;
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff;
}
.brand-avatar svg{
  width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round;
}
.brand-text strong{display:block}
.brand-text small{display:block;white-space:nowrap}
.site-nav a{transition:color .22s ease,opacity .22s ease}
.site-nav a.active{
  color:var(--text);border-bottom:2px solid transparent;
  border-image:linear-gradient(90deg,var(--accent-deep),var(--blue-deep)) 1;
}
.button,.button-outline{
  transition:background .28s ease,color .28s ease,border-color .28s ease,
  transform .22s ease,box-shadow .28s ease;
}
.button:hover,.button-outline:hover{
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));
  color:#fff;border-color:transparent;box-shadow:var(--shadow);transform:translateY(-2px);
}
.button:focus-visible,.button-outline:focus-visible,.site-nav a:focus-visible{
  outline:2px solid var(--accent-deep);outline-offset:4px;
}
@media (max-width:760px){
  .brand-avatar{width:46px;height:46px;flex-basis:46px}
  .brand-text small{font-size:.68rem}
}


/* V2.23: final review refinements */

/* Theme control: compact icon selector */
.theme-switcher{
  display:inline-flex;align-items:center;gap:3px;
  padding:4px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);box-shadow:var(--shadow);
}
.theme-option{
  width:34px;height:34px;display:grid;place-items:center;
  border:0;border-radius:50%;background:transparent;color:var(--text-soft);
  cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease;
}
.theme-option svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-option:hover{color:var(--text);transform:translateY(-1px)}
.theme-option.active{background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));color:#fff}

/* Exactly one active navigation underline */
.site-nav a.active{border:0!important;border-image:none!important}
.site-nav a.active::after{height:2px;bottom:-8px}

/* Gradient highlight transfer; first button is the resting state */
.hero-actions a,.contact-buttons a{
  background:var(--surface);color:var(--text);
  border:1px solid var(--line);box-shadow:none;
  transition:background .28s ease,color .28s ease,border-color .28s ease,transform .22s ease,box-shadow .28s ease;
}
.hero-actions a.is-highlighted,.contact-buttons a.is-highlighted{
  background:linear-gradient(110deg,var(--accent-deep),var(--blue-deep));
  color:#fff;border-color:transparent;box-shadow:var(--shadow);
}
.hero-actions a:hover,.contact-buttons a:hover{transform:translateY(-2px)}
.hero-actions a:focus-visible,.contact-buttons a:focus-visible{outline:2px solid var(--accent-deep);outline-offset:3px}

/* Resume links */
.resume-link{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.72rem 1rem;border:1px solid var(--line);border-radius:999px;
  color:var(--text);font-weight:700;background:var(--surface);
  transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}
.resume-link:hover{
  background:linear-gradient(110deg,var(--accent-deep),var(--blue-deep));
  color:#fff;border-color:transparent;transform:translateY(-2px)
}
.resume-link span{font-size:.9em}

/* Refined footer */
.site-footer{padding:2rem 0 2.4rem}
.footer-inner{
  align-items:center;padding-top:1.4rem;
  color:var(--text-soft);font-size:.9rem;
}
.footer-inner p:first-child{font-weight:600}
.footer-inner p:last-child{letter-spacing:.01em}

/* Back-to-top control */
.back-to-top{
  position:fixed;right:24px;bottom:94px;z-index:55;
  width:48px;height:48px;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:50%;
  background:var(--surface);color:var(--text);box-shadow:var(--shadow-strong);
  cursor:pointer;opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .22s ease,visibility .22s ease,transform .22s ease,background .2s ease,color .2s ease;
}
.back-to-top.visible{opacity:1;visibility:visible;transform:translateY(0)}
.back-to-top:hover{background:linear-gradient(110deg,var(--accent-deep),var(--blue-deep));color:#fff;border-color:transparent}
.back-to-top svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){
  .back-to-top{right:16px;bottom:88px;width:44px;height:44px}
  .theme-option{width:32px;height:32px}
  .footer-inner{align-items:flex-start}
}


/* V2.24 Chatbot UI refinement: refined minimalist panel + card quick prompts */

/* Persistent Ask Me launcher */
.chat-launcher{
  width:auto;height:54px;min-width:116px;padding:0 19px;
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  border-radius:999px;font:inherit;font-weight:750;font-size:.95rem;
  background:linear-gradient(115deg,var(--accent-deep),var(--blue-deep));
  color:#fff;box-shadow:0 12px 30px rgba(27,174,157,.24);
  transition:transform .22s ease,box-shadow .22s ease,filter .22s ease;
}
.chat-launcher:hover{
  transform:translateY(-3px);filter:brightness(1.06);
  box-shadow:0 16px 36px rgba(27,174,157,.32);
}
.chat-launcher:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.launcher-chat-icon{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
.chat-panel{
  width:min(410px,calc(100vw - 28px));
  bottom:88px;border-radius:22px;
  animation:chatPanelIn .24s ease both;
}
@keyframes chatPanelIn{
  from{opacity:0;transform:translateY(10px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.chat-header{
  padding:1rem 1.05rem;gap:1rem;
}
.chat-brand{display:flex;align-items:center;gap:.7rem;min-width:0}
.chat-brand-icon{
  width:40px;height:40px;flex:0 0 40px;border-radius:14px;
  display:grid;place-items:center;color:#fff;
  background:linear-gradient(135deg,var(--accent-deep),var(--blue-deep));
}
.chat-brand-icon svg{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
.chat-heading-copy{display:block;min-width:0}
.chat-heading-copy strong{display:block;font-size:1rem}
.chat-header small{font-size:.8rem;margin-top:1px}
.chat-header button{
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  font-size:1.45rem;transition:background .2s ease,color .2s ease;
}
.chat-header button:hover{background:var(--bg-soft);color:var(--text)}
.chat-messages{
  padding:1rem 1.05rem;max-height:300px;min-height:130px;
  align-content:start;gap:.8rem;
}
.chat-welcome{
  max-width:100%;padding:1rem 1.05rem;border-radius:18px 18px 18px 7px;
  background:var(--surface);color:var(--text);box-shadow:var(--shadow);
}
.chat-welcome strong{display:block;font-size:1.02rem;margin-bottom:.35rem}
.chat-welcome p{font-size:.91rem;line-height:1.6;color:var(--text-soft)}
.bot-message,.user-message{line-height:1.58;overflow-wrap:anywhere}
.chat-prompts-wrap{
  padding:.9rem 1.05rem 1rem;border-top:1px solid var(--line);
  background:var(--surface);
}
.chat-prompts-title{
  margin:0 0 .65rem;color:var(--text-soft);
  font-size:.77rem;font-weight:750;letter-spacing:.035em;
}
.chat-prompts{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.55rem;padding:0;border:0;
}
.chat-prompts button{
  min-width:0;display:flex;align-items:center;gap:.55rem;
  padding:.72rem .75rem;border:1px solid var(--line);
  border-radius:13px;background:var(--bg-soft);color:var(--text);
  font:inherit;font-size:.83rem;font-weight:650;text-align:left;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.chat-prompts button svg{
  width:18px;height:18px;flex:0 0 18px;fill:none;stroke:var(--accent-deep);
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.chat-prompts button:hover{
  transform:translateY(-2px);border-color:var(--accent-deep);
  background:var(--surface);box-shadow:var(--shadow);
}
.chat-prompts button:focus-visible{outline:2px solid var(--accent-deep);outline-offset:2px}
.chat-form{padding:.9rem 1.05rem 1.05rem;gap:.55rem;background:var(--surface)}
.chat-form input{
  min-width:0;border-radius:14px;padding:.85rem .95rem;
  background:var(--bg);font-size:.9rem;outline:none;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.chat-form input:focus{
  border-color:var(--accent-deep);
  box-shadow:0 0 0 3px rgba(40,177,136,.12);
}
.chat-form button{
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  min-width:76px;padding:0 .85rem;border-radius:14px;cursor:pointer;
  transition:transform .2s ease,filter .2s ease;
}
.chat-form button:hover{transform:translateY(-1px);filter:brightness(1.06)}
.chat-form button svg{
  width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
@media(max-width:520px){
  .chat-launcher{height:50px;min-width:106px;padding:0 16px;right:16px;bottom:16px}
  .chat-panel{right:12px;bottom:78px;width:calc(100vw - 24px);max-height:min(76vh,620px)}
  .chat-messages{max-height:30vh}
  .chat-prompts{gap:.45rem}
  .chat-prompts button{padding:.65rem .6rem;font-size:.79rem}
  .chat-form{padding:.8rem}
  .chat-form button{min-width:68px}
}


/* User-approved manual adjustment carried forward */
.hero-actions{
  position:relative;
  top:-10px;
}

.hero-copy .kicker {
    display: block;
    width: 100%;
    text-align: left;
}

.hero-copy h1 {
    display: block;
    width: 100%;
    text-align: left;
    margin-inline: 0;
    position: relative;
    left: -3px;
}
/* Profile photo - height adjustment */
.profile-photo{
  height:430px;
}

.profile-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  border-radius:18px;
}

/* Mobile */
@media (max-width:640px){
  .profile-photo{
    height:360px;
  }
}

/* Header profile image */
img.brand-avatar {
  display: block;
  width: 70px;
  height: 70px;
  min-width: 70px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  padding: 0;
  background: none;
  overflow: hidden;
}

/* Phase 4.4 — Mobile home layout correction */
.brand-avatar-placeholder {
  display: grid !important;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-deep), var(--blue-deep));
}
.brand-avatar-placeholder svg {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand {
    flex: 1 1 210px;
    min-width: 0;
    gap: 10px;
  }

  .brand-avatar-placeholder {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .brand-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-text strong {
    overflow-wrap: anywhere;
  }

  .brand-text small {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .header-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .theme-switcher {
    max-width: 100%;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hero-copy .kicker {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: clamp(0.68rem, 3.1vw, 0.78rem);
    line-height: 1.55;
    letter-spacing: 0.08em;
  }

  .hero-copy h1 {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    position: static;
    left: auto;
    font-size: clamp(2.35rem, 10.2vw, 3.15rem);
    line-height: 1.04;
    letter-spacing: -0.052em;
    overflow-wrap: anywhere;
  }

  .hero-copy h1 .headline-line {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-copy h1 .headline-line.gradient-text {
    width: fit-content;
    max-width: 100%;
  }

  .hero-copy .hero-text {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.55;
  }

  .hero,
  .hero .container {
    max-width: 100%;
    min-width: 0;
  }
}


/* Phase 4.4 review fixes: mobile navigation, contact icon, and assistant layout */
.site-nav-close{display:none}
@media (max-width:820px){
  .site-nav{padding:3.6rem 1rem 1rem}
  .site-nav-close{
    display:grid;place-items:center;
    position:absolute;top:12px;right:14px;
    width:38px;height:38px;border:1px solid var(--line);
    border-radius:50%;background:var(--surface-alt);
    color:var(--text);font-size:1.65rem;line-height:1;cursor:pointer;
  }
}
@media (max-width:640px){
  .hero-actions{padding-bottom:62px;gap:.65rem}
  .hero-actions .button{max-width:100%;white-space:normal}
  .contact-buttons{padding-bottom:54px;gap:.65rem}
  .contact-buttons .button{min-height:54px}
  .chat-launcher{
    width:54px;height:54px;min-width:54px;
    padding:0;border-radius:50%;right:14px;bottom:14px;
  }
  .chat-launcher span{display:none}
  .chat-launcher .launcher-chat-icon{width:23px;height:23px}
  .chat-panel{
    position:fixed;left:10px;right:10px;top:10px;bottom:10px;
    width:auto;max-height:none;height:auto;
    display:flex;flex-direction:column;
    border-radius:20px;
    padding-bottom:env(safe-area-inset-bottom);
  }
  .chat-panel[hidden]{display:none}
  .chat-messages{flex:1;min-height:100px;max-height:none;overflow:auto}
  .chat-prompts{flex-shrink:0}
  .chat-form{flex-shrink:0}
  body.chat-open .chat-launcher{display:none}
}


/* Phase 4.4 - Mobile Home Spacing */
@media (max-width: 640px) {
  .hero-copy {
    box-sizing: border-box;
    padding-left: 22px;
    padding-right: 22px;
  }
}


/* Phase 4.4.1 - Mobile header overflow correction */
@media (max-width: 640px) {
  .site-header,
  .site-header .container,
  .header-inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .header-inner {
    box-sizing: border-box;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .header-actions {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  .theme-switcher {
    flex: 0 1 auto;
    min-width: 0;
  }

  .menu-toggle {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
  }

  .hero,
  .hero .container,
  .hero-grid,
  .hero-copy {
    min-width: 0;
    max-width: 100%;
  }

  .hero-copy {
    box-sizing: border-box;
    padding-inline: 22px;
  }

  .hero-copy .kicker,
  .hero-copy h1,
  .hero-copy .hero-text {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .hero-copy h1 .headline-line {
    max-width: 100%;
    white-space: normal;
  }
}
