/* ===== Global Reset ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
  margin: 0;
  line-height: 1.65;

  /* 🌙 DEFAULT DARK MODE BACKGROUND */
  background:
    radial-gradient(circle at 20% 20%, #2563eb55, transparent 40%),
    radial-gradient(circle at 80% 30%, #22c55e55, transparent 40%),
    radial-gradient(circle at 50% 80%, #9333ea55, transparent 40%),
    linear-gradient(180deg, #020617, #020617);

  color: #e5e7eb;
}
:root {
  --dark-bg:
    radial-gradient(circle at 20% 20%, #2563eb55, transparent 40%),
    radial-gradient(circle at 80% 30%, #22c55e55, transparent 40%),
    radial-gradient(circle at 50% 80%, #9333ea55, transparent 40%),
    linear-gradient(180deg, #020617, #020617);
}


/* ===== Theme Toggle ===== */
.theme-icon {
  position: fixed;
  top: 18px;
  right: 22px;

  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 10px;

  width: 36px;
  height: 36px;

  font-size: 16px;   /* 🔽 reduced */
  cursor: pointer;
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 1000;
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}


/* ===== Page Layout ===== */
.page-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  padding: 80px;
  min-height: 100vh;
}

/* ===== Left Panel ===== */
.left-panel {
  position: relative;
}

/* ================================================= */
/* 🌙 HERO CARD — DARK MODE (GLASS) */
/* ================================================= */
.hero-card {
  position: sticky;
  top: 70px;

  text-align: center;
  padding: 36px 28px;          /* ⬅ reduced height */
  border-radius: 22px;
  max-width: 360px;            /* ⬅ slimmer card */
  margin: 0 auto;

  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}


/* ===== Profile Image ===== */
.profile-img {
  width: 135px;
  height: 135px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
  margin-bottom: 16px;
  margin-top: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

/* ===== Name ===== */
.hero-card .name {
  font-size: 1.6rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Role ===== */
.hero-card h2 {
  margin: 10px;
  font-size: 1.15rem;
  color: #93c5fd;
}

/* ===== Location ===== */
.hero-card p {
  margin: -2px 0 6px;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* ===== Social Icons ===== */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 30px 0 32px;
}

/* Base icon */
.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px; /* 🔥 square with soft edges */
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;

  color: #9ca3af;
  font-size: 16px;

  transition: all 0.25s ease;
}

/* Hover effect */
.social-icon:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  transform: translateY(-2px);
}

/* Active (highlighted) icon like your image */
.social-icon.active {
  background: #22c55e;
  color: #020617;
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.45);
}


.icon-btn {
  width: 44px;
  height: 44px;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

/* ===== Buttons ===== */
.buttons {
  margin-top: 34px;
}

.primary-btn,
.secondary-btn {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 12px auto;
  padding: 14px 0;
  border-radius: 30px;
  text-decoration: none;
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
}

.secondary-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.45);
}

/* ===== Right Panel ===== */
.right-panel {
  max-width: 1000px;
}

/* ===== Sections ===== */
.section {
  padding: 24px 0;
}

.section h3 {
  font-size: 1.45rem;
  margin-bottom: 22px;
  border-bottom: 2px solid #3b82f6;
  display: inline-block;
}

/* ===== Skills ===== */
.skills div {
  margin: 12px 0;
  font-size: 0.95rem;
}

/* ===== Projects ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

/* Project cards – Dark */
.project {
  background: rgba(255,255,255,0.07);
  padding: 26px;
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.3);
  color: #e5e7eb;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 50px 0 12px;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ================================================= */
/* ☀️ LIGHT MODE — BACKGROUND + RIGHT PANEL ONLY */
/* ================================================= */
body.light {
  background:
    radial-gradient(circle at 15% 20%, #e0f2fe, transparent 45%),
    radial-gradient(circle at 85% 30%, #ecfeff, transparent 45%),
    radial-gradient(circle at 50% 85%, #f0fdf4, transparent 45%),
    linear-gradient(180deg, #f8fafc, #eef2ff);

  color: #020617;
}

/* Right panel readable */
body.light .right-panel {
  color: #020617;
}

/* Project cards light */
body.light .project {
  background: rgba(255,255,255,0.9);
  color: #020617;
}

/* ================================================= */
/* ☀️ HERO CARD — LIGHT MODE (SOLID, NO TRANSPARENCY) */
/* ================================================= */
body.light .hero-card {
  background: var(--dark-bg);   /* 🔥 EXACT dark-mode page bg */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #ffffff;
}


/* ===== Mobile ===== */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .hero-card {
    position: static;
  }
}

/* ===========content============================*/

.intro {
  max-width: 720px;
  margin-bottom: 10px;
}

.hello {
  font-size: 2.2rem;
  opacity: 0.9;
}

.intro h1 {
  font-size: 3rem;
  margin-bottom: 0;
}

.typing {
  font-size: 2.2rem;
  color: #22c55e;
  margin-top: -6px;
  margin-bottom: 4;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.location {
  font-size: 1.5rem;
  color: #22c55e;
  margin-top: -6px;
  margin-bottom: 20px;
}

.intro-text {
  font-size: 1.05rem;
  text-align: justify;
  line-height: 1.7;          
  opacity: 0.9;
  margin-bottom: 24px;       
}


/* ===================================== */
/* 🧑‍💼 EXPERIENCE SECTION */
/* ===================================== */


.section.experience-section {
  padding-top: 20px !important;
}

.experience-section .section-title {
  margin-top: 0;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 22px; /* reduced from 30px */
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: #22c55e;
}


/* Experience Card */
.experience-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 18px;
  padding: 24px 26px;        /* slightly tighter */
  margin-bottom: 22px;

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}


/* Header row */
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px; /* subtle separation */
}

.exp-header h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.year {
  font-size: 0.9rem;
  opacity: 0.8;
}


/* Organization */
.exp-org {
  display: inline-block;
  margin: 6px 0 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #22c55e;
}

.exp-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
  text-align: justify;
}
.experience-card:last-child {
  margin-bottom: 0;
}

/* Remove extra bottom gap after Experience */
.experience-section {
  padding-bottom: 0;
  margin-bottom: 0;
}
/* Consistent section rhythm */
.section + .section {
  margin-top: 12px;
}

/* =============================== */
/* 🚀 PROJECTS SECTION */
/* =============================== */

#projects {
  padding-top: 20px;
}

.projects-section {
  margin-top: 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* Project Card */
.project-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 35px 80px rgba(0,0,0,0.6);
}

/* Image Area */
.project-img {
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content */
.project-content {
  padding: 22px;
  flex-grow: 1;
}

.project-content h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.project-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* Tech Pills */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.tech-stack span {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-weight: 500;
}

/* Buttons */
.project-actions {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: 0.2s ease;
}

.btn.primary {
  background: #22c55e;
  color: #020617;
}

.btn.primary:hover {
  opacity: 0.9;
}

.btn.secondary {
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}

.btn.secondary:hover {
  background: rgba(255,255,255,0.12);
}

/* =============================== */
/* 🧩 SKILLS SECTION */
/* =============================== */

.skills-section {
  margin-top: 40px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Skill Card */
.skill-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}

/* Card Title */
.skill-card h4 {
  color: #22c55e;
  font-size: 1.1rem;
  font-weight: 800; 
  margin-bottom: 18px;
}
.skill-card h4::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 8px;

  background: linear-gradient(
    90deg,
    #22c55e,
    transparent
  );

  border-radius: 2px;
}


/* Pills */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pills span {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;

  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;

  transition: background 0.2s ease, transform 0.2s ease;
}

.skill-pills span:hover {
  background: rgba(34, 197, 94, 0.25);
  transform: scale(1.05);
}

/* =============================== */
/* 📩 CONTACT SECTION */
/* =============================== */

.contact-section {
  padding-top: 40px;
}

/* Top Info Cards */
.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.info-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
}

.info-card span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #22c55e;
}

.info-card p {
  margin-top: 6px;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Contact Form Card */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  opacity: 0.9;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.9rem;
}

.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255,255,255,0.55);
}

