/* =====================================================
   PORTFOLIO - STYLE.CSS
   Vidushika Madhushani
===================================================== */

:root {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --secondary: #fd79a8;
  --accent: #00cec9;

  --bg: #0f0f1a;
  --bg-2: #141427;
  --card: #1c1c35;

  --border: rgba(108, 99, 255, 0.22);

  --text: #ffffff;
  --muted: #b7b7d2;
  --muted-2: #8b8bb0;

  --gradient: linear-gradient(
    135deg,
    var(--primary),
    var(--secondary)
  );

  --shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 30px rgba(108, 99, 255, 0.18);

  --radius: 18px;
  --transition: 0.25s ease;

  --font:
    "Poppins",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}


/* ================= RESET ================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font-family: inherit;
}


/* ================= SCROLLBAR ================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(108, 99, 255, 0.6);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}


/* ================= COMMON ================= */

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted {
  color: var(--muted);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.25);
  color: #d9d7ff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-divider {
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--gradient);
  margin: 12px auto;
}

.section-description {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
}


/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  white-space: nowrap;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 14px 30px rgba(108, 99, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 2px solid rgba(108, 99, 255, 0.6);
  color: #e6e5ff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(108, 99, 255, 0.12);
}


/* ================= NAVBAR ================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 16px 0;
  transition:
    background var(--transition),
    padding var(--transition),
    box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 15, 26, 0.86);
  backdrop-filter: blur(16px);
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(108, 99, 255, 0.12);
}

.nav-container {
  width: min(1200px, 92%);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
}

.logo-text {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -1px;

  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;

  list-style: none;
}

.nav-link {
  display: inline-block;

  text-decoration: none;
  color: var(--muted);

  font-weight: 600;
  font-size: 0.92rem;

  padding: 10px 12px;
  border-radius: 12px;

  transition:
    background var(--transition),
    color var(--transition);
}

.nav-link:hover {
  background: rgba(108, 99, 255, 0.1);
  color: white;
}

.nav-link.active {
  color: white;
  background: rgba(108, 99, 255, 0.14);
}

.resume-btn {
  background: var(--gradient);
  color: white !important;
  padding: 10px 14px;
  border-radius: 999px;
}


/* ================= HAMBURGER ================= */

.hamburger {
  display: none;

  flex-direction: column;
  gap: 6px;

  background: transparent;
  border: 0;
  cursor: pointer;

  padding: 6px;
}

.bar {
  width: 26px;
  height: 2px;
  background: white;

  transition:
    transform var(--transition),
    opacity var(--transition);
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* ================= HERO ================= */

.hero {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding-top: 92px;

  position: relative;
  overflow: hidden;
}

.hero-container {
  width: min(1200px, 92%);

  display: grid;
  grid-template-columns: 1.1fr 0.9fr;

  gap: 48px;
  align-items: center;

  position: relative;
  z-index: 2;
}

.hero-greeting {
  color: #d9d7ff;
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--muted);

  margin-bottom: 14px;
  min-height: 34px;
}

.typed-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cursor {
  color: var(--primary);
  animation: blink 1s infinite;
}

.hero-description {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 18px;
}

.hero-description strong {
  color: #e6e5ff;
}

