/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;

  --text-primary: #e8e8ef;
  --text-secondary: #9494a8;
  --text-muted: #5c5c72;

  --accent: #00ffc8;
  --accent-dim: rgba(0, 255, 200, 0.15);
  --accent-glow: rgba(0, 255, 200, 0.3);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 255, 200, 0.2);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --nav-height: 72px;
  --container-max: 1120px;
  --radius: 12px;
  --radius-sm: 8px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  color: var(--accent);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__logo:hover {
  color: var(--text-primary);
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav__links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__links a:hover::after {
  width: 100%;
}

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

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: #fff;
  color: var(--bg-primary);
  box-shadow: 0 0 30px var(--accent-glow);
}

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

.btn--outline:hover {
  background: var(--accent-dim);
  color: #fff;
  border-color: #fff;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 140px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 255, 200, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 50%, rgba(0, 100, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  isolation: isolate;
}

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.hero__scroll span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: linear-gradient(90deg, var(--accent), #fff, var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 100px 0;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: 48px;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  background: var(--bg-secondary);
}

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

.about__image {
  position: relative;
}

.about__photo-placeholder {
  width: 280px;
  height: 340px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid rgba(0, 255, 200, 0.25);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.about__image::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius) + 4px);
  background: transparent;
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.about__photo-placeholder:hover {
  border-color: #00ffc8;
  transform: translateY(-4px);
}

.about__photo-placeholder:hover ~ *,
.about__image:hover::before {
  box-shadow: 0 0 35px rgba(0, 255, 200, 0.3), 0 12px 40px rgba(0, 0, 0, 0.4);
}

.about__photo-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about__photo-placeholder:hover img {
  transform: scale(1.05);
}

.about__photo-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 40%);
  pointer-events: none;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.0625rem;
}

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

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

.stat {
  display: flex;
  flex-direction: column;
}

.stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-dim);
}

.project-card__image {
  height: 200px;
  background: var(--gradient, linear-gradient(135deg, #1a1a2e, #0f3460));
  position: relative;
  overflow: hidden;
}

.project-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.project-card__overlay-title {
  display: none;
}

.project-card__body {
  padding: 24px;
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.project-card__header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-card__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 4px;
}

.project-card__body > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 100px;
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* ============================================
   SKILLS
   ============================================ */
.skills {
  background: var(--bg-secondary);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.skill-group {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.skill-group__title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 600;
}

.skill-group__items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.skill-item__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.skill-item__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #00b4d8);
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-item__fill.animate {
  width: var(--fill);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 720px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline__item {
  position: relative;
  padding-bottom: 48px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
}

.timeline__item--edu .timeline__marker {
  border-color: #c77dff;
  box-shadow: 0 0 12px rgba(199, 125, 255, 0.3);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.timeline__item--edu .timeline__date {
  color: #c77dff;
}

.timeline__content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}

.timeline__company {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline__content > p:last-child {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  text-align: center;
}

.contact__inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact__text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__socials a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__socials a:hover {
  color: var(--accent);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
  }

  .nav__links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    font-size: 1.125rem;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about__photo-placeholder {
    width: 200px;
    height: 240px;
    margin: 0 auto;
  }

  .about__stats {
    justify-content: center;
  }

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

  .project-card__header {
    flex-direction: column;
    gap: 4px;
  }

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

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.25rem;
  }

  .section {
    padding: 72px 0;
  }

  .about__stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