/* Button */
.contact-form button {
  background: #22ff88;
  color: #020617;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
  display: block;
  margin: 24px auto 0;   /* centers horizontally */
}


.contact-form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}



/* =============================== */
/* 🔝 TOP NAVIGATION BAR */
/* =============================== */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;

  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 90px; 

  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  z-index: 999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}


.top-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #cbd5f5;
  padding: 6px 2px;
  position: relative;
  transition: color 0.3s ease;
}

/* Hover */
.top-nav a:hover {
  color: #22c55e;
}

/* Active underline */
.top-nav a.active {
  color: #22c55e;
}

.top-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #22c55e;
  border-radius: 2px;
}




/* ===================================== */
/* 📱 MOBILE TYPOGRAPHY FIX (IMPROVED) */
/* ===================================== */

@media (max-width: 600px) {
  .page-layout {
    padding: 24px 16px;
    gap: 32px;
  }

  .hero-card {
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(10px);
  }

  .section p {
    text-align: left;
    line-height: 1.7;
  }

  .right-panel {
    max-width: 100%;
  }

  .hero-card .name {
    margin-bottom: 4px;
  }

  .hero-card h2 {
    margin-top: 4px;
  }
}


@media (max-width: 600px) {

  /* Greeting */
  .hello {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  /* Name — SINGLE LINE, AUTO-FIT */
  .hero-name {
    display: block;
    width: 100%;

    /* 🔥 fluid scaling */
    font-size: clamp(1.15rem, 4.6vw, 1.6rem);
    line-height: 1.05;
    font-weight: 200;

    white-space: nowrap;
    word-break: keep-all;
    overflow: visible;

    /* 🔑 magic compression */
    letter-spacing: -0.4px;
  }

  .hero-name strong {
    font-weight: 700;
  }

  /* Typing / Role — SINGLE LINE, AUTO-FIT */
  .hero-role {
    font-size: clamp(1.15rem, 5vw, 1.4rem);
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: -0.2px;
  }

  /* Location */
  .hero-location {
    font-size: 0.95rem;
    margin-top: 10px;
  }

  /* Paragraph — MOBILE FRIENDLY */
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 16px;
    text-align: left;
    word-spacing: normal;
  }

  /* Spacing container */
  .hero-text {
    padding-top: 12px;
  }

    .intro h1 {
    font-size: clamp(1.55rem, 6vw, 2rem); /* reduced slightly */
    line-height: 1.2;

    white-space: nowrap;
    overflow: visible;

    letter-spacing: -0.2px; /* less compression */
  }

  .typing {
    font-size: clamp(1.1rem, 5vw, 1.4rem);
  }

  #typing-text {
    font-size: inherit;
  }

  .cursor {
    font-size: inherit;
  }
    .location {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 12px;

    white-space: nowrap;        /* single line */
    overflow: hidden;
    text-overflow: ellipsis;    /* safe fallback */
  }
    .intro-text {
    font-size: 0.95rem;
    line-height: 1.65;

    max-width: 100%;
    padding-right: 4px;

    text-align: justify;   /* better readability on mobile */
  }
    .intro {
    padding-top: 8px;
  }
}




/* ===================================== */
/* 📱 MOBILE OPTIMIZATION */
/* ===================================== */
@media (max-width: 600px) {

  .experience-card {
    padding: 20px;
  }

  .exp-header h4 {
    font-size: 1.05rem;
  }

  .year {
    font-size: 0.85rem;
  }

  .exp-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: left;
  }
    .section {
    padding: 40px 0;
  }

  .intro-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .experience-section {
    padding-top: 28px;
  }


  .section-title {
    font-size: 1.4rem;
  }

}

/* Mobile */
@media (max-width: 600px) {
  .project-img {
    height: 150px;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr; /* 1 per row on mobile */
  }
}

/* =============================== */
/* 📱 MOBILE */
/* =============================== */

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    padding: 22px;
  }
}

@media (max-width: 600px) {
  .top-nav ul {
    gap: 16px;
  }

  .top-nav a {
    font-size: 0.8rem;
  }
}

/* 📱 Mobile */
@media (max-width: 768px) {
  .contact-info {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 26px;
  }
  .contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form button {
  align-self: center;
  margin-top: 24px;
}

}