.hero-quick {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.quick-item i {
  color: var(--primary);
}

.quick-item a {
  color: #e6e5ff;
  text-decoration: none;
}

.quick-item a:hover {
  text-decoration: underline;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-socials {
  display: flex;
  gap: 10px;
}

.social-icon {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(108, 99, 255, 0.2);

  transition:
    transform var(--transition),
    background var(--transition);

  text-decoration: none;
  color: white;
}

.social-icon:hover {
  transform: translateY(-3px);
  background: rgba(108, 99, 255, 0.22);
}


/* ================= HERO IMAGE ================= */

.hero-image {
  position: relative;

  display: grid;
  place-items: center;
}

.image-wrapper {
  position: relative;

  width: 360px;
  height: 360px;
}

.image-border {
  position: absolute;
  inset: -10px;

  border-radius: 999px;
  background: var(--gradient);

  animation: spin 9s linear infinite;
}

.image-border::before {
  content: "";

  position: absolute;
  inset: 10px;

  border-radius: 999px;
  background: var(--bg);
}

.profile-img {
  position: relative;

  width: 100%;
  height: 100%;

  border-radius: 50%;

  object-fit: cover;
  object-position: 50% 7%;

  border: 4px solid var(--bg);

  z-index: 1;

  box-shadow: var(--shadow);
}

.floating-badge {
  position: absolute;

  display: inline-flex;
  gap: 8px;
  align-items: center;

  background: rgba(28, 28, 53, 0.8);

  border: 1px solid rgba(108, 99, 255, 0.25);

  border-radius: 999px;

  padding: 10px 12px;

  font-weight: 700;
  font-size: 0.88rem;

  box-shadow: var(--shadow-soft);

  backdrop-filter: blur(10px);

  z-index: 3;
}

.floating-badge i {
  color: var(--primary);
}

.badge-1 {
  top: 10%;
  right: -6%;
  animation: float 3.2s ease-in-out infinite;
}

.badge-2 {
  bottom: 14%;
  right: -10%;
  animation: float 3.6s ease-in-out infinite 0.3s;
}

.badge-3 {
  bottom: 22%;
  left: -8%;
  animation: float 3.8s ease-in-out infinite 0.6s;
}


/* ================= SCROLL DOWN ================= */

.scroll-down {
  position: absolute;

  bottom: 26px;
  left: 50%;

  transform: translateX(-50%);

  text-decoration: none;
  color: var(--muted);

  display: grid;
  place-items: center;
  gap: 8px;

  font-weight: 600;
  font-size: 0.85rem;

  z-index: 3;
}

.scroll-mouse {
  width: 26px;
  height: 42px;

  border: 2px solid rgba(255, 255, 255, 0.26);

  border-radius: 999px;

  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 9px;

  background: var(--primary);

  border-radius: 999px;

  position: absolute;

  left: 50%;
  transform: translateX(-50%);

  top: 8px;

  animation: wheel 1.5s infinite;
}


/* ================= HERO DECORATION ================= */

.hero-bg-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 999px;
  opacity: 0.07;
}

.circle-1 {
  width: 560px;
  height: 560px;

  background: var(--primary);

  top: -220px;
  right: -200px;
}

.circle-2 {
  width: 420px;
  height: 420px;

  background: var(--secondary);

  bottom: -170px;
  left: -170px;
}

.circle-3 {
  width: 320px;
  height: 320px;

  background: var(--accent);

  top: 45%;
  left: 50%;

  transform: translate(-50%, -50%);

  opacity: 0.05;
}


/* ================= CARDS ================= */

.card {
  background: rgba(28, 28, 53, 0.86);

  border: 1px solid rgba(108, 99, 255, 0.22);

  border-radius: var(--radius);

  padding: 22px;

  box-shadow: var(--shadow-soft);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 1.05rem;

  margin-bottom: 10px;
}

.card-title i {
  color: var(--primary);
}

.list {
  margin-left: 18px;
  color: var(--muted);
}

.list li {
  margin: 10px 0;
}


/* ================= ABOUT ================= */

.about {
  background: var(--bg-2);
}

.about-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 18px;
}


/* ================= SKILLS ================= */

.skills-layout {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 18px;
}

.skills-card {
  min-height: 180px;
}

.skill-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(110px, 1fr));

  gap: 14px;

  margin-top: 14px;
}

.skill-box {
  min-height: 96px;

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(108, 99, 255, 0.22);

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;

  padding: 10px;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.skill-box:hover {
  transform: translateY(-4px);

  border-color: rgba(108, 99, 255, 0.55);

  background: rgba(108, 99, 255, 0.08);
}

.skill-box i {
  font-size: 34px;

  line-height: 1;

  margin-bottom: 8px;
}

.skill-box i.fas,
.skill-box i.fab {
  font-size: 28px;
  color: #e9e8ff;
}

.skill-box span {
  font-size: 0.9rem;

  font-weight: 700;

  color: #e9e8ff;
}

.devicon-express-original {
  color: #e9e8ff;
}


/* ================= PROJECTS ================= */

.projects {
  background: var(--bg-2);
}

.projects-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 18px;
}

.project-card {
  background: rgba(28, 28, 53, 0.92);

  border: 1px solid rgba(108, 99, 255, 0.22);

  border-radius: var(--radius);

  padding: 20px;

  box-shadow: var(--shadow-soft);

  transition:
    transform var(--transition),
    border-color var(--transition);

  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);

  border-color: rgba(108, 99, 255, 0.45);
}

