/* ========== THEME ========== */

:root {
  /* LIGHT (default) */
  --bg-main: #f5f5f5;
  --bg-elevated: #ffffff;
  --bg-soft: #e5e7eb;

  --text-main: #111827;
  --text-soft: #6b7280;

  --accent: #eb2588; /* light blue */
  /* --accent-soft: rgba(37, 99, 235, 0.3); */
  --accent-strong: #1d4ed8;
}

body.dark-mode {
  /* DARK mode */
  --bg-main: #020617;
  --bg-elevated: #020617;
  --bg-soft: #020617;

  --text-main: #f9fafb;
  --text-soft: #9ca3af;
}

/* ========== GLOBAL ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* font-size: 300px; */
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  width: 100%;
  height: 100%;
}

/* Custom scrollbar */
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: #e5e7eb;
}
body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-strong);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding-block: 4rem;
  background-color: var(--bg-main);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  background: #eb2588;
  color: #fff;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-strong);
  color: var(--bg-main);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 22px var(--accent-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px;
  background-color: var(--accent-strong);
  color: var(--bg-main);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ========== HEADER / NAV ========== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-main);
  backdrop-filter: blur(10px);
}

.header_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
}

.nav_list {
  list-style: none;
  display: flex;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}

.nav_link {
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
}
.nav_link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.22s ease;
}
.nav_link:hover {
  color: var(--text-main);
}
.nav_link:hover::after {
  width: 100%;
}

.header_actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.icon_btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.burger {
  display: none;
}

/* Mobile nav */

.mobile_nav {
  position: "";
  inset: 0;
  background: var(--bg-main);
  display: none;
  z-index: 30;
}

.mobile_nav_inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
.mobile_nav_inner :hover {
  color: var(--accent);
}

.mobile_link {
  font-size: 1.1rem;
}

.mobile_resume {
  margin-top: 0.5rem;
}

.mobile_socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.mobile_socials a {
  font-size: 1.1rem;
  color: var(--accent);
}
.mobile_socials a:hover {
  color: var(--accent-strong);
}

/* ========== HERO ========== */

.hero_inner {
  text-align: center;
  padding-top: 4rem;
}

.hero_img {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  object-fit: cover;
  margin-inline: auto;
}

.hero_subtitle {
  margin-top: 0rem;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

#typed_cursor {
  display: inline-block;
  margin-left: 0.1rem;
  animation: blink 0.8s steps(2, start) infinite;
}

@keyframes blink {
  to {
    opacity: 0;
  }
}

.hero_title {
  margin-top: 0.8rem;
  font-size: clamp(3.3rem, 6vw, 4.3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero_desc {
  max-width: 600px;
  margin: 1.3rem auto 1.8rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.hero_desc span {
  color: var(--accent-strong);
}

.hero_btn {
  margin-top: 0.5rem;
}

/* ========== COMMON SECTION TITLES ========== */

.section_title {
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 0.4rem;
  text-transform: lowercase;
}

.section_subtitle {
  font-size: 0.9rem;
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
  color: var(--text-soft);
}

/* ========== ABOUT ========== */

.about_inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
}
strong {
  color: var(--accent);
}
span {
  color: var(--accent-strong);
}
.about_text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 0.7rem;
}

.about_divider {
  border: none;
  border-top: 1px solid var(--bg-soft);
  margin-block: 1.4rem;
}

.skills_heading {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  align-items: center;
}

.skills_grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.skills_grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.skills_grid ul {
  list-style: none;
  padding: 0;
  margin-top: 0.4rem;
}

/* Center the content inside each skills column */
.skills_grid > div {
  /* Use flexbox to center heading and content vertically and horizontally */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center; /* ensure text within is centered */
}

/* Add subtle padding and hover/focus transformations */
.skills_grid > div {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* keyboard accessibility: focus-within triggers the effect for keyboard users */
.skills_grid > div:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  background: linear-gradient(
    180deg,
    rgba(29, 78, 216, 0.03),
    rgba(235, 37, 136, 0.02)
  );
}

/* Only apply hover transforms on devices with hover + accurate pointers */
@media (hover: hover) and (pointer: fine) {
  .skills_grid > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
    background: linear-gradient(
      180deg,
      rgba(29, 78, 216, 0.03),
      rgba(235, 37, 136, 0.02)
    );
  }
  .skills_grid > div:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
  }
  .skills_grid > div:hover h4 {
    color: var(--accent);
  }
}

.skills_grid li {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 0.2rem;
}

.about_right img {
  border-radius: 16px;
}

/* ========== EXPERIENCE ========== */

.experience_inner {
  text-align: left;
}

.exp_timeline {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.exp_item {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
}

.exp_item h3 {
  margin: 0;
  font-size: 1rem;
}

.exp_company {
  margin: 0.2rem 0 0.1rem;
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.exp_period {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.exp_item ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}
.exp_item li {
  margin-bottom: 0.25rem;
}

/* ========== WORK ========== */

.work_inner {
  text-align: center;
}

.work_list {
  margin-top: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.work_item {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.work_item:nth-child(even) {
  flex-direction: row-reverse;
}

.work_image {
  flex: 1.1;
}
.work_image img {
  border-radius: 10px;
  width: 100%;
}

.work_content {
  flex: 1;
  text-align: left;
}

.work_heading {
  font-size: 1.1rem;
  text-transform: lowercase;
  margin-bottom: 0.5rem;
}

.work_text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.work_btn {
  font-size: 0.82rem;
}

.work_more {
  margin-top: 2.5rem;
}
.work_more_btn {
  border: none;
  font-size: 0.82rem;
  padding-inline: 2.2rem;
  background-color: #eb2588;
  color: var(--bg-main);
}

/* ========== CONTACT ========== */

.contact_inner {
  text-align: center;
}

.contact_info {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.contact_info i {
  color: var(--accent);
  margin-right: 0.4rem;
}

.contact_socials {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}
.contact_socials a {
  font-size: 1.05rem;
  color: var(--accent);
}
.contact_socials a:hover {
  color: var(--accent-strong);
}

.contact_form {
  margin-top: 2rem;
  max-width: 420px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.contact_form input,
.contact_form textarea {
  border-radius: 3px;
  border: 1px solid var(--text-soft);
  outline: none;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-soft);
  color: var(--text-main);
}
.contact_form textarea {
  min-height: 140px;
  resize: vertical;
}
.contact_form input::placeholder,
.contact_form textarea::placeholder {
  color: var(--accent);
}

/* ========== FOOTER ========== */

.footer {
  padding-block: 1.5rem 2rem;
  background: var(--bg-soft);
}
.footer_inner {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* ========== SCROLL REVEAL ========== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  .about_inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about_right {
    order: -1;
  }

  .skills_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exp_timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .header_actions .btn-primary {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .section {
    padding-block: 3.2rem;
  }

  .hero_inner {
    padding-top: 3rem;
  }

  .work_item {
    flex-direction: column;
    align-items: flex-start;
  }
  .work_item:nth-child(even) {
    flex-direction: column; /* no flip on mobile */
  }

  .work_image,
  .work_content {
    width: 100%;
  }

  /* remove hover effect difference on mobile */
  .btn-primary:hover {
    transform: none;
    box-shadow: 0 0 22px var(--accent-soft);
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 2rem, 100%);
  }

  .skills_grid {
    grid-template-columns: 1fr;
  }
}
