/* -------------------------------------------
   Base / Resets
------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --text: #1d1d1d;
  --muted: rgba(29, 29, 29, 0.65);
  --accent: #1f6feb;
  --accent-2: #0a66d1;
  --border: rgba(29, 29, 29, 0.12);
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --container: 1040px;
  --transition: 200ms ease;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100%, var(--container));
  padding: 0 1.5rem;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2.2rem, 2.3vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  position: relative;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.section-header p {
  max-width: 640px;
  margin: 1rem auto 0;
  color: var(--muted);
  line-height: 1.6;
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 2000;
}

.header__inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand--accent {
  color: var(--accent);
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 10px 0;
  position: relative;
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.header__inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand--accent {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  background: var(--surface);
  padding: 0.15rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.nav__list {
  display: flex;
  gap: 1.35rem;
  list-style: none;
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  padding: 10px 0;
  position: relative;
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--accent);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
}

.nav-toggle__bar {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  display: block;
  margin: 4px 0;
  transition: transform var(--transition), opacity var(--transition);
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--transition), transform var(--transition);
}

.mode-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.mode-toggle__icon {
  font-size: 1.1rem;
}

/* Hero */
.hero {
  position: relative;
  padding-top: calc(90px + 3rem);
  padding-bottom: 80px;
  min-height: 95vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  opacity: 0.55;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__intro {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.hero__title {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  margin: 0;
  line-height: 1.1;
}

.hero__name {
  color: var(--accent);
}

.hero__subtitle {
  margin-top: 0.75rem;
  font-size: 1.2rem;
  color: var(--muted);
}

.typing {
  font-weight: 600;
  color: var(--text);
  display: inline-block;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
}

.hero__text {
  margin-top: 1.4rem;
  max-width: 520px;
  color: var(--muted);
}

.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 28px rgba(31, 111, 235, 0.2);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 32px rgba(31, 111, 235, 0.25);
}

.btn--outline {
  border-color: rgba(29, 29, 29, 0.35);
  background: var(--surface);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  background: rgba(31, 111, 235, 0.08);
}

.hero__social {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}

.social-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.social-link:hover {
  background: radial-gradient(circle at top left, rgba(77, 124, 255, 0.6), transparent 55%),
              radial-gradient(circle at bottom right, rgba(255, 83, 199, 0.6), transparent 55%);
}

.social-link:hover {
  background: rgba(0, 229, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.25);
}

.hero__media {
  display: grid;
  place-items: center;
}

.hero__avatar {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.55);
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.18), rgba(255, 62, 198, 0.18));
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about__text p {
  margin-bottom: 1.3rem;
  color: var(--muted);
}

.about__list {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
}

.about__cards {
  display: grid;
  gap: 1.2rem;
}

.about__card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.about__card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.3rem;
}

.skill-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-align: center;
}

.skill-card__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.18);
  color: var(--accent);
  font-size: 1.6rem;
}

.skill-card h3 {
  margin-bottom: 0.5rem;
}

.skill-card__status {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Projects */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}

.project-card__media {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 62, 198, 0.18));
  height: 150px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.project-card__placeholder {
  font-size: 1.6rem;
}

.project-card__content {
  padding: 1.4rem 1.6rem 1.6rem;
  display: grid;
  gap: 1rem;
}

.project-card__status {
  margin-top: -0.55rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.project-card__details {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card__tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.project-card__actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn--small {
  padding: 0.55rem 0.95rem;
  font-size: 0.8rem;
}

/* Education */
.education__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.education__card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.education__institution {
  margin: 0.4rem 0 0.25rem;
  color: var(--muted);
}

.education__dates {
  font-size: 0.9rem;
  color: var(--muted);
}

.education__details {
  margin-top: 0.75rem;
  color: var(--muted);
}

/* Contact */
.contact__grid {
  display: grid;
  max-width: 680px;
  margin: 0 auto;
}

.contact__info {
  display: grid;
  gap: 1rem;
}

.contact__card {
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.contact__card i {
  font-size: 1.3rem;
  color: var(--accent);
  min-width: 30px;
}

.contact__card h3 {
  margin: 0 0 0.2rem;
}

.contact__card a {
  color: var(--text);
  word-break: break-all;
}

.contact__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Footer */
.footer {
  padding: 2.2rem 0 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer__top {
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--transition);
}

.footer__top:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dark Mode */
body.dark-mode {
  --bg: #0b0f18;
  --surface: rgba(29, 31, 37, 0.96);
  --surface-2: rgba(29, 31, 37, 0.82);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 40px rgba(0, 0, 0, 0.65);
}

body.dark-mode .header {
  background: rgba(16, 18, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .nav {
  background: rgba(17, 19, 27, 0.95);
}

body.dark-mode .nav__link {
  color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .nav__link:hover,
body.dark-mode .nav__link.active {
  color: var(--accent);
}

body.dark-mode .btn--outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .btn--outline:hover {
  background: rgba(255, 255, 255, 0.18);
}
/* Responsive */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero__media {
    margin-top: 1.8rem;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 80px 0 0 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem 1.5rem;
    transform: translateY(-120%);
    transition: transform var(--transition);
    width: 100%;
    z-index: 1900;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.09);
  }

  .nav__link {
    color: var(--text);
  }

  .nav.active {
    transform: translateY(0);
  }

  .nav__list {
    flex-direction: column;
    gap: 1.1rem;
  }

  .nav__link {
    font-size: 1.1rem;
  }

  .hero {
    padding-top: calc(90px + 2rem);
  }

  .hero__actions {
    justify-content: center;
  }

  .scroll-top {
    right: 1rem;
    bottom: 1.2rem;
  }
}


