/* -------------------------
   VARIABLES & RESET
------------------------- */
:root {
  --primary: #2196f3;
  --primary-2: #00bcd4;
  --bg: #f9f9f9;
  --muted: #6b7280;
  --container: 1100px;
}

* { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: #222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
}

/* -------------------------
   LAYOUT HELPERS
------------------------- */
.container {
  width: 92%;
  max-width: var(--container);
  margin: 0 auto;
}

/* -------------------------
   NAVBAR
------------------------- */
.site-header { background: transparent; }
.navbar {
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 50px;
  background-color: rgb(206, 227, 236);
  z-index: 1000;
  box-sizing: border-box;
}

.brand h3 {
  margin: 0; color: var(--primary); font-weight:700;
  font-size: 1.2rem;
  font-weight: bold;
  background: linear-gradient(135deg, #00bcd4, #2196f3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.25), 0 0 12px rgba(33,150,243,0.4);
}
.brand a {text-decoration: none;}
.nav-links { display:flex; gap:18px; align-items:center; transition: right 0.36s cubic-bezier(0.5,0,0,1); }
.nav-links a { color:var(--primary); font-weight:600; padding:6px 8px; text-decoration: none; }
.nav-links a:hover { color:var(--primary-2); text-decoration:none; }

/* social icons */
.social-links { list-style:none; display:flex; gap:10px; margin-left:10px; }
.social-links img { width:20px; height:20px; }

/* mobile toggle */
.nav-toggle { display:none; background:none; border:0; cursor:pointer; }
.nav-toggle span { display:block; width:22px; height:3px; background:var(--primary); margin:4px 0; border-radius:3px; }

/* -------------------------
   HERO
------------------------- */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 80px 0 40px;
  background: linear-gradient(135deg,var(--primary-2),var(--primary));
  color: #fff;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.profile-pic {
  width: 200px; height:200px; object-fit:cover; border-radius:12px;
  border:5px solid rgba(255,255,255,0.12); box-shadow:0 6px 20px rgba(0,0,0,0.12);
}

.hero-right h1 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-bottom:10px; margin-top: 30px; }
.hero-right .muted { font-weight:600; color: rgba(255,255,255,0.95); }

.lead { color: rgba(255,255,255,0.95); margin-bottom:14px; max-width:680px; }

