*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f5f3ee;
  --bg2:#ffffff;
  --bg3:#ede9e1;
  --bg4:#e8e4da;
  --text:#1c1a17;
  --text2:#5c5650;
  --text3:#9c9488;
  --accent:#1a5276;
  --accent-light:#d6e8f5;
  --accent2:#b5651d;
  --accent2-light:#f5e6d3;
  --green:#1a6645;
  --green-light:#d4eddf;
  --border:#ddd8cc;
  --border2:#ccc6b8;
  --nav-bg:rgba(245,243,238,0.94);
  --card:#ffffff;
  --shadow:0 1px 3px rgba(0,0,0,0.07);
  --ff:'DM Sans',system-ui,sans-serif;
  --fd:'Lora',Georgia,serif;
}
[data-theme="dark"]{
  --bg:#0f0e0c;
  --bg2:#191714;
  --bg3:#131210;
  --bg4:#1e1c18;
  --text:#f0ece4;
  --text2:#9c9488;
  --text3:#5c5650;
  --accent:#5b9fd4;
  --accent-light:#12273a;
  --accent2:#d4843c;
  --accent2-light:#2a1c0d;
  --green:#3aad72;
  --green-light:#0d2318;
  --border:#2a2820;
  --border2:#3a3628;
  --nav-bg:rgba(15,14,12,0.94);
  --card:#191714;
  --shadow:0 1px 4px rgba(0,0,0,0.3);
}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--ff);line-height:1.7;overflow-x:hidden;transition:background .35s,color .35s}

nav{position:fixed;top:0;left:0;right:0;z-index:200;display:flex;align-items:center;justify-content:space-between;padding:.9rem 3rem;background:var(--nav-bg);backdrop-filter:blur(18px);border-bottom:1px solid var(--border);transition:background .35s,border-color .35s}
.nav-logo{font-family:var(--fd);font-weight:700;font-size:1.1rem;color:var(--accent);letter-spacing:.01em}
.nav-right{display:flex;align-items:center;gap:2.5rem}
.nav-links{display:flex;gap:1.75rem;list-style:none}
.nav-links a{font-size:.8rem;color:var(--text2);text-decoration:none;letter-spacing:.03em;transition:color .2s;font-weight:500}
.nav-links a:hover{color:var(--text)}
.theme-btn{background:none;border:1px solid var(--border2);color:var(--text2);cursor:pointer;padding:.32rem .85rem;border-radius:20px;font-size:.75rem;font-family:var(--ff);transition:all .2s;letter-spacing:.03em;font-weight:500}
.theme-btn:hover{border-color:var(--accent);color:var(--accent)}

.hero{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:9rem 3rem 5rem;position:relative}
.hero-bg{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.hero-bg::before{content:'';position:absolute;top:-20%;right:-10%;width:600px;height:600px;border-radius:50%;background:radial-gradient(ellipse,rgba(26,82,118,.055) 0%,transparent 65%)}
.hero-bg::after{content:'';position:absolute;bottom:-10%;left:-5%;width:400px;height:400px;border-radius:50%;background:radial-gradient(ellipse,rgba(181,101,29,.04) 0%,transparent 65%)}
.hero-inner{max-width:980px;width:100%;display:grid;grid-template-columns:1fr 260px;gap:5rem;align-items:center;position:relative}
.hero-badge{display:inline-flex;align-items:center;gap:.5rem;background:var(--green-light);color:var(--green);border:1px solid rgba(26,102,69,.18);font-size:.72rem;padding:.32rem .9rem;border-radius:20px;margin-bottom:1.5rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.badge-dot{width:6px;height:6px;border-radius:50%;background:var(--green);flex-shrink:0;animation:blink 2s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.3}}
.hero-name{font-family:var(--fd);font-size:clamp(2.4rem,5vw,3.8rem);font-weight:700;line-height:1.1;letter-spacing:-.01em;color:var(--text);margin-bottom:.4rem}
.hero-alias{font-size:.95rem;color:var(--accent);font-weight:600;margin-bottom:1.3rem;letter-spacing:.06em}
.hero-tagline{font-size:.93rem;color:var(--text2);max-width:500px;line-height:1.9;margin-bottom:2rem}
.hero-tagline strong{color:var(--text);font-weight:600}
.hero-cta{display:flex;gap:.85rem;flex-wrap:wrap}
.btn{padding:.68rem 1.6rem;font-family:var(--ff);font-size:.8rem;font-weight:500;letter-spacing:.03em;text-decoration:none;border-radius:8px;cursor:pointer;transition:all .22s;border:1px solid transparent}
.btn-primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn-primary:hover{opacity:.85;transform:translateY(-1px)}
.btn-outline{background:transparent;color:var(--text2);border-color:var(--border2)}
.btn-outline:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-light)}

