:root {
  --header-height: 4.2rem;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #edf2ff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --border: #dbe3f4;
  --shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
}

body.dark {
  --bg: #080d1d;
  --surface: #10172b;
  --surface-2: #18213d;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #818cf8;
  --primary-2: #a78bfa;
  --border: #2c3a67;
  --shadow: 0 14px 35px rgba(2, 6, 23, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at 10% 0%, rgba(99, 102, 241, 0.09), transparent 35%), var(--bg);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.section--muted {
  background: var(--surface-2);
}

.section-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  text-align: center;
}

.section-subtitle {
  margin: 0 auto 2rem;
  max-width: 760px;
  color: var(--muted);
  text-align: center;
}

.l-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav__list {
  display: flex;
  gap: 1.25rem;
}

.nav__link {
  position: relative;
  color: var(--muted);
  font-weight: 500;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.7rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav__toggle {
  display: none;
}

.home {
  padding-top: 4.5rem;
}

.home__container {
  display: grid;
  gap: 2rem;
  align-items: stretch;
  grid-template-columns: 1.6fr 1fr;
}

.pill {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.home h1 {
  margin: 0.8rem 0 0;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.07;
}

.home__subtitle {
  margin: 0.8rem 0 0;
  color: var(--primary);
  font-weight: 700;
}

.home__text {
  margin: 1rem 0 0;
  color: var(--muted);
  max-width: 66ch;
}

.home__cta {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  border: 0;
  cursor: pointer;
  border-radius: 0.8rem;
  padding: 0.85rem 1.2rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(130deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow);
}

.button--ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.socials {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.7rem;
}

.socials a {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
}

.home__card,
.panel,
.skill-card,
.project-card,
.timeline__item,
.contact-card,
.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.home__card {
  padding: 1.2rem;
}

.avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(130deg, var(--primary), var(--primary-2));
}

.home__card h3 {
  margin: 0 0 0.65rem;
}

.home__card li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.about__grid,
.skills,
.projects,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel,
.skill-card,
.project-card,
.contact-card {
  padding: 1rem 1.1rem;
}

.project-card h3 a {
  color: var(--text);
}

.project-card h3 a:hover {
  color: var(--primary);
}

.detail-hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-list-page {
  display: grid;
  gap: 1rem;
}

.project-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.project-shot {
  margin: 0.8rem 0;
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 0.85rem;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 0.8rem;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.stack-chips span {
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.86rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tick-list li {
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  display: grid;
  gap: 0.9rem;
}

.timeline__item h3 {
  margin: 0;
}

.timeline__item {
  position: relative;
  padding: 1rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 1.4rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
}

.meta {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.chips span,
.chips a {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-block;
}

.chips a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-tabs {
  margin: 0 auto 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.tab-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(130deg, var(--primary), var(--primary-2));
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}


.contact-grid {
  margin-bottom: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-text {
  word-break: break-word;
}

.contact__form {
  padding: 1rem;
}

.contact__input {
  width: 100%;
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.form-status {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer__content {
  padding: 1.7rem 0;
  text-align: center;
}

.footer__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer__copy {
  color: var(--muted);
}

.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

body.enable-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.enable-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 860px) {
  .nav__toggle {
    display: grid;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(88%, 320px);
    height: calc(100vh - var(--header-height));
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 1rem;
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 120;
    pointer-events: none;
    transform: translateX(100%);
  }

  .nav__menu.show {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    gap: 1rem;
  }

  .home__container,
  .about__grid,
  .skills,
  .projects,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    border-left: none;
    padding-left: 0;
  }

  .timeline__item::before {
    display: none;
  }

  .section {
    padding: 4.5rem 0;
  }

  .contact-card {
    align-items: flex-start;
    width: 100%;
  }

}