.project-top {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 10px;
}

.project-title {
  font-size: 1.05rem;

  font-weight: 800;

  line-height: 1.3;
}

.project-badge {
  padding: 6px 10px;

  border-radius: 999px;

  background: rgba(253, 121, 168, 0.14);

  border: 1px solid rgba(253, 121, 168, 0.3);

  color: #ffd1e2;

  font-weight: 800;

  font-size: 0.72rem;

  flex-shrink: 0;
}

.project-desc {
  color: var(--muted);

  margin-bottom: 12px;
}

.project-features {
  margin-left: 18px;

  color: var(--muted);

  margin-bottom: 16px;
}

.project-features li {
  margin-bottom: 7px;
}

.chips {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: auto;
}

.chip {
  font-size: 0.78rem;

  padding: 6px 10px;

  border-radius: 999px;

  background: rgba(108, 99, 255, 0.12);

  border: 1px solid rgba(108, 99, 255, 0.22);

  color: #e9e8ff;

  font-weight: 600;
}

.project-actions {
  display: flex;

  gap: 10px;

  margin-top: 16px;

  flex-wrap: wrap;
}


/* ================= EDUCATION ================= */

.education {
  background: var(--bg);
}

.timeline {
  position: relative;

  margin-top: 10px;
}

.timeline::before {
  content: "";

  position: absolute;

  left: 12px;
  top: 0;
  bottom: 0;

  width: 2px;

  background: var(--gradient);

  border-radius: 999px;

  opacity: 0.7;
}

.timeline-item {
  position: relative;

  padding-left: 44px;

  margin-bottom: 22px;
}

.timeline-dot {
  position: absolute;

  left: 4px;
  top: 10px;

  width: 18px;
  height: 18px;

  border-radius: 999px;

  background: var(--gradient);

  box-shadow:
    0 0 0 4px rgba(108, 99, 255, 0.18);
}

.timeline-card {
  background: rgba(28, 28, 53, 0.86);

  border: 1px solid rgba(108, 99, 255, 0.22);

  border-radius: var(--radius);

  padding: 18px 20px;

  box-shadow: var(--shadow-soft);
}

.timeline-date {
  color: #d9d7ff;

  font-weight: 700;

  margin-bottom: 6px;
}

.timeline-title {
  font-weight: 900;

  margin-bottom: 2px;
}

.timeline-sub {
  color: var(--muted);

  font-weight: 600;
}


/* ================= EXPERIENCE ================= */

.experience {
  background: var(--bg-2);
}

.experience-grid {
  display: grid;

  gap: 18px;
}

.exp-card {
  padding: 22px;
}

.exp-head {
  display: flex;

  align-items: center;

  gap: 14px;

  margin-bottom: 12px;
}

.exp-icon {
  width: 48px;
  height: 48px;

  border-radius: 14px;

  background: rgba(108, 99, 255, 0.14);

  border: 1px solid rgba(108, 99, 255, 0.24);

  display: grid;

  place-items: center;

  color: #e9e8ff;

  flex-shrink: 0;
}

.exp-title {
  font-weight: 900;

  margin-bottom: 2px;
}

.exp-date {
  color: var(--muted-2);

  font-weight: 700;
}


/* ================= LEADERSHIP ================= */

.leadership {
  background: var(--bg);
}


/* ================= CONTACT ================= */

.contact {
  background: var(--bg-2);
}

.contact-grid {
  display: grid;

  grid-template-columns: 1fr 1.2fr;

  gap: 18px;

  align-items: start;
}

.contact-cards {
  display: grid;

  gap: 12px;
}

.contact-card {
  display: flex;

  gap: 14px;

  align-items: center;

  text-decoration: none;

  padding: 16px;

  border-radius: var(--radius);

  background: rgba(28, 28, 53, 0.86);

  border: 1px solid rgba(108, 99, 255, 0.22);

  box-shadow: var(--shadow-soft);

  transition:
    transform var(--transition);
}

.contact-card:hover {
  transform: translateY(-3px);
}

.contact-icon {
  width: 46px;
  height: 46px;

  display: grid;

  place-items: center;

  border-radius: 14px;

  background: rgba(108, 99, 255, 0.14);

  border: 1px solid rgba(108, 99, 255, 0.22);

  color: white;

  flex-shrink: 0;
}

