/* ===========================
   BASE & RESET
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:     #0A0A0A;
  --black-2:   #111111;
  --black-3:   #1A1A1A;
  --black-4:   #242424;
  --orange:    #7C3AED;
  --orange-l:  #A78BFA;
  --white:     #FFFFFF;
  --gray:      #888888;
  --gray-l:    #CCCCCC;
  --font:      'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

ul { list-style: none; }

/* ===========================
   CONTAINER
=========================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--orange-l);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn--outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn--nav {
  background: var(--orange);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}
.btn--nav:hover {
  background: var(--orange-l);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1rem;
}

/* ===========================
   SECTION LABELS & TITLES
=========================== */
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 32px;
}

.section-title em {
  font-style: normal;
  color: var(--orange);
}

/* ===========================
   NAV
=========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  border-bottom: 1px solid var(--black-3);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--white);
}

.nav__logo .dot {
  color: var(--orange);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links li a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-l);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav__links li a:not(.btn):hover {
  color: var(--white);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
}

/* ===========================
   MOBILE MENU
=========================== */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black-2);
  z-index: 90;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-menu a {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--orange); }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__bg-text {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  font-size: clamp(180px, 25vw, 320px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.hero__content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 2px;
}

.hero__title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__name {
  color: var(--orange);
  position: relative;
}

.hero__name::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--orange);
  opacity: 0.4;
  border-radius: 2px;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--gray-l);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
  font-weight: 300;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--gray);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--orange), transparent);
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===========================
   ABOUT
=========================== */
.about {
  padding: 120px 0;
  background: var(--black-2);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__text p {
  color: var(--gray-l);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 20px;
  max-width: 500px;
}

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--black-4);
}

.stat__num {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.stat__num em {
  font-style: normal;
  color: var(--orange);
  font-size: 1.5rem;
}

.stat__label {
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about__visual {
  display: flex;
  justify-content: center;
}

.about__card {
  width: 100%;
  max-width: 360px;
  background: var(--black-3);
  border-radius: 16px;
  border: 1px solid var(--black-4);
  overflow: hidden;
  position: relative;
}

.about__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent);
}

.about__card-inner {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange);
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.about__tag {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  width: fit-content;
  letter-spacing: 0.03em;
}

.tag--orange {
  background: rgba(124, 58, 237, 0.15);
  color: var(--orange-l);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.tag--white {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-l);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===========================
   WORK
=========================== */
.work {
  padding: 120px 0;
  background: var(--black);
}

.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--black-2);
  border: 1px solid var(--black-4);
  border-radius: 12px;
  padding: 36px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.project-card__year {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 400;
}

.project-card__tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--orange);
  background: rgba(124, 58, 237, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.project-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--gray-l);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 20px;
  flex: 1;
}

.project-stat {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.project-card__result {
  display: flex;
  gap: 24px;
}

.result-item {
  text-align: center;
  padding: 20px 24px;
  background: var(--black-3);
  border-radius: 10px;
  border: 1px solid var(--black-4);
  min-width: 100px;
}

.result-item__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 6px;
}

.result-item__label {
  font-size: 0.72rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-card__link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--orange);
  letter-spacing: 0.04em;
  transition: gap 0.2s;
  margin-top: 8px;
}

.project-card__link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===========================
   SKILLS
=========================== */
.skills {
  padding: 120px 0;
  background: var(--black-2);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-group {
  background: var(--black-3);
  border: 1px solid var(--black-4);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.25s ease;
}

.skill-group:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.skill-group__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-group__title .icon {
  color: var(--orange);
  font-size: 1rem;
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-group li {
  font-size: 0.875rem;
  color: var(--gray-l);
  font-weight: 300;
  padding-left: 14px;
  position: relative;
}

.skill-group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
}

/* ===========================
   CONTACT
=========================== */
.contact {
  padding: 120px 0;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.contact__inner {
  text-align: center;
  position: relative;
}

.contact__desc {
  font-size: 1.05rem;
  color: var(--gray-l);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact__email-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact__email-box {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--orange);
  border-radius: 8px;
  padding: 10px 18px;
}

.contact__email-box.is-visible {
  display: flex;
}

.contact__email-text {
  font-size: 0.95rem;
  color: var(--white, #fff);
  letter-spacing: 0.03em;
  user-select: all;
}

.contact__copy-btn {
  background: var(--orange);
  color: #000;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.contact__copy-btn:hover {
  opacity: 0.8;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.contact__link {
  font-size: 0.875rem;
  color: var(--gray);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.contact__link:hover {
  color: var(--orange);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--black-3);
  background: var(--black-2);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer span {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 300;
}

/* ===========================
   FADE-IN ANIMATION
=========================== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero__title { font-size: 3rem; }
  .hero__bg-text { display: none; }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about__visual { display: none; }

  .about__stats { gap: 24px; }

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

  .project-card--featured {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .project-card--featured .project-card__result {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
    margin: 12px 0;
  }

  .project-card--featured .project-card__link {
    grid-column: 1;
    grid-row: auto;
  }

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

  .contact__links { gap: 20px; }

  .footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .skills__grid { grid-template-columns: 1fr; }
  .about__stats { flex-wrap: wrap; gap: 20px; }
  .hero__cta { flex-direction: column; width: fit-content; }
}

/* ===========================
   MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--black-2);
  border: 1px solid var(--black-4);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal:not(.has-image)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent);
  border-radius: 16px 16px 0 0;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--black-3);
  border: 1px solid var(--black-4);
  color: var(--gray-l);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.modal__close:hover {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}


.modal__image-wrap {
  display: none;
}

.modal__image-wrap.has-image {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.modal__img {
  width: calc(50% - 6px);
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  image-rendering: -webkit-optimize-contrast;
}

.modal__header {
  padding: 40px 40px 28px;
  border-bottom: 1px solid var(--black-4);
}

.modal__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal__year {
  font-size: 0.75rem;
  color: var(--gray);
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}

.modal__summary {
  font-size: 0.95rem;
  color: var(--gray-l);
  font-weight: 300;
  line-height: 1.8;
}

.modal__body {
  padding: 28px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.modal__section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--orange);
  margin-bottom: 16px;
}

.modal__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__list li {
  font-size: 0.9rem;
  color: var(--gray-l);
  font-weight: 300;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.modal__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.7;
}

.modal__list--highlight li {
  padding: 12px 16px 12px 20px;
  background: var(--black-3);
  border-radius: 8px;
  border-left: 3px solid var(--orange);
  color: var(--white);
  font-weight: 400;
}

.modal__list--highlight li::before {
  display: none;
}

@media (max-width: 640px) {
  .modal__image { height: 200px; }
  .modal__header { padding: 36px 24px 24px; }
  .modal__body { padding: 24px 24px 32px; }
  .modal__title { font-size: 1.3rem; }
}
