/* CSS Reset & Variables */
:root{
  --bg:#0a0e27;
  --bg2:#141b3d;
  --text:#e8eaf6;
  --muted:#9ca3c5;
  --brand:#5b7fff;
  --brand-600:#4a66e8;
  --brand-700:#3952cc;
  --accent:#ff6b9d;
  --surface:#1a2142;
  --border:#2a3358;
  --ok:#4ade80;
  --warn:#fbbf24;
  --err:#f87171;
  --radius:16px;
  --shadow:0 20px 60px rgba(0,0,0,.4);
  --shadow-lg:0 30px 90px rgba(0,0,0,.5);
}

[data-theme="light"]{
  --bg:#ffffff;
  --bg2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --brand:#3b82f6;
  --brand-600:#2563eb;
  --brand-700:#1d4ed8;
  --accent:#ec4899;
  --surface:#ffffff;
  --border:#e2e8f0;
  --shadow:0 20px 60px rgba(0,0,0,.08);
  --shadow-lg:0 30px 90px rgba(0,0,0,.12);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;font-size:100%}
html,body{height:100%;overflow-x:hidden}
img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}
input,button,textarea,select{font:inherit}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;
  font-size:16px;
  line-height:1.7;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

@keyframes fadeInUp{
  from{opacity:0;transform:translateY(30px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}
@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-20px)}
}
@keyframes pulse{
  0%,100%{opacity:1}
  50%{opacity:.6}
}

/* Layout & Container */
.container{max-width:1200px;margin:0 auto;padding:0 24px}
@media(min-width:1400px){.container{max-width:1280px}}

/* Header */
.site-header{
  position:sticky;
  top:0;
  background:rgba(10,14,39,.85);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--border);
  z-index:100;
  transition:all 0.3s ease;
}
[data-theme="light"] .site-header{background:rgba(255,255,255,.85)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:72px}
.brand{
  display:inline-flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:var(--text);
  transition:transform 0.2s ease;
}
.brand:hover{transform:scale(1.05)}
.brand-mark{
  display:inline-grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--brand),var(--brand-700));
  color:white;
  font-weight:800;
  font-size:1.3rem;
  box-shadow:0 4px 16px rgba(91,127,255,.3);
}
.brand-text{font-weight:700;font-size:1.15rem;letter-spacing:-0.02em}
.site-nav .menu{display:flex;gap:6px;list-style:none;margin:0;padding:0}
.site-nav a{
  color:var(--text);
  text-decoration:none;
  padding:10px 16px;
  border-radius:10px;
  font-weight:500;
  transition:all 0.2s ease;
  position:relative;
}
.site-nav a:hover,.site-nav a:focus{background:var(--surface);transform:translateY(-2px)}
.nav-toggle{display:none;background:transparent;border:1px solid var(--border);cursor:pointer;transition:all 0.2s}
.nav-toggle:hover{background:var(--surface)}
.theme-toggle{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px 12px;
  color:var(--text);
  cursor:pointer;
  transition:all 0.2s ease;
  font-size:1.2rem;
}
.theme-toggle:hover{transform:scale(1.1);box-shadow:0 4px 12px rgba(0,0,0,.2)}

