:root{
  --bg:#0d0d0d;
  --muted:#a9a9a9;
  --accent:#fff;
}
*{box-sizing:border-box}
html,body{height:100%; overflow-x:hidden}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background:var(--bg);
  color:var(--accent);
  min-width:320px;
}

.intro{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#080808;
  z-index:50;
}
.intro-inner{display:flex;align-items:center;gap:32px}
.intro-title{
  font-family: 'Playfair Display', serif;
  font-size:80px;
  letter-spacing:2px;
  margin:0;
  opacity:1;
  transform:scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: titlePop 0.8s cubic-bezier(.2,.9,.3,1) 0.1s both;
}
.sparks-left, .sparks-right{
  display:flex;
  align-items:center;
  gap:12px;
}
.spark{
  color:var(--accent);
  opacity:0;
  transform:translateY(40px);
  animation: sparkInUp 0.9s cubic-bezier(.2,.9,.3,1) both;
  display:inline-block;
}
.spark.big{
  font-size:56px;
}
.spark.small{
  font-size:40px;
}
.sparks-left .spark.big{animation-delay:0.05s}
.sparks-left .spark.small{animation-delay:0.15s}
.sparks-right .spark.small{animation-delay:0.2s}
.sparks-right .spark.big{animation-delay:0.3s}

@keyframes titlePop{
  0%{opacity:0; transform:translateY(50px) scale(0.85)}
  60%{opacity:1; transform:translateY(0) scale(1.06)}
  100%{opacity:1; transform:translateY(0) scale(1)}
}
@keyframes sparkInUp{
  0%{opacity:0; transform:translateY(40px) rotate(-20deg) scale(0.6)}
  60%{opacity:1; transform:translateY(0) rotate(0deg) scale(1.08)}
  100%{opacity:1; transform:translateY(0) rotate(5deg) scale(1)}
}
@keyframes overlayFade{
  0%{opacity:1}
  100%{opacity:0; visibility:hidden}
}

.hidden{display:none}
.main{
  min-height:100vh;
  padding-bottom:80px;
  scroll-behavior:smooth;
}

/* Navigation */
.nav{
  position:fixed;
  top:30px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:32px;
  padding:12px 32px;
  background:rgba(13,13,13,0.8);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:50px;
  z-index:30;
  opacity:0;
  animation: navFadeIn 0.6s ease 0.3s forwards;
}
.nav-link{
  color:var(--muted);
  text-decoration:none;
  font-size:15px;
  transition:color 0.3s ease;
  position:relative;
}
.nav-link:hover,.nav-link.active{color:var(--accent)}
.nav-link.active::after{
  content:'';
  position:absolute;
  bottom:-4px;
  left:0;
  right:0;
  height:1px;
  background:var(--accent);
}

/* Sections */
.section{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:100px 24px 80px;
}
.section-content{max-width:900px;width:100%}
.section-title{
  font-family:'Playfair Display', serif;
  font-size:48px;
  margin:0 0 48px;
}

