/*
  Global theme variables and resets
*/
:root {
  --color-bg: #0b0d14;
  /* Updated colours: keep dark base but brighten highlights and surfaces */
  --color-surface: #191a2a;
  --color-card: #24263a;
  --color-primary: #9076ff;
  --color-secondary: #b3a5ff;
  --color-text: #e4e7f0;
  --color-text-muted: #a0a3b7;
  --max-content-width: 1200px;
}

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

html, body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  scroll-behavior: smooth;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Canvas covers the screen behind everything */
#beams {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
}

/* Hero section with background image */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  background: radial-gradient(rgba(11, 13, 20, 0.8), rgba(11, 13, 20, 0.9)), url('images/hero-bg.png') center/cover no-repeat;
  background-attachment: fixed;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(11, 13, 20, 0.4);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(11, 13, 20, 0.8);
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}
.nav-links li a {
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links li a:hover {
  color: var(--color-primary);
}

/* Hero content */
.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-text);
}
.hero-content p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  border: 2px solid var(--color-primary);
}
.btn.primary {
  background: var(--color-primary);
  color: var(--color-bg);
}
.btn.primary:hover {
  background: var(--color-secondary);
}
.btn.secondary {
  background: transparent;
  color: var(--color-primary);
}
.btn.secondary:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* Sections */
.section {
  padding: 80px 5% 100px;
}
.section:nth-of-type(odd) {
  background: var(--color-bg);
}
.section:nth-of-type(even) {
  background: var(--color-surface);
}

.section-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
}
.section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
  color: var(--color-primary);
}

/* Card styles */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.card {
  background: var(--color-card);
  border-radius: 12px;
  padding: 30px 25px;
  width: 280px;
  color: var(--color-text);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--color-secondary);
}
.card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Project cards reuse card styles */
/* Projects section cards: allow media previews and links */
.projects-cards .card {
  width: 320px;
  display: flex;
  flex-direction: column;
}
/* Headings inside project cards use primary colour */
.projects-cards .card h3 {
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* Container for media preview in project cards */
.project-media {
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}
.project-media embed {
  width: 100%;
  height: 100%;
  border: none;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-media svg.secure-icon {
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* Project info container to provide spacing */
.project-info p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.project-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
}
.project-links a {
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.3s;
}
.project-links a:hover {
  color: var(--color-secondary);
}

/* Portrait styling for the about section */
.portrait {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.portrait img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-primary);
}

/* Startup section */
.startup-desc {
  max-width: 700px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.startup-desc a {
  color: var(--color-secondary);
  font-weight: 600;
}
.startup-desc a:hover {
  color: var(--color-primary);
}

/* Timeline styles for CV section */
.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.timeline-col {
  flex: 1;
  position: relative;
  padding-left: 20px;
  min-width: 250px;
}
.timeline-col h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: var(--color-primary);
}
.timeline-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-primary);
  opacity: 0.6;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 15px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--color-primary);
  border-radius: 50%;
}
.timeline-item time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  display: block;
  margin-bottom: 4px;
}
.timeline-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--color-primary);
}
.timeline-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Contact section */
.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 30px;
}
.contact-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.4rem;
  transition: background 0.3s, color 0.3s;
  /* Ensure SVG takes full size of the button */
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-btn:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* SVG icons inside contact buttons */
.contact-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
  transition: fill 0.3s;
}
.contact-btn:hover svg {
  fill: var(--color-bg);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 5%;
  font-size: 0.9rem;
  background: rgba(11, 13, 20, 0.9);
  color: var(--color-text-muted);
}

/* Reveal animations */
.hidden {
  opacity: 0;
  transform: translateY(20px);
}
.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.4rem;
  }
  .nav-links {
    gap: 15px;
  }
  .card {
    width: 260px;
  }
  .projects-cards .card {
    width: 260px;
  }
}