.hero-card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:1.75rem 1.5rem;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:0}
.hi-avatar{width:72px;height:72px;border-radius:50%;background:var(--accent-light);border:2px solid var(--border);display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-size:1.3rem;font-weight:700;color:var(--accent);margin:0 auto 1rem}
.hi-name{font-weight:600;font-size:.92rem;color:var(--text);text-align:center;margin-bottom:.15rem}
.hi-role{font-size:.75rem;color:var(--text3);text-align:center;margin-bottom:1.2rem}
.hi-sep{height:1px;background:var(--border);margin-bottom:1.2rem}
.hi-meta{display:flex;flex-direction:column;gap:.6rem}
.hi-row{display:flex;align-items:flex-start;gap:.65rem;font-size:.75rem;color:var(--text2)}
.hi-icon{color:var(--accent2);width:16px;flex-shrink:0;margin-top:.15rem;font-size:.8rem}
.hi-badge{display:inline-block;background:var(--accent2-light);color:var(--accent2);border:1px solid rgba(181,101,29,.2);font-size:.68rem;padding:.15rem .5rem;border-radius:4px;font-weight:600;letter-spacing:.05em}

section{padding:5.5rem 3rem;max-width:980px;margin:0 auto}
.divider{height:1px;background:var(--border);max-width:980px;margin:0 auto}
.sec-label{display:flex;align-items:center;gap:.6rem;font-size:.68rem;letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin-bottom:.6rem;font-weight:600}
.sec-label::before{content:'';width:20px;height:1.5px;background:var(--accent);flex-shrink:0}
.sec-title{font-family:var(--fd);font-size:clamp(1.6rem,3vw,2.1rem);font-weight:700;letter-spacing:-.01em;margin-bottom:2.75rem;color:var(--text)}

.about-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:3.5rem;align-items:start}
.about-prose{font-size:.91rem;color:var(--text2);line-height:1.95}
.about-prose p+p{margin-top:.9rem}
.about-prose strong{color:var(--text);font-weight:600}

.heritage-card{background:var(--card);border:1px solid var(--border);border-left:3.5px solid var(--accent2);border-radius:12px;padding:1.5rem;margin-top:1.5rem;box-shadow:var(--shadow)}
.heritage-header{display:flex;align-items:center;gap:.55rem;margin-bottom:.85rem}
.heritage-icon{font-size:1rem}
.heritage-ttl{font-size:.7rem;letter-spacing:.15em;text-transform:uppercase;color:var(--accent2);font-weight:700}
.heritage-body{font-size:.84rem;color:var(--text2);line-height:1.8}
.heritage-body strong{color:var(--text);font-weight:600}
.royal-badge{display:inline-flex;align-items:center;gap:.35rem;background:var(--accent2-light);border:1px solid rgba(181,101,29,.2);border-radius:6px;padding:.3rem .7rem;margin-top:.85rem;font-size:.75rem;color:var(--accent2);font-weight:600}

.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:.9rem}
.stat-card{background:var(--card);border:1px solid var(--border);padding:1.2rem;border-radius:10px;transition:border-color .2s,box-shadow .2s;box-shadow:var(--shadow)}
.stat-card:hover{border-color:var(--accent);box-shadow:0 2px 12px rgba(26,82,118,.1)}
.stat-num{font-family:var(--fd);font-size:1.7rem;font-weight:700;color:var(--accent);line-height:1}
.stat-lbl{font-size:.7rem;color:var(--text3);margin-top:.3rem;letter-spacing:.03em}

.bio-intro{font-size:.91rem;color:var(--text2);line-height:1.9;margin-bottom:2rem;max-width:720px}
.bio-intro strong{color:var(--text);font-weight:600}
.bio-cols{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;margin-bottom:1.25rem}
.bio-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:1.5rem;box-shadow:var(--shadow)}
.bio-card-lbl{font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;color:var(--accent);margin-bottom:1rem;font-weight:700;display:flex;align-items:center;gap:.5rem}
.bio-card-lbl::before{content:'';width:12px;height:1.5px;background:var(--accent)}
.bio-row{padding:.55rem 0;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:.15rem}
.bio-row:last-child{border-bottom:none}
.bio-row-label{font-size:.68rem;color:var(--text3);letter-spacing:.04em}
.bio-row-val{font-size:.87rem;color:var(--text);font-weight:500}

.father-card{background:linear-gradient(135deg,var(--accent2-light),var(--bg3));border:1px solid rgba(181,101,29,.2);border-radius:14px;padding:1.75rem;margin-bottom:1.25rem;box-shadow:var(--shadow)}
.father-header{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}
.father-icon{width:44px;height:44px;border-radius:10px;background:var(--accent2);display:flex;align-items:center;justify-content:center;font-size:1.2rem;flex-shrink:0}
.father-title{font-family:var(--fd);font-size:1rem;font-weight:700;color:var(--text);margin-bottom:.1rem}
.father-sub{font-size:.75rem;color:var(--accent2);font-weight:600;letter-spacing:.04em}
.father-quote{font-family:var(--fd);font-style:italic;font-size:.93rem;color:var(--text2);line-height:1.85;padding-left:1.25rem;border-left:3px solid var(--accent2);margin-top:.5rem}

