/*--------------------------------------------------------------
# CSS Variables & Theme System
--------------------------------------------------------------*/
:root {
  /* Dark Mode (Default) - Soft Professional Theme */
  --bg-primary: #1a1f2e;
  --bg-secondary: #141824;
  --bg-card: #1c2235;
  --bg-card-hover: #252b40;

  --text-primary: #e8eef4;
  --text-secondary: #a8b4c4;
  --text-muted: #6b7a90;

  --accent: #6ec8d9;
  --accent-hover: #8dd5e3;
  --accent-muted: rgba(110, 200, 217, 0.15);

  --border-color: rgba(110, 200, 217, 0.12);
  --border-hover: rgba(110, 200, 217, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(110, 200, 217, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
}

/* Light Mode - Softened */
[data-theme="light"] {
  --bg-primary: #e8eaed;
  --bg-secondary: #dfe2e6;
  --bg-card: #eaecef;
  --bg-card-hover: #e0e3e8;

  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #64748b;

  --accent: #4a9eb5;
  --accent-hover: #3a8ea5;
  --accent-muted: rgba(74, 158, 181, 0.12);

  --border-color: rgba(74, 158, 181, 0.15);
  --border-hover: rgba(74, 158, 181, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.07);
  --shadow-glow: 0 0 20px rgba(74, 158, 181, 0.08);
}

/*--------------------------------------------------------------
# Base Styles
--------------------------------------------------------------*/
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

/*--------------------------------------------------------------
# Neural Network Background
--------------------------------------------------------------*/
.neural-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-secondary);
}

/*--------------------------------------------------------------
# Theme Toggle
--------------------------------------------------------------*/
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.theme-icon {
  position: absolute;
  font-size: 22px;
  color: var(--accent);
  transition: opacity var(--transition), transform var(--transition);
}

[data-theme="dark"] .dark-icon,
[data-theme="light"] .light-icon {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="dark"] .light-icon,
[data-theme="light"] .dark-icon {
  opacity: 0;
  transform: rotate(180deg);
}

/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 20px 0;
  transition: all var(--transition);
}

.nav.scrolled {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  position: relative;
  padding: 8px 0;
}

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

.nav-link:hover {
  color: var(--accent);
}

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

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

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

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: 700px;
  text-align: center;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(20px, 4vw, 28px);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-social {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--transition);
}

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

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

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.btn-outline:hover {
  background: var(--accent-muted);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}

/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
.section {
  padding: 100px 24px;
}

.section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  padding: 6px 12px;
  background: var(--accent-muted);
  border-radius: 6px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: inline-block;
  width: 200px;
  height: 1px;
  background: var(--border-color);
  margin-left: 24px;
  vertical-align: middle;
}

.subsection-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  margin-top: 60px;
}

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

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  filter: grayscale(20%);
  transition: filter var(--transition);
}

.about-image:hover img {
  filter: grayscale(0%);
}

.about-image-border {
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  z-index: -1;
  transition: all var(--transition);
}

.about-image:hover .about-image-border {
  top: 12px;
  left: 12px;
}

.about-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.detail-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/*--------------------------------------------------------------
# Interests
--------------------------------------------------------------*/
.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.interest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all var(--transition);
}

.interest-card i {
  font-size: 24px;
  color: var(--accent);
}

.interest-card span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.interest-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/*--------------------------------------------------------------
# Timeline
--------------------------------------------------------------*/
.timeline {
  position: relative;
  padding-left: 40px;
}

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

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

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

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

.timeline-marker.education {
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(107, 122, 144, 0.2);
}

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

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

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

.timeline-company {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.timeline-list {
  list-style: none;
  padding: 0;
}

.timeline-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/*--------------------------------------------------------------
# Certifications
--------------------------------------------------------------*/
.certifications-section {
  margin-top: 60px;
}

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

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  transition: all var(--transition);
}

.cert-card i {
  font-size: 32px;
  color: var(--accent);
}

.cert-card span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.cert-card small {
  font-size: 12px;
  color: var(--text-muted);
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
}

/*--------------------------------------------------------------
# Projects
--------------------------------------------------------------*/
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

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

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

.project-content {
  padding: 24px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: 4px;
}

.project-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.project-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.project-link i {
  font-size: 18px;
}

.project-link:hover {
  color: var(--accent-hover);
}

/*--------------------------------------------------------------
# Skills
--------------------------------------------------------------*/
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

.skill-category-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 10px;
  transition: all var(--transition);
}

.skill-item:hover {
  background: var(--accent-muted);
}

.skill-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.skill-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.language-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: 8px;
  transition: all var(--transition);
}

.language-item:hover {
  background: var(--accent-muted);
}

.language-item img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.language-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

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

.contact-text {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.contact-social a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 22px;
  transition: all var(--transition);
}

.contact-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

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

.footer-year {
  margin-top: 8px;
}

/*--------------------------------------------------------------
# Mobile Navigation
--------------------------------------------------------------*/
.mobile-nav-active .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-active .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-active .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 300px;
    margin: 0 auto;
  }

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

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

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

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

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }

  .mobile-nav-active .nav-menu {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-link {
    font-size: 24px;
  }

  .theme-toggle {
    bottom: 20px;
    right: 20px;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-description {
    font-size: 16px;
  }

  .section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 26px;
  }

  .section-title::after {
    display: none;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

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

  .timeline {
    padding-left: 30px;
  }

  .timeline-marker {
    left: -30px;
  }

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

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

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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

/*--------------------------------------------------------------
# Animations
--------------------------------------------------------------*/
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.6s ease-out;
}