/* Skip Link */
.skip-link{position:absolute;left:-9999px;top:auto}
.skip-link:focus{left:10px;top:10px;z-index:200;background:var(--brand);color:#fff;padding:12px 18px;border-radius:10px;font-weight:600}

/* Sections */
.section{padding:100px 0;position:relative}
.section:not(:last-of-type){border-bottom:1px solid var(--border)}

h2{
  font-size:2.5rem;
  font-weight:800;
  margin-bottom:3rem;
  letter-spacing:-0.03em;
  background:linear-gradient(135deg,var(--text),var(--muted));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:fadeInUp 0.6s ease-out;
}

.section-intro{
  text-align:center;
  font-size:1.15rem;
  color:var(--muted);
  margin-top:-2rem;
  margin-bottom:3rem;
  animation:fadeInUp 0.6s ease-out 0.1s backwards;
}

/* Hero Section */
.hero{
  min-height:90vh;
  display:flex;
  align-items:center;
  padding:120px 0 80px;
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(ellipse 1400px 800px at 20% 10%,rgba(91,127,255,.15),transparent),
    radial-gradient(ellipse 1200px 700px at 80% 90%,rgba(255,107,157,.1),transparent),
    var(--bg);
}
[data-theme="light"] .hero{
  background:
    radial-gradient(ellipse 1400px 800px at 20% 10%,rgba(59,130,246,.08),transparent),
    radial-gradient(ellipse 1200px 700px at 80% 90%,rgba(236,72,153,.06),transparent),
    var(--bg);
}
.hero::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:
    radial-gradient(circle at 20% 50%,var(--brand) 0%,transparent 50%),
    radial-gradient(circle at 80% 80%,var(--accent) 0%,transparent 50%);
  opacity:0.03;
  filter:blur(60px);
  animation:float 20s ease-in-out infinite;
}
.hero-content{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  align-items:center;
  position:relative;
  z-index:1;
}
.hero-text{animation:fadeInUp 0.8s ease-out}
.hero-text h1{
  font-size:3.5rem;
  font-weight:900;
  line-height:1.1;
  margin-bottom:1rem;
  letter-spacing:-0.04em;
  background:linear-gradient(135deg,var(--text) 0%,var(--brand) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.hero-text .lead{
  font-size:1.4rem;
  color:var(--muted);
  margin-bottom:0.5rem;
  font-weight:400;
  line-height:1.6;
}
.hero-text .subtitle{
  font-size:1.15rem;
  color:var(--muted);
  margin-bottom:2rem;
  font-weight:500;
  line-height:1.5;
}
.hero-image{
  position:relative;
  animation:fadeInUp 0.8s ease-out 0.2s backwards;
}
.profile-photo{
  width:100%;
  max-width:420px;
  height:auto;
  border-radius:24px;
  box-shadow:var(--shadow-lg);
  border:4px solid var(--surface);
  transition:transform 0.4s ease;
  display:block;
  margin:0 auto;
}
.profile-photo:hover{transform:scale(1.05) rotate(2deg)}
.hero-cta{display:flex;gap:16px;flex-wrap:wrap;margin-top:2rem}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 28px;
  background:var(--surface);
  border:2px solid var(--border);
  border-radius:12px;
  color:var(--text);
  text-decoration:none;
  font-weight:600;
  font-size:1rem;
  cursor:pointer;
  transition:all 0.3s ease;
  position:relative;
  overflow:hidden;
}
.btn::before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:0;
  height:0;
  border-radius:50%;
  background:rgba(255,255,255,.1);
  transform:translate(-50%,-50%);
  transition:width 0.6s,height 0.6s;
}
.btn:hover::before{width:300px;height:300px}
.btn:hover{transform:translateY(-3px);box-shadow:0 10px 30px rgba(0,0,0,.2)}
.btn-primary{
  background:linear-gradient(135deg,var(--brand),var(--brand-700));
  border-color:transparent;
  color:#fff;
  box-shadow:0 8px 24px rgba(91,127,255,.35);
}
.btn-primary:hover{box-shadow:0 12px 36px rgba(91,127,255,.5)}
.btn-vcard{
  background:linear-gradient(135deg,var(--ok),#2d9368);
  border-color:transparent;
  color:#fff;
  box-shadow:0 8px 24px rgba(74,222,128,.35);
}
.btn-vcard:hover{box-shadow:0 12px 36px rgba(74,222,128,.5)}

/* About Section */
.prose{
  color:var(--text);
  font-size:1.15rem;
  line-height:1.8;
  max-width:800px;
}
.prose p{margin:0 0 1.5rem;animation:fadeInUp 0.6s ease-out}
.prose .subtle-link{
  color:inherit;
  text-decoration:underline;
  text-decoration-color:var(--muted);
  text-underline-offset:3px;
  transition:text-decoration-color 0.2s ease;
}
.prose .subtle-link:hover{
  text-decoration-color:var(--brand);
}

/* Portfolio List in About */
.portfolio-list{
  list-style:none;
  margin:2rem 0 0 0;
  padding:0;
  max-width:800px;
}
.portfolio-list li{
  margin-bottom:1rem;
  padding-left:1.5rem;
  position:relative;
}
.portfolio-list li::before{
  content:'→';
  position:absolute;
  left:0;
  color:var(--brand);
  font-weight:bold;
}
.portfolio-list-link{
  color:var(--text);
  text-decoration:none;
  display:block;
  padding:0.5rem 0;
  transition:all 0.2s ease;
}
.portfolio-list-link:hover{
  color:var(--brand);
  padding-left:0.5rem;
}
.portfolio-list-link strong{
  color:var(--brand);
  font-weight:600;
}

/* Certifications */
.certifications{
  margin-top:4rem;
  padding-top:3rem;
  border-top:1px solid var(--border);
}
.hero-certifications{
  margin-top:5rem;
  padding-top:4rem;
  border-top:1px solid rgba(255,255,255,0.1);
  animation:fadeInUp 0.8s ease-out 0.4s backwards;
}
.cert-title{
  text-align:center;
  font-size:1rem;
  font-weight:600;
  color:var(--muted);
  margin-bottom:2rem;
  text-transform:uppercase;
  letter-spacing:0.1em;
  opacity:0.8;
}
.cert-grid{
  display:flex;
  gap:60px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  max-width:800px;
  margin:0 auto;
}
.cert-item{
  width:160px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border-radius:8px;
  opacity:0.85;
  transition:all 0.3s ease;
  filter:grayscale(0.3);
}
.cert-item:hover{
  opacity:1;
  transform:scale(1.1);
  filter:grayscale(0);
}
.cert-item img{
  max-height:100%;
  max-width:100%;
  width:auto;
  height:auto;
  display:block;
  object-fit:contain;
  object-position:center;
}

/* Education Cards */
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:24px;
  list-style:none;
  margin:0;
  padding:0;
}
.cards li{
  background:var(--surface);
  border:2px solid var(--border);
  border-radius:var(--radius);
  padding:32px;
  box-shadow:var(--shadow);
  transition:all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  position:relative;
  overflow:hidden;
  animation:fadeInUp 0.6s ease-out backwards;
}
.cards li::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  width:4px;
  height:100%;
  background:linear-gradient(180deg,var(--brand),var(--accent));
  transform:scaleY(0);
  transition:transform 0.4s ease;
  transform-origin:bottom;
}
.cards li:hover{
  transform:translateY(-8px);
  border-color:var(--brand);
  box-shadow:0 20px 60px rgba(91,127,255,.25);
}
.cards li:hover::before{transform:scaleY(1);transform-origin:top}
.cards li:nth-child(1){animation-delay:0.1s}
.cards li:nth-child(2){animation-delay:0.2s}
.cards li:nth-child(3){animation-delay:0.3s}
.cards h3{
  margin:0 0 12px;
  font-size:1.4rem;
  font-weight:700;
  color:var(--text);
}
.cards .meta{
  color:var(--muted);
  font-size:0.95rem;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:8px;
}
.cards p{margin-top:16px;color:var(--muted);line-height:1.6}