.edu-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:1.5rem;box-shadow:var(--shadow)}
.edu-timeline{display:flex;flex-direction:column;gap:0}
.edu-item{display:flex;gap:1.25rem;position:relative;padding-bottom:1.5rem}
.edu-item:last-child{padding-bottom:0}
.edu-left{display:flex;flex-direction:column;align-items:center;gap:0;width:20px;flex-shrink:0}
.edu-dot{width:12px;height:12px;border-radius:50%;border:2px solid var(--accent);background:var(--bg);flex-shrink:0}
.edu-item.active .edu-dot{background:var(--accent)}
.edu-item.done .edu-dot{background:var(--text3);border-color:var(--text3)}
.edu-line{width:1.5px;flex:1;background:var(--border);margin-top:4px}
.edu-item:last-child .edu-line{display:none}
.edu-right{flex:1;padding-top:0}
.edu-school{font-size:.9rem;font-weight:600;color:var(--text);margin-bottom:.1rem}
.edu-level{font-size:.77rem;color:var(--text3);margin-bottom:.1rem}
.edu-active-badge{display:inline-flex;align-items:center;gap:.3rem;background:var(--green-light);color:var(--green);border:1px solid rgba(26,102,69,.18);border-radius:4px;font-size:.68rem;padding:.15rem .55rem;font-weight:600;letter-spacing:.05em;margin-top:.3rem}

.skills-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1.15rem}
.skill-group{background:var(--card);border:1px solid var(--border);padding:1.5rem;border-radius:12px;transition:border-color .2s;box-shadow:var(--shadow)}
.skill-group:hover{border-color:var(--accent)}
.skill-group-lbl{font-size:.68rem;color:var(--accent);letter-spacing:.18em;text-transform:uppercase;margin-bottom:.9rem;font-weight:700;display:flex;align-items:center;gap:.5rem}
.skill-group-lbl::before{content:'';width:10px;height:1.5px;background:var(--accent)}
.skill-tags{display:flex;flex-wrap:wrap;gap:.4rem}
.skill-tag{background:var(--bg3);border:1px solid var(--border);color:var(--text2);font-size:.75rem;padding:.28rem .75rem;border-radius:6px;transition:all .15s;font-weight:500}
.skill-tag:hover{background:var(--accent-light);color:var(--accent);border-color:var(--accent)}

.proj-list{display:flex;flex-direction:column;gap:1.4rem}
.proj-card{background:var(--card);border:1px solid var(--border);padding:2rem;border-radius:14px;position:relative;overflow:hidden;transition:border-color .2s,transform .2s;box-shadow:var(--shadow)}
.proj-card::before{content:'';position:absolute;top:0;left:0;width:4px;height:100%;background:var(--accent);opacity:0;transition:opacity .2s}
.proj-card:hover{border-color:rgba(26,82,118,.3);transform:translateX(4px)}
.proj-card:hover::before{opacity:1}
.proj-num{font-size:.67rem;color:var(--accent2);letter-spacing:.2em;margin-bottom:.6rem;font-weight:700}
.proj-title{font-family:var(--fd);font-size:1.15rem;font-weight:700;color:var(--text);margin-bottom:.5rem}
.proj-desc{font-size:.87rem;color:var(--text2);line-height:1.85;margin-bottom:1.2rem}
.proj-tech{display:flex;flex-wrap:wrap;gap:.4rem}
.proj-tech span{font-size:.72rem;color:var(--accent);background:var(--accent-light);border:1px solid rgba(26,82,118,.2);padding:.2rem .65rem;border-radius:5px;font-weight:500}

.contact-box{background:var(--card);border:1px solid var(--border);padding:3.5rem;border-radius:18px;text-align:center;box-shadow:var(--shadow)}
.contact-title{font-family:var(--fd);font-size:2rem;font-weight:700;color:var(--text);margin-bottom:.5rem}
.contact-sub{font-size:.88rem;color:var(--text2);margin-bottom:2.25rem}
.contact-links{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.contact-link{display:flex;align-items:center;gap:.6rem;background:var(--bg3);border:1px solid var(--border);color:var(--text2);font-size:.82rem;padding:.78rem 1.35rem;text-decoration:none;border-radius:9px;transition:all .2s;font-weight:500}
.contact-link:hover{color:var(--accent);border-color:var(--accent);background:var(--accent-light)}

footer{text-align:center;padding:2rem;font-size:.73rem;color:var(--text3);border-top:1px solid var(--border)}
footer span{color:var(--accent);font-weight:600}

.fade-in{opacity:0;transform:translateY(18px);transition:opacity .65s ease,transform .65s ease}
.fade-in.visible{opacity:1;transform:translateY(0)}

@media(max-width:680px){
  nav{padding:.9rem 1.25rem}
  .nav-links{display:none}
  .hero-inner{grid-template-columns:1fr}
  .hero-card{display:none}
  section{padding:4rem 1.25rem}
  .about-grid,.bio-cols{grid-template-columns:1fr}
  .contact-box{padding:2rem 1.25rem}
}