/* Hero Section */
.hero-section{
  min-height:calc(100vh - 80px);
  justify-content:flex-start;
  padding-left:80px;
  position:relative;
}
.resume-btn{
  position:absolute;
  top:90px;
  right:25px;
  padding:12px 24px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:12px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:var(--accent);
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:8px;
  transition:all 0.3s ease;
  opacity:0;
  animation:fadeInDown 0.8s ease 0.8s forwards;
  z-index:10;
}
.resume-btn:hover{
  background:rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.25);
  transform:translateY(-2px);
}
.resume-btn svg{
  width:16px;
  height:16px;
}
@keyframes fadeInDown{
  from{opacity:0; transform:translateY(-10px)}
  to{opacity:1; transform:translateY(0)}
}
.hero-content{max-width:1000px}
.hero-title{
  font-family:'Inter', sans-serif;
  font-size:64px;
  font-weight:300;
  line-height:1.2;
  margin:0;
  letter-spacing:-1px;
  text-align:left;
  opacity:0;
  transform:translateY(40px);
}
.hero-title.hero-animate{
  animation:heroEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes heroEntrance{
  0%{opacity:0; transform:translateY(40px)}
  100%{opacity:1; transform:translateY(0)}
}
.hero-subtitle{
  display:inline-block;
  font-weight:400;
}

/* About Section */
.about-container{
  max-width:900px;
  display:flex;
  flex-direction:column;
  gap:48px;
}
.about-intro{
  font-size:20px;
  line-height:1.8;
  color:var(--muted);
  font-weight:300;
}
.about-intro p{
  margin:0 0 24px;
}
.about-intro p:last-child{
  margin-bottom:0;
}
.highlight{
  color:var(--accent);
  font-weight:400;
  position:relative;
}
.highlight::after{
  content:'';
  position:absolute;
  bottom:-2px;
  left:0;
  right:0;
  height:1px;
  background:var(--accent);
  opacity:0.3;
}
.skills-divider{
  display:flex;
  align-items:center;
  gap:20px;
  margin:24px 0;
}
.skills-divider::before,
.skills-divider::after{
  content:'';
  flex:1;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.divider-text{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:2px;
  color:var(--muted);
  white-space:nowrap;
}

/* Logo Loop Animation */
.logo-loop-container{
  width:100%;
  overflow:hidden;
  position:relative;
  padding:20px 0;
  max-width:100vw;
}
.logo-loop{
  position:relative;
  width:100%;
  overflow:hidden;
  mask-image:linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image:linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-track{
  display:flex;
  width:max-content;
  animation:logoScroll 15s linear infinite;
  will-change:transform;
}
.logo-track:hover{
  animation-play-state:paused;
}
.logo-list{
  display:flex;
  gap:48px;
  align-items:center;
  padding-right:48px;
}
.logo-item{
  flex:0 0 auto;
  padding:12px 28px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:8px;
  font-size:16px;
  font-weight:500;
  color:var(--accent);
  white-space:nowrap;
  transition:all 0.3s ease;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
  display:inline-block;
}
.logo-item:hover{
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.25);
  transform:translateY(-2px);
}
@keyframes logoScroll{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}
@keyframes fadeInUp{
  to{opacity:1; transform:translateY(0)}
}
@media (max-width:768px){
  .about-intro{font-size:18px; line-height:1.7}
  .about-intro p{margin-bottom:20px}
  .logo-list{gap:32px; padding-right:32px}
  .logo-item{padding:10px 22px; font-size:14px}
}

/* Projects Section - ChromaGrid Style */
.projects-grid{
  position:relative;
  display:grid;
  gap:24px;
  grid-template-columns:repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  max-width:1200px;
  margin:0 auto;
  width:100%;
  --x:50%;
  --y:50%;
  --r:300px;
  background:#111;
}
.project-card{
  position:relative;
  padding:32px;
  border:1px solid #333;
  border-radius:20px;
  transition:border-color 0.3s ease;
  cursor:pointer;
  background:var(--card-gradient);
  overflow:hidden;
  --mouse-x:50%;
  --mouse-y:50%;
  text-decoration:none;
  color:inherit;
  display:block;
}
.project-card:hover{
  border-color:var(--card-border);
}
.project-card::before{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.3), transparent 70%);
  pointer-events:none;
  opacity:0;
  transition:opacity 0.5s ease;
  z-index:1;
}
.project-card:hover::before{
  opacity:1;
}
.project-info{
  position:relative;
  z-index:2;
}
.project-name{
  font-size:24px;
  margin:0 0 12px;
  font-family:'Playfair Display', serif;
  color:#fff;
}
.project-desc{
  color:#aaa;
  line-height:1.6;
  margin:0 0 20px;
}
.project-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.tag{
  padding:4px 12px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:20px;
  font-size:13px;
  color:var(--muted);
}
.chroma-overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:10;
  backdrop-filter:grayscale(1) brightness(0.78);
  -webkit-backdrop-filter:grayscale(1) brightness(0.78);
  background:rgba(0,0,0,0.001);
  mask-image:radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0%, transparent 15%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.22) 45%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.68) 88%, white 100%);
  -webkit-mask-image:radial-gradient(circle var(--r) at var(--x) var(--y), transparent 0%, transparent 15%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.22) 45%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.68) 88%, white 100%);
}
.chroma-fade{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:11;
  backdrop-filter:grayscale(1) brightness(0.78);
  -webkit-backdrop-filter:grayscale(1) brightness(0.78);
  background:rgba(0,0,0,0.001);
  mask-image:radial-gradient(circle var(--r) at var(--x) var(--y), white 0%, white 15%, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.78) 45%, rgba(255,255,255,0.65) 60%, rgba(255,255,255,0.5) 75%, rgba(255,255,255,0.32) 88%, transparent 100%);
  -webkit-mask-image:radial-gradient(circle var(--r) at var(--x) var(--y), white 0%, white 15%, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.78) 45%, rgba(255,255,255,0.65) 60%, rgba(255,255,255,0.5) 75%, rgba(255,255,255,0.32) 88%, transparent 100%);
  opacity:1;
  transition:opacity 0.25s ease;
}