/* Experience Timeline */
.timeline{
  list-style:none;
  margin:0;
  padding:0;
  border-left:3px solid var(--border);
  position:relative;
}
.timeline::before{
  content:'';
  position:absolute;
  left:-3px;
  top:0;
  width:3px;
  height:100%;
  background:linear-gradient(180deg,var(--brand),transparent);
  opacity:0.3;
}
.timeline li{
  position:relative;
  margin:0 0 48px 0;
  padding:0 0 0 40px;
  animation:fadeInUp 0.6s ease-out backwards;
}
.timeline li:nth-child(1){animation-delay:0.1s}
.timeline li:nth-child(2){animation-delay:0.2s}
.timeline li:nth-child(3){animation-delay:0.3s}
.timeline li::before{
  content:"";
  position:absolute;
  left:-9px;
  top:6px;
  width:15px;
  height:15px;
  border-radius:50%;
  background:var(--brand);
  border:3px solid var(--bg);
  box-shadow:0 0 0 3px var(--brand);
  transition:all 0.3s ease;
}
.timeline li:hover::before{
  transform:scale(1.4);
  box-shadow:0 0 0 6px rgba(91,127,255,.3);
}
.timeline h3{
  margin:0 0 8px;
  font-size:1.3rem;
  font-weight:700;
  color:var(--text);
}
.timeline .meta{
  color:var(--muted);
  font-size:0.95rem;
  font-weight:500;
  margin-bottom:12px;
  display:flex;
  align-items:center;
  gap:8px;
}
.timeline p{color:var(--muted);line-height:1.6;margin-top:8px}

