/* ===== CSS Variables & Design System ===== */
:root {
  /* Colors - Clean light blue theme */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-glass: rgba(30, 41, 59, 0.85);
  --bg-glass-light: rgba(255, 255, 255, 0.06);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #38bdf8;
  --accent-secondary: #0ea5e9;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);

  --border-color: rgba(148, 163, 184, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-main);

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  color: var(--text-secondary);
}

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

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(15, 23, 42, 0.98);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-emoji {
  font-size: 1.8rem;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-medium);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: flex;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.lang-toggle button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle button.active {
  background: var(--accent-gradient);
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(-5%, -5%) rotate(5deg);
  }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 440px;
  height: 440px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
    var(--accent-gradient) border-box;
  margin-bottom: 32px;
  animation: photoFloat 6s ease-in-out infinite;
}

@keyframes photoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.hero-title {
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-medium);
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-light);
  border-color: var(--accent-primary);
}

/* ===== Sections ===== */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

.project-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.1);
  transition: all var(--transition-medium);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-image-container {
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.project-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.8) 0%, transparent 50%);
}

.project-content {
  padding: 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 45, 55, 0.5) 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.project-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.project-description {
  font-size: 0.95rem;
  margin-bottom: 16px;
}

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

.tech-tag {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  transform: scale(0.95);
  transition: transform var(--transition-medium);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  position: relative;
}

.modal-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.modal-body h2 {
  margin-bottom: 16px;
}

.modal-body p {
  margin-bottom: 24px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Rich Content Blocks */
.content-block {
  margin: 24px 0;
}

.content-block img {
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.content-block.image-right {
  float: right;
  margin-left: 24px;
  margin-bottom: 16px;
  max-width: 45%;
}

.content-block.image-left {
  float: left;
  margin-right: 24px;
  margin-bottom: 16px;
  max-width: 45%;
}

.content-block.image-right img,
.content-block.image-left img {
  width: 100%;
  height: auto;
}

.content-block.image-full {
  clear: both;
  width: 100%;
  margin: 32px 0;
}

.content-block.image-full img {
  width: 100%;
  height: auto;
}

/* Video content blocks */
.content-block.video-full {
  clear: both;
  width: 100%;
  margin: 32px 0;
}

.content-block.video-full video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px var(--shadow-color);
  background: #000;
}


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

/* ===== Experience Section ===== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

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

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

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  border: 3px solid var(--bg-primary);
}

.timeline-content {
  background: var(--bg-glass);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-medium);
}

.timeline-content:hover {
  border-color: var(--accent-primary);
  transform: translateX(8px);
}

.timeline-period {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.timeline-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  flex-shrink: 0;
}

.timeline-header-text {
  flex: 1;
  min-width: 0;
}

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

.timeline-company {
  color: var(--accent-primary);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-location {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

.experience-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ===== Education Section ===== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

.education-card {
  background: var(--bg-glass);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-medium);
}

.education-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.education-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.education-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: var(--radius-md);
}

.logo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
}

.education-period {
  color: var(--accent-primary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.education-degree {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.education-school {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 4px;
}

.education-location {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.education-card p {
  color: var(--text-primary);
  line-height: 1.7;
}

.education-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

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

.skill-category {
  background: var(--bg-glass);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.skill-category-title {
  color: var(--accent-primary);
  font-size: 1rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ===== Why AI Section ===== */
.why-ai {
  background: var(--bg-secondary);
}

.why-ai-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.why-ai-content p {
  font-size: 1.25rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.why-ai-content p::first-letter {
  font-size: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  float: left;
  margin-right: 12px;
  line-height: 1;
}

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

.contact-message {
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-medium);
}

.contact-link:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.contact-link svg {
  width: 24px;
  height: 24px;
  fill: var(--accent-primary);
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
  }

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

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

  .projects-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    width: 140px;
    height: 140px;
  }

  .contact-links {
    flex-direction: column;
  }

  .modal-image {
    height: 200px;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

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

/* ===== Placeholder image ===== */
.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 40px;
  grid-column: 1 / -1;
}