/* ===== CSS Variables ===== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --accent-color: #06b6d4;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-light: #94a3b8;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #0f172a;

  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  font-size: 0.938rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

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

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 100%
  );
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(
    circle at 70% 30%,
    rgba(37, 99, 235, 0.08) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 40px 0;
}

.hero-greeting {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.hero-social {
  display: flex;
  gap: 16px;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.hero-social a:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-avatar {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.hero-avatar::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed var(--primary-light);
  opacity: 0.5;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-avatar i {
  font-size: 8rem;
  color: white;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-light);
  font-size: 1.25rem;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

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

.section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stat-item {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.938rem;
  color: var(--text-secondary);
}

/* ===== Timeline (Experience & Education) ===== */
.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--primary-color),
    var(--accent-color)
  );
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -7px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
  background: var(--bg-primary);
  padding: 28px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 769px) {
  .timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
  }
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.timeline-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-company i {
  font-size: 0.875rem;
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.timeline-description {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.timeline-highlights {
  margin-bottom: 20px;
}

.timeline-highlights li {
  position: relative;
  padding-left: 26px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.timeline-highlights li:last-child {
  margin-bottom: 0;
}

.timeline-highlights i {
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--primary-color);
  font-size: 0.875rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 20px;
}

/* ===== Skills Section ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skill-category {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 16px;
  color: white;
  font-size: 1.75rem;
}

.skill-category h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.skill-list li {
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
  border-bottom: none;
}

/* ===== Contact Section ===== */
.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateX(10px);
  border-color: var(--primary-color);
}

.contact-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 14px;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-info {
  text-align: left;
}

.contact-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  color: white;
  margin-bottom: 8px;
  display: inline-block;
}

.footer-brand p {
  color: var(--text-light);
  font-size: 0.938rem;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.25rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-avatar {
    width: 250px;
    height: 250px;
  }

  .hero-avatar i {
    font-size: 6rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .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);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 1.875rem;
    margin-bottom: 40px;
  }

  .about-stats {
    flex-direction: column;
  }

  .timeline {
    max-width: 100%;
    overflow: hidden;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    padding-left: 35px;
    max-width: 100%;
  }

  .timeline-marker {
    left: 1px;
    width: 14px;
    height: 14px;
  }

  .timeline-header {
    flex-direction: column;
  }

  .timeline-content {
    max-width: 100%;
    overflow: hidden;
  }

  .timeline-title {
    font-size: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .timeline-description,
  .timeline-highlights li {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-avatar {
    width: 200px;
    height: 200px;
  }

  .hero-avatar i {
    font-size: 5rem;
  }

  .stat-item {
    padding: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .timeline {
    max-width: 100%;
  }

  .timeline-content {
    padding: 16px;
    max-width: 100%;
  }

  .timeline-title {
    font-size: 1.125rem;
    word-wrap: break-word;
  }

  .timeline-description {
    font-size: 0.938rem;
  }

  .timeline-highlights li {
    font-size: 0.938rem;
    gap: 8px;
  }

  .timeline-tags {
    gap: 6px;
  }

  .tag {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

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

  .contact-info {
    text-align: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .timeline-item,
  .skill-category,
  .stat-item,
  .contact-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
  }

  .timeline-item:nth-child(1) {
    animation-delay: 0.1s;
  }
  .timeline-item:nth-child(2) {
    animation-delay: 0.2s;
  }
  .timeline-item:nth-child(3) {
    animation-delay: 0.3s;
  }

  .skill-category:nth-child(1) {
    animation-delay: 0.1s;
  }
  .skill-category:nth-child(2) {
    animation-delay: 0.2s;
  }
  .skill-category:nth-child(3) {
    animation-delay: 0.3s;
  }
  .skill-category:nth-child(4) {
    animation-delay: 0.4s;
  }
}

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

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .back-to-top,
  .scroll-indicator,
  .hero-buttons {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .section {
    padding: 40px 0;
  }

  body {
    font-size: 12pt;
  }
}