/* Contact Section - LET'S CONNECT Design */
.contact-section{
  min-height:auto;
  padding:60px 24px 40px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.contact-container{
  width:100%;
  max-width:1400px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:120px;
}
.connect-title{
  font-family:'Inter', sans-serif;
  font-size:120px;
  font-weight:900;
  line-height:1;
  margin:0;
  letter-spacing:-2px;
  text-transform:uppercase;
  color:var(--accent);
}
.connect-links{
  display:flex;
  gap:80px;
  align-items:flex-start;
  flex-wrap:wrap;
  padding-top:40px;
  margin-right:100px;
}
.connect-link{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  text-decoration:none;
  color:var(--accent);
  transition:all 0.3s ease;
}
.connect-link:hover{
  transform:translateY(-4px);
  opacity:0.8;
}
.link-icon{
  width:48px;
  height:48px;
  transition:transform 0.3s ease;
}
.connect-link:hover .link-icon{
  transform:scale(1.1);
}
.connect-link span{
  font-size:16px;
  font-weight:500;
}

/* Responsive for contact section */
@media (max-width:1024px){
  .connect-title{font-size:90px}
  .contact-container{flex-direction:column;gap:60px;align-items:center;text-align:center}
  .connect-links{gap:60px}
}
@media (max-width:768px){
  .connect-title{font-size:64px}
  .connect-links{gap:48px;justify-content:center}
  .link-icon{width:48px;height:48px}
}

/* Animations */
@keyframes navFadeIn{
  from{opacity:0; transform:translate(-50%, -10px)}
  to{opacity:1; transform:translate(-50%, 0)}
}
@keyframes sectionFadeIn{
  to{opacity:1; transform:translateY(0)}
}
@keyframes titleSlideIn{
  from{opacity:0; transform:translateX(-20px)}
  to{opacity:1; transform:translateX(0)}
}

/* Responsive */
@media (max-width:1200px){
  .hero-section{padding-left:60px}
  .resume-btn{right:60px}
  .contact-container{gap:80px}
  .connect-links{margin-right:60px}
}

@media (max-width:1024px){
  .connect-title{font-size:90px}
  .contact-container{flex-direction:column;gap:60px;align-items:center;text-align:center}
  .connect-links{gap:60px; margin-right:0; justify-content:center}
  .hero-title{font-size:56px}
  .hero-section{padding-left:40px}
  .resume-btn{right:40px; top:90px}
  .about-intro{font-size:18px; line-height:1.7}
}

@media (max-width:768px){
  .hero-title{font-size:42px}
  .section-title{font-size:36px}
  .nav{gap:20px; padding:10px 20px; font-size:14px}
  .section{padding:80px 20px 60px}
  .resume-btn{top:80px; right:20px; padding:10px 20px; font-size:13px}
  .hero-section{padding-left:20px}
  .connect-title{font-size:64px}
  .connect-links{gap:48px;justify-content:center; padding-top:30px}
  .link-icon{width:44px;height:44px}
  .about-intro p{margin-bottom:20px}
  .logo-list{gap:32px; padding-right:32px}
  .logo-item{padding:10px 22px; font-size:14px}
  .projects-grid{gap:20px; grid-template-columns:1fr}
  .project-card{padding:24px}
}

@media (max-width:520px){
  .intro-title{font-size:48px}
  .spark.big{font-size:40px}
  .spark.small{font-size:28px}
  .intro-inner{gap:20px}
  .hero-title{font-size:32px; line-height:1.3}
  .hero-section{padding-left:16px; padding-right:16px}
  .resume-btn{top:70px; right:16px; padding:8px 16px; font-size:12px; gap:6px}
  .resume-btn svg{width:14px; height:14px}
  .section-title{font-size:28px}
  .nav{gap:12px; padding:8px 16px; font-size:13px}
  .about-intro{font-size:16px}
  .connect-title{font-size:48px; line-height:0.95}
  .connect-links{gap:32px; padding-top:20px}
  .link-icon{width:40px; height:40px}
  .connect-link span{font-size:14px}
  .logo-list{gap:24px; padding-right:24px}
  .logo-item{padding:8px 18px; font-size:13px}
  .footer .left, .footer .right{font-size:11px}
  .footer .center{font-size:10px}
  .scroll-to-top{padding:5px 8px; font-size:11px}
}

/* Scroll Reveal Animations */
.scroll-reveal{
  opacity:0;
}
.scroll-reveal.fade-up{
  transform:translateY(50px);
}
.scroll-reveal.fade-left{
  transform:translateX(-80px);
}
.scroll-reveal.fade-right{
  transform:translateX(80px);
}
.scroll-reveal.fade-scale{
  transform:scale(0.92) translateY(30px);
}
.scroll-reveal.is-visible.fade-up{
  animation:scrollRevealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.scroll-reveal.is-visible.fade-left{
  animation:scrollRevealLeft 1.0s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.scroll-reveal.is-visible.fade-right{
  animation:scrollRevealRight 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.scroll-reveal.is-visible.fade-scale{
  animation:scrollRevealScale 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes scrollRevealUp{
  from{opacity:0; transform:translateY(50px)}
  to{opacity:1; transform:translateY(0)}
}
@keyframes scrollRevealLeft{
  from{opacity:0; transform:translateX(-80px)}
  to{opacity:1; transform:translateX(0)}
}
@keyframes scrollRevealRight{
  from{opacity:0; transform:translateX(80px)}
  to{opacity:1; transform:translateX(0)}
}
@keyframes scrollRevealScale{
  from{opacity:0; transform:scale(0.92) translateY(30px)}
  to{opacity:1; transform:scale(1) translateY(0)}
}
@media (prefers-reduced-motion:reduce){
  .scroll-reveal{opacity:1 !important; transform:none !important}
  .scroll-reveal.is-visible{animation:none !important}
}

.footer{
  position:fixed;left:0;right:0;bottom:0;background:rgba(8,8,8,0.75);border-top:1px solid rgba(255,255,255,0.03);
  color:var(--muted);z-index:9999;padding:18px 24px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1100px;margin:0 auto; flex-wrap:wrap}
.footer .left,.footer .center,.footer .right{font-size:13px}
.footer .center{font-size:12px}
.footer .left{
  overflow:hidden;
  height:20px;
  position:relative;
}
.rotating-text-wrapper{
  display:flex;
  flex-direction:column;
  animation:rotateUpText 4s ease-in-out infinite;
}
.rotating-text-item{
  display:flex;
  align-items:center;
  height:20px;
  white-space:nowrap;
}
@keyframes rotateUpText{
  0%, 40%{transform:translateY(0)}
  50%, 90%{transform:translateY(-20px)}
  100%{transform:translateY(-40px)}
}
.footer-line{
  height:2px; background:linear-gradient(90deg,#111 20%, #2b2b2b 40%, #111 60%);
  transform-origin:left center; transform:scaleX(0);
  transition:transform 700ms cubic-bezier(.2,.9,.3,1);
  margin-bottom:12px; border-radius:2px; overflow:hidden
}
.scroll-to-top{
  background:transparent;
  border:1px solid rgba(255,255,255,0.1);
  color:var(--muted);
  padding:6px 10px;
  border-radius:6px;
  cursor:pointer;
  transition:all 0.3s ease;
  font-size:13px;
  z-index:10000;
  position:relative;
  pointer-events:auto;
  user-select:none;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.scroll-to-top:hover{
  background:rgba(255,255,255,0.05);
  border-color:rgba(255,255,255,0.3);
  transform:translateY(-2px);
}
.scroll-to-top:active{
  transform:translateY(0);
}

/* animated moving sheen on footer */
.footer::before{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  background-size:200% 100%; animation: sheen 3s linear infinite;
}
@keyframes sheen{from{background-position:0% 0%}to{background-position:200% 0%}}

/* small responsive tweaks */
@media (max-width:520px){
  .intro-title{font-size:34px}
  .spark{font-size:22px}
  .center h2{font-size:28px}
}