/* hero actions */
.hero-actions { display:flex; gap:15px; margin: 30px 0px; flex-wrap:wrap; }
.btn {
  padding: 9px 16px; border-radius:8px; display:inline-block; font-weight:600; cursor:pointer; text-decoration:none;
}
.btn.primary { background: #fff; color: var(--primary); }
.btn.ghost { background: transparent; color:#fff; border:1px solid rgba(255,255,255,0.18); }
.btn.small { padding:8px 12px; font-size:0.9rem; }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-left, .hero-right {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.hero-left { animation-delay: 0.3s; }
.hero-right { animation-delay: 0.6s; }

/* TOOLS */
.tools { margin-top:6px; }
.tools h4 { color:#fff; margin-bottom:8px; font-size:0.95rem; }
.tool-icons { display:flex; flex-wrap:wrap; gap:12px; }
.tool { display:flex; flex-direction:column; align-items:center; gap:6px; width:72px; text-align:center; }
.tool img { width:46px; height:46px; border-radius:8px; background:rgba(255,255,255,0.08); padding:6px; transition: transform 0.28s ease, filter 0.28s ease;
} 
.tool img:hover {
  transform: rotate(10deg) scale(1.15);
  filter: brightness(1.1);
}


/* -------------------------
   SECTIONS (shared)
------------------------- */
section { padding: 48px 0;
opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease; }
h2 { color: var(--primary); font-size:1.6rem; margin-bottom:10px; text-align:center; }
.intro { text-align:center; color: #444; margin-bottom:18px; }

section.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ABOUT */
.about .btn.secondary { background:#fff; color:var(--primary); border:1px solid #e6f4ff; }

/* -------------------------
   PORTFOLIO CARDS
------------------------- */
/* Background for portfolio section */
.portfolio-preview {
  background-color: rgb(206, 227, 236);
  border-top: 5px solid #00bcd4;
  border-left: 3px solid #00bcd4;
  overflow: hidden; /* needed for carousel */
  padding: 60px 0;
}

/* Carousel wrapper */
.cards-carousel {
  overflow: hidden;
  width: 100%;
}

/* Track holding all cards */
.cards-track {
  display: flex;
  gap: 18px;
  animation: scrollCards 25s linear infinite;
}

/* Individual card style + floating animation */
.portfolio-preview .card {
  flex: 0 0 250px;
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20,30,60,0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  animation: float 4s ease-in-out infinite;
}

.portfolio-preview .card:nth-child(1) { animation-delay: 0s; }
.portfolio-preview .card:nth-child(2) { animation-delay: 0.4s; }
.portfolio-preview .card:nth-child(3) { animation-delay: 0.8s; }
.portfolio-preview .card:nth-child(4) { animation-delay: 1.2s; }
.portfolio-preview .card:nth-child(5) { animation-delay: 1.6s; }
.portfolio-preview .card:nth-child(6) { animation-delay: 2s; }

.portfolio-preview .card h3 { color: var(--primary); margin-bottom:8px; }
.portfolio-preview .card p { color:#555; margin-bottom:12px; }

/* Hover glow effect */
.portfolio-preview .card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2), 0 0 12px rgba(33,150,243,0.4);
}

/* Buttons transition */
.portfolio-preview .btn {
  transition: all 0.3s ease;
}

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Carousel horizontal scroll animation */
@keyframes scrollCards {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Move by half since cards are duplicated */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cards-track { animation: none; flex-wrap: wrap; justify-content: center; }
  .portfolio-preview .card { flex: 0 0 90%; margin-bottom: 20px; }
}

/*BLOG */
.blog h2 {
  margin-top: 20px;
}

/* btn animation */
.btn {
  transition: all 0.3s ease;
}
.btn.primary:hover {
  background: #fff;
  color: var(--primary-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn.ghost:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}


/* -------------------------
   PROJECT (portfolio page)
------------------------- */
.portfolio-page {margin-top: 50px; padding: 36px 0 80px; }
.project { background:#fff; padding:18px; margin:18px 0; border-radius:10px; box-shadow:0 6px 18px rgba(20,30,60,0.04); }
.project h2 { margin-bottom:8px; }
.intro {
  margin: 0 auto;
}

/* ACCORDION */
.accordion-container { margin-top:12px; }
.category { margin-bottom:10px; }
.accordion-btn {
  width:100%; display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px; background: var(--primary); color:#fff; border:0; border-radius:8px; cursor:pointer; font-weight:700;
}
.accordion-btn:hover { background: var(--primary-2); }
.accordion-icon { font-size:18px; margin-left:10px; }

.accordion-content {
  max-height:0; overflow:hidden; transition: max-height 0.36s ease, padding 0.32s ease;
  background:#fafafa; border-left:4px solid var(--primary); padding:0 14px; border-radius:0 0 8px 8px;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.4s ease;
  opacity: 0;
}
.accordion-content.open { padding:10px 14px 18px 14px;}

.accordion-icon {
  display:inline-block;
  transition: transform 0.3s ease;
}
.accordion-btn.active .accordion-icon {
  transform: rotate(180deg);
}
.accordion-content.open {
  opacity: 1;
}

/* About Page */
.about p {
  max-height: none;
  overflow: visible;
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.about {
  padding: 60px 20px;
  background: var(--bg);
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  max-width: var(--container);
  margin: auto;
}

/* Profile Image */
.about-img {
  flex: 1;
  text-align: center;
}

.about-img img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--primary);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 35px rgba(0,0,0,0.25);
}

/* About Content */
/* About Page Container */
.about-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap; /* Makes it wrap on smaller screens */
}

/* About Image */
.about-img {
  flex: 1 1 250px;
  max-width: 300px;
}

.about-img img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.about-img img:hover {
  transform: scale(1.05);
}

/* About Content */
.about-content {
  flex: 2 1 400px;
}

.about-content h2 {
  color: var(--primary);
  margin-bottom: 16px;
  font-size: 2rem;
}

.about-content h3 {
  color: var(--primary-2);
  margin-top: 20px;
  margin-bottom: 12px;
}

.about-content p, 
.about-content ul {
  color: #444;
  margin-bottom: 14px;
  line-height: 1.6;
}

.about-content ul li {
  margin-bottom: 8px;
}

/* Button */
.about-content .btn {
  margin-top: 20px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.about-content .btn:hover {
  background: var(--primary-2);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .about-container {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-content h2 {
    font-size: 1.8rem;
  }

  .about-content h3 {
    font-size: 1.1rem;
  }

  .about-img {
    max-width: 80%;
  }

  .about-content {
    flex: 1 1 100%;
  }
}


/* iframe responsiveness */
.accordion-content iframe { width:100%; height:320px; border-radius:8px; }

/* -------------------------
   BLOG POSTS
------------------------- */

.blog {
  padding: 60px 20px;
  background: var(--bg);
}

.blog h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-intro {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  max-width: 720px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.post-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.post-header {
  padding: 20px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}

.header-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.post-body {
  padding: 20px;
}

.post-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.read-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 25px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
}

.read-btn:hover {
  background: var(--primary-2);
  transform: translateY(-2px);
}
/* Blog Section Animations */
.post-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional: stagger animation delay */
.post-card:nth-child(1) { transition-delay: 0.1s; }
.post-card:nth-child(2) { transition-delay: 0.2s; }
.post-card:nth-child(3) { transition-delay: 0.3s; }
.post-card:nth-child(4) { transition-delay: 0.4s; }
.post-card:nth-child(5) { transition-delay: 0.5s; }


@media(max-width:768px){
  .blog-posts {
    grid-template-columns: 1fr;
  }
}

.herop {
  text-align: center;
  padding: 100px 20px 30px 20px;
  background: linear-gradient(135deg, #00bcd4, #2196f3);
  color: white;
}
.herop h1 { font-size: 2rem;
    margin-bottom: 10px;
    line-height: 2.5rem;
 }
.herop p { font-size: 1rem;
    margin-top: 10px;
    line-height: 25px;
    opacity: 0;
    transform: translateX(-100%);
    animation: slideIn 2s ease-out forwards;margin-bottom: 20px; 
}
@keyframes slideIn {
      to {
        transform: translateX(0);
        opacity: 1;
      }
}

.blog-page h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.blog-intro {
  text-align: center;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.blog-post {
  background: #fff;
  padding: 24px;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.blog-post h2 {
  color: var(--primary);
  margin-bottom: 16px;
}

.blog-post h3 {
  color: var(--primary-2);
  margin-top: 16px;
  margin-bottom: 10px;
}

.blog-post p, .blog-post ul, .blog-post ol {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.6;
}

.blog-post ul {
  padding-left: 20px;
}

pre {
  background: #f5f5f5;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

code {
  font-family: 'Fira Code', monospace;
  color: #333;
}

/* Optional: syntax highlighting colors */
.language-java {
  color: #007396;
}

/* Responsive */
@media(max-width:768px){
  .blog-post { padding: 20px; }
}


/* Responsive Adjustments */
@media(max-width:768px){
  .blog-posts {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   FOOTER
------------------------- */
.site-footer { background:var(--primary); color:#fff; padding:28px 0; margin-top:28px; text-align:center; }
.site-footer a { color:#ffe082; }
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 50px 0 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto 20px auto;
}

.footer-about h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #fff;
}

.footer-about p {
  color: #e0e0e0;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #fff;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a,
.footer-contact a {
  color: #ffe082;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover,
.footer-contact a:hover {
  color: var(--primary-2);
}

.footer-contact p {
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 16px;
  color: #f1f1f1;
  font-size: 0.85rem;
}


/* -------------------------
   RESPONSIVE
------------------------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 160px 1fr; gap:18px; padding: 40px; border-radius:8px; }
  .profile-pic { width:160px; height:160px; }
}

@media (max-width: 800px) {
  .nav-toggle { display:block; }
  .nav-links { position:fixed; right:-100%; top:70px; background:#fff; flex-direction:column; gap:12px; padding:18px; border-radius:8px; box-shadow:0 12px 40px rgba(0,0,0,0.08); transition:right 0.28s ease; }
  .nav-links.active { right:12px; }

.hero-actions { justify-content: center; }
  .hero { grid-template-columns: 1fr; text-align:center; padding:50px 14px 28px 14px; margin-top: 30px; }
  .hero-left { order:-1; }
  .tool { width:72px; }
}
/* -------------------------
   HERO MOBILE FIXES
------------------------- */
@media (max-width: 768px) {
  .tools .tool-icons {
    justify-content: center; /* center icons */
    gap: 10px; /* reduce spacing */
  }

  .tool {
    width: 60px; /* smaller icons for mobile */
    gap: 4px;
  }

  .tool img {
    width: 36px;
    height: 36px;
  }
}

/* -------------------------
   ABOUT SECTION MOBILE FIXES
------------------------- */
@media (max-width: 768px) {
  .about-content .btn {
    font-size: 1rem; /* make button text readable */
    padding: 12px 20px;
  }

  .about-container {
    gap: 20px;
  }

  .about-img img {
    max-width: 220px; /* reduce image size */
    height: auto;
  }

  .about-content {
    font-size: 1rem; /* make text more readable */
  }
}

/* OPTIONAL: fine-tune hero text scaling */
@media (max-width: 480px) {
  .hero-right h1 {
    font-size: 1.6rem;
  }
  .hero-right .lead {
    font-size: 0.95rem;
  }
}

