*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#F9F7F4;--fg:#111010;--muted:#6B6B6B;--accent:#C8A97E;
  --border:#E2DDD8;--card:#FFFFFF;
  --serif:'DM Serif Display',serif;--sans:'DM Sans',sans-serif;
  --nav-bg:rgba(249,247,244,0.92);
  --hero-right:#EEEAE4;--thumb-bg:#EEEAE4;--about-img-bg:#EEEAE4;
  --cert-bg:#FFFFFF;
}
body.dark{
  --bg:#0E0D0B;--fg:#F0EBE3;--muted:#9A9087;--accent:#C8A97E;
  --border:#2A2620;--card:#161410;
  --nav-bg:rgba(14,13,11,0.92);
  --hero-right:#1A1714;--thumb-bg:#1A1714;--about-img-bg:#1A1714;
  --cert-bg:#161410;
}
html{scroll-behavior:smooth;font-size:16px}
body{background:var(--bg);color:var(--fg);font-family:var(--sans);font-weight:300;line-height:1.7;overflow-x:hidden}
nav{position:fixed;top:0;left:0;right:0;z-index:100;display:flex;align-items:center;justify-content:space-between;padding:1.25rem 4rem;background:var(--nav-bg);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.nav-logo{font-family:var(--serif);font-size:1.1rem;color:var(--fg);text-decoration:none}
.nav-links{display:flex;gap:2.5rem;list-style:none}
.nav-links a{color:var(--muted);text-decoration:none;font-size:0.82rem;letter-spacing:0.06em;text-transform:uppercase;transition:color 0.2s}
.nav-links a:hover,.nav-links a.active{color:var(--fg)}
.nav-cta{background:var(--fg);color:var(--bg);padding:0.55rem 1.4rem;border-radius:2px;text-decoration:none;font-size:0.78rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;transition:background 0.2s}
.nav-cta:hover{background:var(--accent);color:var(--fg)}
.hamburger{display:none;flex-direction:column;gap:5px;cursor:pointer;background:none;border:none;padding:8px;-webkit-tap-highlight-color:transparent;min-width:44px;min-height:44px;align-items:center;justify-content:center}
.hamburger span{display:block;width:22px;height:1.5px;background:var(--fg)}
.mobile-menu{display:none;position:fixed;inset:0;background:var(--bg);z-index:99;flex-direction:column;align-items:center;justify-content:center;gap:2rem;overflow-y:auto;-webkit-overflow-scrolling:touch}
.mobile-menu.open{display:flex}
.mobile-menu a{font-family:var(--serif);font-size:2rem;color:var(--fg);text-decoration:none;-webkit-tap-highlight-color:transparent}
.mobile-menu a:hover{color:var(--accent)}
.mobile-close{position:absolute;top:1.5rem;right:2rem;background:none;border:none;font-size:1.8rem;cursor:pointer;color:var(--fg);-webkit-tap-highlight-color:transparent;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
body.menu-open{overflow:hidden}
#home{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;padding-top:5rem}
.hero-left{display:flex;flex-direction:column;justify-content:center;padding:5rem 3rem 5rem 4rem}
.hero-tag{display:inline-block;font-size:0.7rem;font-weight:500;letter-spacing:0.14em;text-transform:uppercase;color:var(--accent);border:1px solid var(--accent);padding:0.3rem 0.8rem;border-radius:2px;margin-bottom:1.8rem;width:fit-content}
.hero-name{font-family:var(--serif);font-size:clamp(2.8rem,5vw,4.5rem);line-height:1.08;letter-spacing:-0.02em;margin-bottom:0.4rem}
.hero-name em{font-style:italic;color:var(--accent)}
.hero-role{font-size:1rem;color:var(--muted);margin-bottom:2rem;letter-spacing:0.02em}
.hero-desc{font-size:0.95rem;color:var(--muted);max-width:440px;line-height:1.85;margin-bottom:2.5rem}
.hero-btns{display:flex;gap:1rem;flex-wrap:wrap}
.btn-primary{background:var(--fg);color:var(--bg);padding:0.8rem 2rem;border-radius:2px;text-decoration:none;font-size:0.82rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;transition:background 0.2s,transform 0.15s;display:inline-block}
.btn-primary:hover{background:var(--accent);color:var(--fg);transform:translateY(-1px)}
.btn-outline{border:1px solid var(--border);color:var(--fg);padding:0.8rem 2rem;border-radius:2px;text-decoration:none;font-size:0.82rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;transition:border-color 0.2s,transform 0.15s;display:inline-block}
.btn-outline:hover{border-color:var(--fg);transform:translateY(-1px)}
.hero-stats{display:flex;gap:2.5rem;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--border)}
.stat-num{font-family:var(--serif);font-size:1.8rem}
.stat-label{font-size:0.72rem;color:var(--muted);letter-spacing:0.06em;text-transform:uppercase;margin-top:0.1rem}
.hero-right{position:relative;overflow:hidden;background:var(--hero-right)}
.hero-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-size:8rem;color:var(--accent);opacity:0.2}
.hero-photo{width:100%;height:100%;object-fit:cover;object-position:top center}
.hero-card{position:absolute;bottom:1.5rem;left:1.5rem;right:1.5rem;background:rgba(249,247,244,0.93);backdrop-filter:blur(8px);padding:0.9rem 1.2rem;border-radius:4px;border:1px solid var(--border)}
.hero-card-name{font-family:var(--serif);font-size:1rem}
.hero-card-loc{font-size:0.76rem;color:var(--muted);margin-top:0.2rem}
.hero-card-badge{display:inline-block;margin-top:0.4rem;font-size:0.6rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;background:var(--fg);color:var(--bg);padding:0.2rem 0.5rem;border-radius:2px}
section{padding:6rem 4rem}
.section-label{font-size:0.68rem;font-weight:500;letter-spacing:0.18em;text-transform:uppercase;color:var(--accent);margin-bottom:0.8rem}
.section-title{font-family:var(--serif);font-size:clamp(2rem,3.5vw,2.8rem);line-height:1.15;letter-spacing:-0.01em;margin-bottom:1rem}
.section-title em{font-style:italic;color:var(--accent)}
.section-sub{color:var(--muted);font-size:0.92rem;max-width:540px;line-height:1.85;margin-bottom:3rem}
#about{background:var(--card)}
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:5rem;align-items:center}
.about-img{aspect-ratio:4/5;overflow:hidden;border-radius:4px;background:var(--about-img-bg);display:flex;align-items:center;justify-content:center}
.about-img img{width:100%;height:100%;object-fit:cover;object-position:top}
.about-img-placeholder{font-family:var(--serif);font-size:5rem;color:var(--accent);opacity:0.25}
.about-body{color:var(--muted);font-size:0.92rem;line-height:1.9;margin-bottom:1.5rem}
.about-details{display:flex;flex-direction:column;gap:0.75rem;margin-bottom:2rem}
.about-detail{display:flex;align-items:flex-start;gap:1rem;font-size:0.84rem}
.detail-label{color:var(--muted);font-size:0.7rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;width:80px;flex-shrink:0;padding-top:2px}
.detail-val a{color:var(--fg);text-decoration:none;border-bottom:1px solid var(--border);transition:border-color 0.2s}
.detail-val a:hover{border-color:var(--accent)}
#skills{}
.skills-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.skill-card{border:1px solid var(--border);padding:2rem;border-radius:4px;transition:border-color 0.2s,transform 0.15s}
.skill-card:hover{border-color:var(--accent);transform:translateY(-2px)}
.skill-icon{width:42px;height:42px;background:var(--fg);border-radius:4px;display:flex;align-items:center;justify-content:center;margin-bottom:1.2rem;flex-shrink:0}
.skill-icon svg{width:18px;height:18px;stroke:#F9F7F4;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.skill-cat{font-family:var(--serif);font-size:1.1rem;margin-bottom:0.8rem}
.skill-tags{display:flex;flex-wrap:wrap;gap:0.45rem}
.skill-tag{font-size:0.7rem;padding:0.28rem 0.65rem;border-radius:2px;background:var(--bg);border:1px solid var(--border);color:var(--muted);display:inline-flex;align-items:center;gap:5px}
#projects{background:var(--card)}
.projects-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.8rem}
.project-card{border:1px solid var(--border);border-radius:4px;overflow:hidden;transition:transform 0.2s,box-shadow 0.2s}
.project-card:hover{transform:translateY(-3px);box-shadow:0 16px 48px rgba(0,0,0,0.07)}
.project-thumb{height:180px;background:var(--thumb-bg);display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--border);position:relative;overflow:hidden}
.project-thumb-dot{position:absolute;inset:0;background-image:radial-gradient(circle,rgba(17,16,16,0.07) 1px,transparent 1px);background-size:22px 22px}
.project-thumb-lbl{position:relative;z-index:1;font-family:var(--serif);font-size:2.5rem;color:var(--accent)}
.project-body{padding:1.5rem 1.8rem}
.project-tags{display:flex;flex-wrap:wrap;gap:0.4rem;margin-bottom:0.7rem}
.project-tag{font-size:0.62rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;padding:0.2rem 0.5rem;border-radius:2px;background:var(--fg);color:var(--bg)}
.project-name{font-family:var(--serif);font-size:1.25rem;margin-bottom:0.45rem}
.project-desc{font-size:0.83rem;color:var(--muted);line-height:1.75;margin-bottom:1.1rem}
.project-links{display:flex;gap:1rem}
.project-link{font-size:0.72rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;color:var(--fg);text-decoration:none;border-bottom:1px solid var(--border);padding-bottom:1px;transition:border-color 0.2s,color 0.2s}
.project-link:hover{border-color:var(--accent);color:var(--accent)}
#experience{}
.timeline{display:flex;flex-direction:column}
.tl-item{display:grid;grid-template-columns:180px 1fr;gap:3rem;padding:2.5rem 0;border-bottom:1px solid var(--border)}
.tl-item:first-child{border-top:1px solid var(--border)}
.tl-date{font-size:0.78rem;color:var(--muted);padding-top:0.3rem}
.tl-role{font-family:var(--serif);font-size:1.15rem;margin-bottom:0.2rem}
.tl-org{font-size:0.82rem;color:var(--accent);font-weight:500;margin-bottom:0.65rem}
.tl-desc{font-size:0.85rem;color:var(--muted);line-height:1.8}
#certifications{background:var(--card)}
.certs-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.cert-card{display:flex;align-items:flex-start;gap:1.2rem;padding:1.5rem;border:1px solid var(--border);border-radius:4px;transition:border-color 0.2s}
.cert-card:hover{border-color:var(--accent)}
.cert-ico{width:44px;height:44px;background:var(--fg);border-radius:3px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:var(--serif);font-size:0.95rem;color:var(--bg)}
.cert-name{font-weight:500;font-size:0.88rem;margin-bottom:0.2rem;line-height:1.4}
.cert-issuer{font-size:0.76rem;color:var(--muted)}
.cert-date{font-size:0.7rem;color:var(--accent);margin-top:0.3rem}
.cert-verify{display:inline-block;margin-top:0.5rem;font-size:0.66rem;font-weight:500;letter-spacing:0.08em;text-transform:uppercase;color:var(--fg);text-decoration:none;border-bottom:1px solid var(--border);transition:border-color 0.2s}
.cert-verify:hover{border-color:var(--accent)}
#contact{background:var(--fg);color:var(--bg);text-align:center}
#contact .section-label{color:var(--accent)}
#contact .section-title{color:var(--bg)}
#contact .section-sub{color:rgba(249,247,244,0.55);margin:0 auto 2.5rem}
.contact-email{font-family:var(--serif);font-size:clamp(1.4rem,3vw,2.4rem);color:var(--bg);text-decoration:none;border-bottom:1px solid rgba(249,247,244,0.2);padding-bottom:4px;transition:border-color 0.2s,color 0.2s;display:inline-block;margin-bottom:2.5rem}
.contact-email:hover{border-color:var(--accent);color:var(--accent)}
.socials{display:flex;justify-content:center;gap:1.8rem;flex-wrap:wrap}
.social-link{font-size:0.74rem;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:rgba(249,247,244,0.4);text-decoration:none;transition:color 0.2s}
.social-link:hover{color:var(--accent)}
footer{padding:1.5rem 4rem;display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(249,247,244,0.1);background:var(--fg)}
footer p{font-size:0.73rem;color:rgba(249,247,244,0.28)}
.footer-logo{font-family:var(--serif);font-size:0.9rem;color:rgba(249,247,244,0.35)}
.reveal{opacity:1;transform:none}
.d1{transition-delay:0.1s}.d2{transition-delay:0.2s}.d3{transition-delay:0.3s}
@media(max-width:1024px){nav{padding:1.25rem 2rem}section{padding:5rem 2rem}#home{grid-template-columns:1fr}.hero-right{height:55vw;min-height:280px}.hero-left{padding:4rem 2rem 3rem}.about-grid{grid-template-columns:1fr;gap:3rem}.about-img{max-height:380px}.skills-grid{grid-template-columns:repeat(2,1fr)}.projects-grid{grid-template-columns:1fr}.tl-item{grid-template-columns:1fr;gap:0.4rem}footer{padding:1.5rem 2rem}}
@media(max-width:768px){.nav-links,.nav-cta,.nav-cv{display:none}.hamburger{display:flex}section{padding:4rem 1.5rem}.hero-left{padding:3rem 1.5rem 2rem}.skills-grid{grid-template-columns:1fr}.certs-grid{grid-template-columns:1fr}.hero-stats{gap:1.5rem}footer{flex-direction:column;gap:0.5rem;text-align:center;padding:1.5rem}}

/* Dark mode toggle */
.theme-toggle{
  position:relative;
  display:flex;align-items:center;gap:6px;
  background:none;border:none;cursor:pointer;padding:0;
  flex-shrink:0;
}
.toggle-icon{display:flex;align-items:center;transition:opacity 0.2s}
.toggle-icon svg{width:14px;height:14px;stroke:var(--accent);stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.toggle-track{
  width:40px;height:22px;
  background:var(--border);
  border-radius:11px;
  position:relative;
  transition:background 0.3s;
  border:1px solid var(--border);
}
body.dark .toggle-track{background:var(--accent)}
.toggle-thumb{
  position:absolute;
  top:3px;left:3px;
  width:14px;height:14px;
  background:var(--fg);
  border-radius:50%;
  transition:transform 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s;
}
body.dark .toggle-thumb{
  transform:translateX(18px);
  background:var(--bg);
}

.skill-icon svg{width:20px;height:20px;stroke:#F9F7F4 !important;fill:none !important;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.skill-tag i{display:flex;align-items:center}
.skill-tag i svg{width:11px;height:11px;stroke:var(--accent);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* CV download buttons */
.nav-cv{
  border:1px solid var(--accent);color:var(--accent);
  padding:0.5rem 1.1rem;border-radius:2px;text-decoration:none;
  font-size:0.75rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;
  transition:background 0.2s,color 0.2s;white-space:nowrap;
}
.nav-cv:hover{background:var(--accent);color:var(--bg)}
.btn-cv{
  border:1px solid var(--accent);color:var(--accent);
  padding:0.8rem 2rem;border-radius:2px;text-decoration:none;
  font-size:0.82rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase;
  transition:background 0.2s,color 0.2s,transform 0.15s;display:inline-block;
}
.btn-cv:hover{background:var(--accent);color:var(--bg);transform:translateY(-1px)}
@media(max-width:768px){.nav-cv{display:none}}

@media(max-width:768px){
  .hero-right{display:flex;flex-direction:column;height:auto}
  .hero-photo{width:100%;height:55vw;object-fit:cover;object-position:top center}
  .hero-card{position:relative;bottom:auto;left:auto;right:auto;margin:0;border-radius:0;border:none;border-top:1px solid var(--border)}
}