/* Palette from live site (genitatahiri.com) – teal & blue */
:root {
  --color-bg: #ffffff;
  --color-bg-section: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #e2e8f0;
  --color-text: #272341;
  --color-text-soft: #4a5568;
  --color-muted: #64748b;
  --color-accent: #5b86e5;
  --color-accent-teal: #36d1dc;
  --color-accent-hover: #4a6fd6;
  --color-accent-soft: #e0f2fe;
  --color-accent-border: rgba(91, 134, 229, 0.3);
  --gradient-accent: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  --shadow-card: 0 4px 20px rgba(39, 35, 65, 0.06);
  --shadow-card-hover: 0 12px 32px rgba(39, 35, 65, 0.1);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  text-align: initial;
}

main {
  padding-top: 6.4rem;
}

/* Sticky header – matches surface */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-surface-soft);
  box-shadow: var(--shadow-card);
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.08em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Desktop nav ─────────────────────────────── */
.nav {
  display: flex;
  gap: 2rem;
}

.nav__link {
  font-size: 1.4rem;
  color: var(--color-muted);
  position: relative;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav__link::after {
  display: none;
}

.nav__link:hover::after {
  width: 0;
}

.nav__link:hover {
  background-color: var(--color-accent-soft);
  color: var(--color-accent-hover);
}

/* ── Hamburger button (hidden on desktop) ─────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  z-index: 1001;
}

.nav-toggle:hover {
  background-color: var(--color-accent-soft);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Animate bars → X when open */
.nav-toggle--open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle--open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle--open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav ────────────────────────────────── */
@media (max-width: 767px) {
  .header__content {
    justify-content: space-between;
  }

  /* Show hamburger, hide nav by default */
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    /* flush under header */
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.99);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-surface-soft);
    border-bottom: 1px solid var(--color-surface-soft);
    box-shadow: 0 8px 24px rgba(39, 35, 65, 0.1);
    padding: 1rem 0;
    z-index: 1000;
    animation: slideDown 0.25s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Show nav when toggled */
  .nav.nav--open {
    display: flex;
  }

  .nav__link {
    font-size: 1.5rem;
    padding: 1.2rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid var(--color-surface-soft);
    color: var(--color-text);
  }

  .nav__link:last-child {
    border-bottom: none;
  }

  .nav__link:hover {
    background-color: var(--color-accent-soft);
    color: var(--color-accent-hover);
    border-radius: 0;
  }
}

/* Hero – matches live site */
#hero {
  min-height: calc(100vh - 6.4rem);
  height: auto;
  align-items: center;
  padding: 8rem 5.6rem 5rem;
  position: relative;
  z-index: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

.hero-content {
  max-width: 720px;
}

.hero-kicker {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted);
  margin-bottom: 1.2rem;
}

.hero-title {
  margin-bottom: 1.6rem;
}

/* Hero name – gradient from live site */
#hero .text-color-main {
  background-image: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--color-text-soft);
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
  list-style: none;
  padding: 0;
}

.hero-tag {
  font-size: 1.2rem;
  padding: 0.4rem 1.4rem;
  border-radius: 999px;
  background: rgba(54, 209, 220, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(54, 209, 220, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-tag:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
  #hero {
    padding: 8rem 2.4rem 4rem;
  }
}

.scroll-down {
  display: none;
  border-color: var(--color-surface-soft);
}

.scroll-down::before,
.scroll-down::after {
  border-color: var(--color-accent);
}

@media (max-width: 600px) {
  #hero {
    padding: 7rem 1.6rem 3rem;
  }
}

/* Section backgrounds – alternating for rhythm */
#skills,
#projects,
#articles {
  background: var(--color-bg-section);
}

.skills-wrapper,
.articles-wrapper {
  gap: 2.4rem;
}

