/* CSS Variables for Theme Management */
:root {
  --bg-primary: #22272e;
  --bg-secondary: #2d333b;
  --bg-tertiary: #373e47;
  --text-primary: #adbac7;
  --text-secondary: #768390;
  --text-accent: #cdd9e5;
  --accent-color: #539bf5;
  --border-color: #444c56;
  --success-color: #238636;
  --warning-color: #d29922;
  --error-color: #da3633;
  --color-keyword: #569cd6;
  --color-variable: #9cdcfe;
  --color-property: #9cdcfe;
  --color-string: #ce9178;
  --color-comment: #6a9955;
  --bg-primary-rgb: 34, 39, 46;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --text-primary: #24292f;
  --text-secondary: #656d76;
  --text-accent: #1f2328;
  --accent-color: #0969da;
  --border-color: #d1d9e0;
  --success-color: #1a7f37;
  --warning-color: #9a6700;
  --error-color: #cf222e;
  --color-keyword: #0000aa;
  --color-variable: #003366;
  --color-property: #0055aa;
  --color-string: #a31515;
  --color-comment: #008000;
  --bg-primary-rgb: 255, 255, 255;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
  animation: floatBg 20s infinite ease-in-out;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--accent-color);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: #a855f7;
  top: 60%;
  right: 20%;
  animation-delay: -5s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: var(--accent-color);
  bottom: 20%;
  left: 30%;
  animation-delay: -10s;
}

.shape-4 {
  width: 250px;
  height: 250px;
  background: #a855f7;
  top: 30%;
  right: 10%;
  animation-delay: -15s;
}

@keyframes floatBg {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
}

/* Header Styles */
.menu {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(var(--bg-primary-rgb), 0.9);
  transition: all 0.3s ease;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 70px;
}

/* Circular Logo Styles */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo a {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-color), #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(83, 155, 245, 0.3);
  position: relative;
  overflow: hidden;
}

/* Hover effect */
.logo a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(83, 155, 245, 0.4);
}

/* Animated border effect */
.logo a::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    var(--accent-color),
    #a855f7,
    var(--accent-color)
  );
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo a:hover::before {
  opacity: 1;
  animation: rotate 2s linear infinite;
}

.top-bar ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  padding: 5px 0;
}

.menu-link::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.menu-link:hover::before,
.menu-link.active::before {
  width: 100%;
}

.menu-link:hover,
.menu-link.active {
  color: var(--accent-color);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  color: var(--accent-color);
  background: var(--bg-secondary);
}

.mobile-top-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 70px;
}

.mobile-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu hr {
  margin: 0;
  border: none;
  height: 1px;
  background: var(--border-color);
}

/* Mobile Menu */
.ham-menu {
  height: 50px;
  width: 40px;
  position: relative;
  cursor: pointer;
  display: none;
}

.ham-menu span {
  height: 3px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 25px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: 0.3s ease;
}

.ham-menu span:nth-child(1) {
  top: 25%;
}

.ham-menu span:nth-child(3) {
  top: 75%;
}

.ham-menu.active span {
  background-color: var(--accent-color);
}

.ham-menu.active span:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
  opacity: 0;
}

.ham-menu.active span:nth-child(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Rotation animation for border */
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Dark/Light theme adjustments */
[data-theme="light"] .logo a {
  box-shadow: 0 4px 15px rgba(9, 105, 218, 0.3);
}

[data-theme="light"] .logo a:hover {
  box-shadow: 0 6px 20px rgba(9, 105, 218, 0.4);
}

/* Hero Section */
#hero {
  min-height: 110vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  animation: slideInDown 1s ease;
}

.hero-badge i {
  color: var(--accent-color);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 30px;
}

.title-line {
  display: block;
  overflow: hidden;
}

.title-line.highlight {
  background: linear-gradient(45deg, var(--accent-color), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  animation: slideInUp 1s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 50px;
  animation: slideInUp 1s ease 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  animation: slideInUp 1s ease 0.9s both;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-btn.primary {
  background: linear-gradient(45deg, var(--accent-color), #a855f7);
  color: white;
  box-shadow: 0 10px 30px rgba(83, 155, 245, 0.3);
}

.cta-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(83, 155, 245, 0.4);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cta-btn.primary:hover .btn-glow {
  left: 100%;
}

.cta-btn.secondary {
  background: transparent;
  color: var(--text-accent);
  border: 2px solid var(--border-color);
}

.cta-btn.secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* Code Editor Visual */
.hero-visual {
  position: relative;
  animation: slideInRight 1s ease 0.5s both;
}

.code-editor {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.editor-header {
  background: var(--bg-tertiary);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.editor-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.red {
  background: #ff5f57;
}
.control.yellow {
  background: #ffbd2e;
}
.control.green {
  background: #28ca42;
}

.editor-title {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.editor-content {
  padding: 20px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.code-line {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.line-number {
  color: var(--text-secondary);
  margin-right: 20px;
  min-width: 20px;
  text-align: right;
  opacity: 0.6;
}

.keyword {
  color: var(--color-keyword);
}
.variable {
  color: var(--color-variable);
}
.property {
  color: var(--color-property);
}
.string {
  color: var(--color-string);
}
.comment {
  color: var(--color-comment);
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent-color);
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-tech {
  position: absolute;
  font-size: 2rem;
  animation: floatTech 4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.floating-tech::before {
  content: attr(data-tech);
}

.floating-tech:nth-child(1) {
  top: 10%;
  right: 20%;
}
.floating-tech:nth-child(2) {
  top: 30%;
  left: -10%;
}
.floating-tech:nth-child(3) {
  bottom: 40%;
  right: -5%;
}
.floating-tech:nth-child(4) {
  bottom: 20%;
  left: 15%;
}
.floating-tech:nth-child(5) {
  top: 60%;
  right: 30%;
}

@keyframes floatTech {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-secondary);
  animation: bounce 2s infinite;
}

.scroll-text {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: var(--accent-color);
}

@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-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.title-icon {
  font-size: 2.5rem;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Footer Styles */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left p {
  color: var(--text-secondary);
  margin: 0;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.cv-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.cv-link:hover {
  color: var(--text-accent);
}

/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
