:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --border: #282828;
  --glow: rgba(0, 255, 136, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Archivo', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

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

/* Header */
header {
  padding: 8rem 0 3rem;
  position: relative;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.header-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.header-text {
  order: 1;
}

.profile-picture {
  order: 2;
  width: 180px;
  height: 180px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  animation: fadeIn 1s ease-out 0.6s backwards;
}

.profile-picture::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 2px;
}

.profile-picture:hover::before {
  opacity: 0.3;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.profile-picture:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.name::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 2rem;
  animation: expandWidth 0.8s ease-out 0.8s backwards;
}

.title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-secondary);
  margin-top: 2rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.contact-info a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.contact-info a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.contact-info a:hover::after {
  width: 100%;
}

/* Email copy button */
.email-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 0;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.copy-btn svg {
  display: block;
}

.copy-tooltip {
  position: absolute;
  top: -2rem;
  right: 0;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.copy-tooltip.show {
  opacity: 1;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--glow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 255, 136, 0.15);
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  fill: currentColor;
}

/* About Me */
.about-me {
  margin: 1rem 0 5rem;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.4s forwards;
}

.about-me::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.about-me .section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.about-me p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Section */
section {
  margin: 5rem 0;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

section:nth-child(3) {
  animation-delay: 0.6s;
}

section:nth-child(4) {
  animation-delay: 0.7s;
}

section:nth-child(5) {
  animation-delay: 0.8s;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 40%;
  height: 1px;
  background: var(--accent);
}

/* Recommendations Section Fix */
#recommendations {
  margin: 5rem 0;
}

.recommendations-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.recommendations-content .section-title {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  transition: left 0.5s ease;
}

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

.skill-tag:hover::before {
  left: 100%;
}

/* Experience */
.experience-item {
  margin-bottom: 3.5rem;
  position: relative;
  padding-left: 2rem;
}

.experience-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--glow);
}

.experience-item::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 1.5rem;
  width: 1px;
  height: calc(100% - 1rem);
  background: linear-gradient(to bottom, var(--border), transparent);
}

.experience-header {
  margin-bottom: 1.5rem;
}

.job-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.company-period {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

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

.period {
  color: var(--text-muted);
}

.experience-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.achievements {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.achievements li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
}

.achievements li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1.2;
}

/* Education */
.education-item {
  margin-bottom: 3.5rem;
  position: relative;
  padding-left: 2rem;
}

.education-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--glow);
}

.education-item::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 1.5rem;
  width: 1px;
  height: calc(100% - 1rem);
  background: linear-gradient(to bottom, var(--border), transparent);
}

.education-header {
  margin-bottom: 0.5rem;
}

.degree-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.institution-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

.institution {
  color: var(--text-secondary);
}

.credential-link {
  color: var(--accent-dim);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.credential-link:hover {
  color: var(--accent);
  transform: translateX(2px);
}

/* Recommendations */
.recommendations-link {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.recommendations-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--glow), transparent);
  transition: left 0.5s ease;
}

.recommendations-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
}

.recommendations-link:hover::before {
  left: 100%;
}

.recommendations-link::after {
  content: ' →';
}

/* Footer */
footer {
  padding: 4rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}

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

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

@keyframes expandWidth {
  from {
    width: 0;
  }

  to {
    width: 60px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 4rem 0 2rem;
  }

  .header-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .header-text {
    order: 2;
  }

  .profile-picture {
    order: 1;
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }

  .contact-info {
    gap: 1rem;
    font-size: 0.75rem;
  }

  .about-me {
    padding: 2rem;
    margin: 2rem 0 3rem;
  }

  section {
    margin: 3rem 0;
  }

  .experience-item {
    padding-left: 1.5rem;
    margin-bottom: 3rem;
  }

  .education-item {
    padding-left: 1.5rem;
    margin-bottom: 3rem;
  }

  .company-period {
    flex-direction: column;
    align-items: flex-start;
  }

  .institution-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .recommendations-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .recommendations-content .section-title {
    margin-bottom: 2rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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