@media (max-width: 767px) {
  .skills-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
  }

  .skills-list {
    width: 100%;
    max-width: 480px;
    text-align: center;
  }

  .skills-list__items {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.skills-list,
.article,
.project-card {
  padding: 16px;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-surface-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.skills-list::before,
.article::before,
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.skills-list {
  padding: 2.4rem;
}

.article {
  padding: 2.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.article__title {
  flex: 1;
  margin-bottom: 2rem;
}

.skills-list:hover,
.article:hover,
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.skills-list__items li,
.article__title {
  color: var(--color-text);
}

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

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.project-title {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.project-description {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--color-text-soft);
  margin-bottom: 0.8rem;
}

.project-tech {
  font-size: 1.3rem;
  color: var(--color-muted);
  margin-bottom: 1.2rem;
}

.project-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.section-title.dark-blue-text {
  color: var(--color-text);
}

/* Experience timeline */
.experience-timeline {
  border-left: 2px solid var(--color-surface-soft);
  padding-left: 2.4rem;
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-item {
  position: relative;
}

.experience-item::before {
  content: "";
  position: absolute;
  left: -2.9rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gradient-accent);
}

.experience-period {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

.experience-role {
  font-size: 1.7rem;
  margin-bottom: 0.2rem;
}

.experience-location {
  font-size: 1.4rem;
  color: var(--color-muted);
  margin-bottom: 0.8rem;
}

.experience-description {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--color-text-soft);
}

/* About – gradient from live site */
#about {
  background: var(--gradient-accent);
  -webkit-clip-path: none;
  clip-path: none;
  padding-bottom: 6rem;
  color: #ffffff;
}

#about .section-title,
#about .about-wrapper__info-text {
  color: #ffffff;
}

#about .section-title::after {
  background: rgba(255, 255, 255, 0.8);
}

#about .about-wrapper__info-text {
  opacity: 0.95;
  font-size: 1.6rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
  color: var(--color-text);
}

.section-title::after {
  display: none;
}

/* About text refinements */
#about .about-wrapper__info-text {
  font-size: 1.6rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

/* Contact layout */
.contact-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.contact-form__input,
.contact-form__textarea {
  max-width: 480px;
  width: 100%;
}

@media (max-width: 600px) {

  .contact-form__input,
  .contact-form__textarea {
    width: 100%;
  }
}

/* Contact – gradient from live site */
#contact {
  background: var(--gradient-accent);
  -webkit-clip-path: none;
  clip-path: none;
  margin-top: 0;
  padding: 8rem 0 6rem;
  color: #ffffff;
}

#contact .section-title {
  color: #ffffff;
}

#contact .section-title::after {
  background: rgba(255, 255, 255, 0.8);
}

#contact .contact-info,
#contact .contact-info a {
  color: rgba(255, 255, 255, 0.95);
}

#contact .contact-form__input,
#contact .contact-form__textarea {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

#contact .contact-form__input::placeholder,
#contact .contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#contact .contact-form__input:focus,
#contact .contact-form__textarea:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.cta-btn--contact {
  border: 2px solid #fff !important;
  background: transparent !important;
  color: #fff !important;
}

.cta-btn--contact:hover {
  background: #fff !important;
  color: var(--color-accent) !important;
  border-color: #fff !important;
}

/* Buttons – accent from palette */
.cta-btn--hero {
  border-radius: 999px;
  background-image: none;
  background: var(--gradient-accent);
  border: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.cta-btn--hero::after {
  display: none;
}

.cta-btn--hero:hover {
  box-shadow: 0 8px 24px rgba(91, 134, 229, 0.4);
}

.cta-btn--projects {
  border-radius: 999px;
  background-image: none;
  background-color: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.cta-btn--projects::after {
  display: none;
}

a.back-to-top {
  display: flex;
  justify-content: center;
}

.cta-btn--projects:hover {
  background-color: var(--color-accent-soft);
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: none;
}

/* Footer – matches live site */
.footer {
  background: var(--color-text);
  border-top: 3px solid var(--color-accent-teal);
}

.footer__text {
  text-align: center;
}

.footer__text a:hover,
.footer__text a:active {
  color: var(--color-accent-soft);
}

.social-links a:hover .fa-linkedin {
  color: var(--color-accent-soft);
}

.social-links a:hover .fa-github {
  color: var(--color-accent-soft);
}

.back-to-top i:hover {
  color: var(--color-accent-soft);
}

/* ── Contact feedback banners ──────────────────── */

/* Ensure HTML `hidden` attribute always wins over display rules */
.contact-feedback[hidden] {
  display: none !important;
}

.contact-feedback {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  padding: 1.4rem 1.8rem;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-feedback i {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-feedback p {
  margin: 0;
  font-size: 1.5rem;
  text-align: left;
}

.contact-feedback--success {
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

.contact-feedback--error {
  background: rgba(220, 38, 38, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

#contact-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}