/* Portfolio Section */
.section-portfolio{background:var(--bg2)}
.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:32px;
}
.portfolio-item{
  background:var(--surface);
  border:2px solid var(--border);
  border-radius:var(--radius);
  padding:40px;
  position:relative;
  overflow:hidden;
  transition:all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  animation:fadeInUp 0.6s ease-out backwards;
  text-decoration:none;
  display:block;
}
.portfolio-item:nth-child(1){animation-delay:0.1s}
.portfolio-item:nth-child(2){animation-delay:0.2s}
.portfolio-item:nth-child(3){animation-delay:0.3s}
.portfolio-item::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:6px;
  background:linear-gradient(90deg,var(--portfolio-color),transparent);
  transform:scaleX(0);
  transition:transform 0.4s ease;
  transform-origin:left;
}
.portfolio-item:hover{
  transform:translateY(-12px) scale(1.02);
  border-color:var(--portfolio-color);
  box-shadow:0 30px 80px rgba(0,0,0,.3);
}
.portfolio-item:hover::before{transform:scaleX(1)}
.portfolio-icon{
  width:80px;
  height:80px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--portfolio-color),var(--brand));
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2.2rem;
  color:white;
  margin-bottom:24px;
  box-shadow:0 8px 24px rgba(0,0,0,.2);
  transition:all 0.3s ease;
}
.portfolio-item:hover .portfolio-icon{
  transform:scale(1.1) rotate(5deg);
  box-shadow:0 12px 36px rgba(0,0,0,.3);
}
.portfolio-logo{
  width:60px;
  height:60px;
  object-fit:contain;
  object-position:center;
}
.portfolio-item h3{
  font-size:1.6rem;
  font-weight:700;
  margin-bottom:12px;
  color:var(--text);
}
.portfolio-item .portfolio-desc{
  font-size:1.05rem;
  color:var(--text);
  font-weight:600;
  margin-bottom:12px;
}
.portfolio-item .portfolio-tagline{
  font-size:0.95rem;
  color:var(--muted);
  line-height:1.6;
  margin-bottom:20px;
}
.portfolio-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--portfolio-color);
  font-weight:600;
  font-size:0.95rem;
  transition:gap 0.3s ease;
}
.portfolio-item:hover .portfolio-link{gap:12px}

/* Contact Section */
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
  animation:fadeInUp 0.6s ease-out;
}
.contact-card{
  background:var(--surface);
  border:2px solid var(--border);
  border-radius:var(--radius);
  padding:40px;
  box-shadow:var(--shadow);
  transition:all 0.3s ease;
}
.contact-card:hover{
  border-color:var(--brand);
  transform:translateY(-4px);
  box-shadow:0 20px 60px rgba(91,127,255,.2);
}
.contact-list{margin:0}
.contact-list>div{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid var(--border)}
.contact-list>div:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.contact-list dt{
  color:var(--muted);
  font-size:0.85rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.05em;
  margin-bottom:8px;
}
.contact-list dd{margin:0;font-size:1.05rem;font-weight:500}
.contact-list a{
  color:var(--text);
  text-decoration:none;
  transition:color 0.2s ease;
}
.contact-list a:hover{color:var(--brand)}
.contact-actions{
  margin-top:24px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.map-embed{
  border:2px solid var(--border);
  border-radius:var(--radius);
  min-height:400px;
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-style:italic;
}

/* Footer */
.site-footer{
  padding:48px 0 32px;
  color:var(--muted);
  background:var(--surface);
  border-top:1px solid var(--border);
}
.footer-certifications{
  padding:32px 0;
  margin-bottom:32px;
  border-bottom:1px solid var(--border);
  min-height:80px;
}
.footer-cert-grid{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:50px;
  flex-wrap:wrap;
  min-height:50px;
}
.footer-cert-item{
  width:160px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.footer-cert-grid img{
  max-height:100%;
  max-width:100%;
  width:auto;
  height:auto;
  opacity:0.7;
  transition:all 0.3s ease;
  filter:grayscale(0.5);
  object-fit:contain;
  object-position:center;
}
.footer-cert-grid img:hover{
  opacity:1;
  filter:grayscale(0);
  transform:scale(1.05);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:20px;
}
.social{display:flex;gap:16px;list-style:none;margin:0;padding:0}
.social a{
  color:var(--muted);
  text-decoration:none;
  transition:all 0.2s ease;
  padding:8px 12px;
  border-radius:8px;
}
.social a:hover{color:var(--brand);background:var(--bg2)}

/* Responsive Design */
@media (max-width: 960px){
  .hero-content{grid-template-columns:1fr;gap:40px}
  .hero-text h1{font-size:2.8rem}
  .hero-text .lead{font-size:1.2rem}
  .hero-image{order:-1;max-width:360px;margin:0 auto}
  .hero-certifications{margin-top:3rem;padding-top:3rem}
  .cert-grid{gap:40px}
  .cert-item img{height:40px}
  h2{font-size:2rem}
  .contact-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
}

@media (max-width: 768px){
  .site-nav .menu{display:none}
  .nav-toggle{
    display:inline-flex;
    flex-direction:column;
    gap:5px;
    background:transparent;
    border:1px solid var(--border);
    border-radius:8px;
    padding:10px;
    cursor:pointer;
  }
  .nav-toggle .bar{width:22px;height:2px;background:var(--text);transition:all 0.3s}
  .hero{min-height:auto;padding:80px 0 60px}
  .hero-text h1{font-size:2.2rem}
  .hero-text .lead{font-size:1.1rem}
  .section{padding:60px 0}
  .timeline li{padding-left:32px}
}