.contact-label {
  color: var(--muted-2);

  font-weight: 700;

  font-size: 0.82rem;

  text-transform: uppercase;

  letter-spacing: 1px;
}

.contact-value {
  color: #e9e8ff;

  font-weight: 700;

  word-break: break-word;
}

.contact-form {
  background: rgba(28, 28, 53, 0.92);

  border: 1px solid rgba(108, 99, 255, 0.22);

  border-radius: var(--radius);

  padding: 20px;

  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 12px;
}

.form-group {
  margin-bottom: 12px;
}

label {
  display: block;

  color: var(--muted);

  font-weight: 700;

  margin-bottom: 8px;

  font-size: 0.9rem;
}

input,
textarea {
  width: 100%;

  padding: 12px 14px;

  border-radius: 14px;

  border: 1px solid rgba(108, 99, 255, 0.22);

  background: rgba(255, 255, 255, 0.05);

  color: white;

  outline: none;

  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

input:focus,
textarea:focus {
  border-color: rgba(108, 99, 255, 0.6);

  box-shadow:
    0 0 0 4px rgba(108, 99, 255, 0.1);
}

textarea {
  min-height: 140px;

  resize: vertical;
}

.form-message {
  margin-top: 12px;

  padding: 10px 12px;

  border-radius: 14px;

  font-weight: 700;

  display: none;
}

.form-message.success {
  display: block;

  background: rgba(0, 206, 201, 0.12);

  border: 1px solid rgba(0, 206, 201, 0.25);

  color: #bff7f5;
}

.form-message.error {
  display: block;

  background: rgba(253, 121, 168, 0.12);

  border: 1px solid rgba(253, 121, 168, 0.25);

  color: #ffd1e2;
}


/* ================= FOOTER ================= */

.footer {
  padding: 26px 0;

  border-top: 1px solid rgba(108, 99, 255, 0.14);

  background: rgba(10, 10, 18, 0.6);
}

.footer-inner {
  width: min(1100px, 92%);

  margin: 0 auto;

  text-align: center;
}

.footer-text {
  color: var(--muted);
}


/* ================= BACK TO TOP ================= */

.back-to-top {
  position: fixed;

  right: 18px;
  bottom: 18px;

  width: 46px;
  height: 46px;

  border: 0;

  cursor: pointer;

  border-radius: 999px;

  background: var(--gradient);

  color: white;

  box-shadow: var(--shadow-soft);

  opacity: 0;

  visibility: hidden;

  transform: translateY(6px);

  transition:
    opacity var(--transition),
    transform var(--transition),
    visibility var(--transition);

  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;

  visibility: visible;

  transform: translateY(0);
}


/* ================= ANIMATIONS ================= */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes wheel {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
  }
}


/* ================= SCROLL REVEAL ================= */

.fade-up,
.fade-left,
.fade-right {
  opacity: 0;

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.fade-up {
  transform: translateY(22px);
}

.fade-left {
  transform: translateX(-22px);
}

.fade-right {
  transform: translateX(22px);
}

.visible {
  opacity: 1 !important;

  transform: translate(0) !important;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 9px 8px;
  }

}


@media (max-width: 980px) {

  .hero-container {
    grid-template-columns: 1fr;

    gap: 28px;

    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-buttons,
  .hero-socials {
    justify-content: center;
  }

  .hero-quick {
    justify-items: center;
  }

  .image-wrapper {
    width: 300px;
    height: 300px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-layout {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 820px) {

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;

    top: 0;
    right: -100%;

    width: min(320px, 78vw);

    height: 100vh;

    background: rgba(20, 20, 39, 0.96);

    backdrop-filter: blur(16px);

    border-left: 1px solid rgba(108, 99, 255, 0.14);

    flex-direction: column;

    justify-content: center;

    padding: 20px;

    transition: right var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: 1.05rem;

    padding: 12px 14px;

    width: 100%;

    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 500px) {

  .section {
    padding: 70px 0;
  }

  .hero {
    padding-top: 110px;
  }

  .image-wrapper {
    width: 250px;
    height: 250px;
  }

  .floating-badge {
    font-size: 0.75rem;

    padding: 8px 10px;
  }

  .badge-1 {
    right: -5%;
  }

  .badge-2 {
    right: -5%;
  }

  .badge-3 {
    left: -5%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

}
