/* Root variables */
:root {
  /* Global colour palette for the dark theme.  
     The site uses a midnight base colour scheme with a vibrant violet accent.  
     Adjust these variables to tweak the overall mood without touching the rest of the CSS. */
  /* Base font changed to Poppins to mirror the clean, modern typography from the reference portfolio reel. */
  --font-base: 'Poppins', sans-serif;
  --color-bg: #010409;           /* page background */
  --color-text: #e2e8f0;         /* primary text colour on dark backgrounds */
  /* Bright neon accent reminiscent of the blue halo in the reference video */
  /* Fresh teal accent inspired by Brittany Chiang's portfolio */
  --color-accent: #64ffda;
  --color-muted: #94a3b8;        /* secondary muted text colour */
  --color-light: #1e293b;        /* surfaces: cards, nav background */
  --color-dark: #0a101f;         /* dark footer */
  --radius: 0.5rem;
  /*--shadow: 0 4px 12px rgba(0, 0, 0, 0.3);*/

  /* Additional colours for gradients and highlights */
  --gradient-start: #010409;
  --gradient-end: #010409;
  --glass-bg: rgba(1, 4, 9, 1);
  --glass-border: rgba(1, 4, 9, 1);

}

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

body {
  font-family: var(--font-base);
  /* Rich gradient background spanning the entire page */
  background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-light);
  box-shadow: var(--shadow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 2rem;
}

.nav .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-accent);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  /*justify-content: flex-end;*/
  /*align-items: center;*/
  margin: 0;
  padding: 0;
  
}

.nav-menu li a {
  font-weight: 500;
  color: var(--color-text);
}

.nav-menu li a:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--color-text);
  cursor: pointer;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 4rem 0 2rem;
  /* Adding extra top padding prevents the blob halo from being cut off by the fixed navigation bar */
  /*background: rgba(10, 15, 25, 0.65);*/
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

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

.hero-text .subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.hero-text .intro {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #1e40af;
}

/* CV button in nav 
.cv-btn-container {
  margin-left: 1rem;
}
.cv-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-light);
}
.cv-btn:hover {
  background: #1e40af;
  color: var(--color-light);
}
*/
/* Enhanced hero layout */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3rem;
  flex-wrap: wrap;
  text-align: left;
}

/*-----------------------------------------------------------------------------
 *  Hero image blob design
 *  The portfolio inspiration shows the portrait framed by an organic, abstract
 *  shape with a glowing outline. To achieve this we wrap the photo in two
 *  layers: a wrapper that draws the halo and a child that clips the image
 *  into a blob. Both elements use the same border‑radius ratios to maintain
 *  proportional curves. The wrapper is slightly larger and positioned
 *  negatively to create a visible ring outside the clipped image.
 *----------------------------------------------------------------------------*/
.hero-image-wrapper {
  position: relative;
  width: min(45vw, 280px);   /* scales down on small screens */
  height: auto;
  aspect-ratio: 1 / 1;       /* keeps it square */
  flex-shrink: 0;
}

.hero-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Asymmetric border radius approximating the blob silhouette from the
     provided screenshot. Adjust the percentages to tweak the organic look. */
  /* A more exaggerated, organic border radius to better emulate the amorphous blob from the reference reel */
  border-radius: 70% 30% 35% 65% / 45% 60% 35% 55%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Apply the same border radius to the image so it conforms to the blob */
  border-radius: 70% 30% 35% 65% / 45% 60% 35% 55%;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  border-radius: 70% 30% 35% 65% / 45% 60% 35% 55%;
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 20px var(--color-accent), 0 0 40px var(--color-accent), 0 0 60px var(--color-accent);
  z-index: -1;
}
.hero-text {
  flex: 1;
  max-width: 600px;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.hire-me-btn {
}
.contact-me-btn {
  background: rgba(30, 41, 59, 0.8);
  color: var(--color-text);
}
.contact-me-btn:hover {
  background: var(--color-accent);
  color: var(--color-light);
}
.social-icons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  color: var(--color-accent);
  font-size: 1.5rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.social-icons a:hover {
  background: var(--color-accent);
  color: var(--color-light);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  max-width: 600px;
  /* Add separators between the stat blocks on larger screens to mirror the reference portfolio.
     Each counter item after the first gets a subtle vertical divider. */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.counter-item {
  text-align: center;

  /* Position relative so that we can draw dividing lines between items */
  position: relative;
}
.counter-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Append a plus sign to emphasise each stat value, as seen in the reference design */
.counter-number::after {
  content: '+';
  margin-left: 0.15rem;
  font-weight: 700;
}
.counter-label {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Draw vertical separators between counter items except the first one. */
.counter-item:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 30%;
  height: 40%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Keyframes for the swirling halo around the hero image */
@keyframes spinRing {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Services section */
.services .service-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
.service-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /*backdrop-filter: blur(12px);*/
  transition: transform 0.3s ease;
  

}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(100, 255, 218, 0.35);
}
.service-card ion-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.service-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  /* Scale down the blob halo on smaller screens */
  .hero-image-wrapper::before {
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    top: -10px;
    left: -10px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  display: inline-block;
  color: var(--color-accent);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* About */

/* New about layout */
.about-container {
  display: flex;
  align-items: bottom;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  flex-wrap: wrap;
  /*background: rgba(11, 10, 27, 0.397);*/
  background: var(--glass-bg);
  box-shadow: var(--shadow);
}
.about-image img {
  width: 300px;
  height: auto;
  border-radius: var(--radius);
}
.about-content {
  flex: 1;
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.5;
}
.about-content p {
  margin-bottom: 1rem;
}

/* Skills */
.skill-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  
}

/* Skills tiles grid */
.skills-tiles-container {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2rem;
  
}

/* Individual skill tile */
.skill-tile {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  /*backdrop-filter: blur(12px);*/
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.skill-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
}
.skill-tile ion-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.skill-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}
.skill-detail {
  display: none;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}
.skill-tile.expanded .skill-detail {
  display: block;
}
.read-more-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 0.5rem;
}
.read-more-btn:hover {
  text-decoration: underline;
}

/* Company logos in timeline */
.company-logo {
  width: 40px;
  height: 40px;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.company-logo ion-icon {
  font-size: 40px;
  color: var(--color-accent);
}
.company-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Education details */
.edu-details {
  margin-top: 0.5rem;
  padding-left: 1rem;
  color: var(--color-muted);
}
.edu-details li {
  margin-bottom: 0.5rem;
  list-style: disc;
}

.skill-category {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /*backdrop-filter: blur(12px);*/
  transition: transform 0.3s ease;
}

/* Highlight skill categories on hover with a subtle glow */
.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(100, 255, 218, 0.35);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.skill-category ul {
  list-style: disc inside;
  color: var(--color-muted);
}

.skill-category li {
  margin-bottom: 0.5rem;
  list-style: none;
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: background 0.3s ease, transform 0.3s ease;
  position: relative;
}

/* Hover highlight for skill entries */
.skill-category li:hover {
  /* Brighter hover effect for individual skills */
  background: rgba(100, 255, 218, 0.15);
  transform: translateY(-2px);
}

/* Skill entry elements */
.skill-title {
  font-weight: 600;
}


.skill-desc {
  display: none;
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.skill-entry.expanded .skill-desc {
  display: block;
}

/* Projects */
.filters {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-btn {
  border: none;
  background: rgba(30, 41, 59, 0.8);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  /*backdrop-filter: blur(12px);*/
  transition: transform 0.3s ease;
  position: relative;
  /*background: rgba(11, 10, 27, 0.397);*/
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(100, 255, 218, 0.35);
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.project-description {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-link {
  font-weight: 600;
  color: var(--color-accent);
}

.project-link:hover {
  text-decoration: underline;
}

/* Project media containers */
.project-media {
  width: 100%;
  height: 180px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Animated gradient placeholder for the HPC regression testing project */
.animation-hpc {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: linear-gradient(45deg, #8b5cf6, #3b82f6, #14b8a6, #eab308);
  background-size: 400% 400%;
  animation: gradientAnimation 8s ease infinite;
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Equalizer animation for lip-reading project */
.animation-lip {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.6);
  padding: 0.5rem;
}
.animation-lip span {
  width: 12px;
  background: var(--color-accent);
  border-radius: 3px;
  animation: equalizer 1.2s infinite ease-in-out;
  display: inline-block;
}
.animation-lip span:nth-child(2) {
  animation-delay: -0.4s;
}
.animation-lip span:nth-child(3) {
  animation-delay: -0.8s;
}

@keyframes equalizer {
  0%, 40%, 100% {
    height: 20%;
  }
  20% {
    height: 80%;
  }
}

/* Timeline (Experience) */
.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--color-accent);
}

.timeline-item {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  margin-bottom: 2rem;
  /*background: rgba(11, 10, 27, 0.397);*/
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-style: normal;
  /*backdrop-filter: blur(12px);*/
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
}

.timeline-date {
  font-weight: 600;
  color: var(--color-accent);
  
}

.timeline-title {
  font-size: 1.15rem;
  font-style: normal;
  color: var(--color-text);
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.timeline-responsibilities {
  color: var(--color-muted);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Education */
.education .edu-item {
  /*background: rgba(11, 10, 27, 0.397);*/
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.education .edu-date {
  font-weight: 600;
  color: var(--color-accent);
}

.education .edu-title {
  font-size: 1.15rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.education .edu-school {
  color: var(--color-text);
  font-style: italic;
}

/* Contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--color-text);
  font-weight: 500;
  backdrop-filter: blur(12px);
  transition: background 0.3s ease, color 0.3s ease;
}

.contact-link ion-icon {
  font-size: 1.25rem;
  color: var(--color-accent);
}

.contact-link:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

/* Apply hover lift and glow to timeline, education and contact cards */
.timeline-item:hover,
.edu-item:hover,
.contact-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(100, 255, 218, 0.35);
}

.contact-link:hover ion-icon {
  color: var(--color-dark);
}

/* Hide individual skill read-more buttons and descriptions */
.read-more-btn,
.skill-desc {
  display: none !important;
}

/* Show skills list items by default. Read‑more toggling will only hide/show entries beyond the first five. */
.skill-category .skills-list {
  max-height: none;
  overflow: visible;
}
.skill-category.expanded .skills-list {
  max-height: none;
}

/* Hide skills beyond the first five by default; reveal them when the category is expanded */
.skill-category .skills-list li:nth-child(n+5) {
  display: none;
}
.skill-category.expanded .skills-list li {
  display: list-item;
}

/* Read-more button styling for categories */
.category-read-more {
  background: none;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0;
  margin-top: 0.25rem;
}
.category-read-more:hover {
  text-decoration: underline;
}

/* Glassmorphism card for modern look */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /*backdrop-filter: blur(12px);*/
}

/* Footer */
.footer {
  padding: 1rem 0;
  background: var(--color-dark);
  color: var(--color-light);
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive Nav */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 70%;
    height: calc(100vh - 64px);
    background: rgba(30, 41, 59, 0.95);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
  }
  .nav-menu.open {
    right: 0;
  }
  .nav-toggle {
    display: block;
  }
}

/* -------------------------------------------------------------------------
 * Starry background
 *
 * This section defines a starry sky effect that gently falls down the page.
 * An unordered list with class `.stars` is positioned behind all content
 * (z-index: -1) and contains small `<li>` elements representing individual
 * stars. Each star is positioned at a different horizontal location with
 * varied animation durations and delays to create a natural, random flow.
 * Setting `pointer-events: none` ensures that the star field does not
 * intercept any clicks on page elements.
 */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.2s ease-out;
}

.stars li {
  position: absolute;
  display: block;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-100vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* Position each star at a specific horizontal offset and adjust its
   animation timing to simulate a more natural starfall. These values were
   chosen to spread stars across the viewport and stagger their appearance. */
.stars li:nth-child(1) { left: 2%; animation-duration: 12s; animation-delay: -2s; }
.stars li:nth-child(2) { left: 8%; animation-duration: 14s; animation-delay: -6s; }
.stars li:nth-child(3) { left: 14%; animation-duration: 10s; animation-delay: -4s; }
.stars li:nth-child(4) { left: 20%; animation-duration: 16s; animation-delay: -8s; }
.stars li:nth-child(5) { left: 26%; animation-duration: 18s; animation-delay: -10s; }
.stars li:nth-child(6) { left: 32%; animation-duration: 13s; animation-delay: -3s; }
.stars li:nth-child(7) { left: 38%; animation-duration: 15s; animation-delay: -7s; }
.stars li:nth-child(8) { left: 44%; animation-duration: 11s; animation-delay: -5s; }
.stars li:nth-child(9) { left: 50%; animation-duration: 17s; animation-delay: -9s; }
.stars li:nth-child(10) { left: 56%; animation-duration: 14s; animation-delay: -2s; }
.stars li:nth-child(11) { left: 62%; animation-duration: 19s; animation-delay: -11s; }
.stars li:nth-child(12) { left: 68%; animation-duration: 12s; animation-delay: -1s; }
.stars li:nth-child(13) { left: 74%; animation-duration: 16s; animation-delay: -6s; }
.stars li:nth-child(14) { left: 80%; animation-duration: 15s; animation-delay: -4s; }
.stars li:nth-child(15) { left: 86%; animation-duration: 13s; animation-delay: -7s; }
.stars li:nth-child(16) { left: 92%; animation-duration: 18s; animation-delay: -9s; }
.stars li:nth-child(17) { left: 5%; animation-duration: 11s; animation-delay: -3s; }
.stars li:nth-child(18) { left: 30%; animation-duration: 17s; animation-delay: -5s; }
.stars li:nth-child(19) { left: 55%; animation-duration: 13s; animation-delay: -8s; }
.stars li:nth-child(20) { left: 80%; animation-duration: 16s; animation-delay: -10s; }
.stars li:nth-child(21) { left: 10%; animation-duration: 19s; animation-delay: -12s; }
.stars li:nth-child(22) { left: 35%; animation-duration: 12s; animation-delay: -4s; }
.stars li:nth-child(23) { left: 60%; animation-duration: 14s; animation-delay: -6s; }
.stars li:nth-child(24) { left: 85%; animation-duration: 15s; animation-delay: -5s; }
.stars li:nth-child(25) { left: 95%; animation-duration: 20s; animation-delay: -13s; }

.company-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  filter: none !important;
  opacity: 1 !important;
  background: transparent !important;
}

.company-logo ion-icon {
  font-size: 40px;
  color: var(--color-accent); /* keep icons teal */
}

/* -- Styles for Animated Typing Effect -- */
#animated-title::after {
  content: '|';
  margin-left: 0.2rem;
  font-weight: 300;
  color: var(--color-accent);
  animation: blink 0.5s infinite;
}

/* Blinking cursor animation */
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ===== Mobile fixes (≤ 640px) ===== */
@media (max-width: 640px) {
  .container{width:94%; padding:0 .75rem;}

  /* Header */
  .nav{padding:.75rem 1rem;}
  .nav .logo{
    font-size: clamp(0.98rem, 4vw, 1.1rem);
    line-height: 1.2;
    white-space: normal;   /* allow wrapping so the name never gets cut */
    word-break: break-word;
  }

  /* Hero */
  .hero{min-height:auto; padding:2.25rem 0 1rem;}
  .hero-content{
    flex-direction: column;          /* stack image and text */
    align-items: center;
    gap: 1.25rem;
    text-align: center;              /* nicer on phones */
  }
  .hero-image-wrapper{width: 170px; height:170px;}      /* smaller blob */
  .hero-image-wrapper::before{top:-8px; left:-8px;}     /* tighter glow ring */

  /* Titles – scale down & wrap safely */
  .hero-text h1{                       /* “Hello, I'm …” */
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    line-height: 1.15;
  }
  .hero-text h2,
  .hero-text .display-name,
  .hero-text .accent{                  /* big name line */
    font-size: clamp(1.8rem, 8.2vw, 2.6rem);
    line-height: 1.12;
    display: block;
    overflow-wrap: anywhere;          /* never overflow horizontally */
    word-break: break-word;
  }

  .hero-buttons{flex-wrap: wrap; justify-content:center; gap:.75rem;}
  .social-icons{justify-content:center;}
  .hero-stats{grid-template-columns: repeat(2,1fr);}

  .section{padding:3rem 0;}           /* a bit tighter vertical rhythm */
}

/* Even smaller phones (≤ 380px) */
@media (max-width: 380px){
  .hero-image-wrapper{width:150px; height:150px;}
  .hero-text h1{font-size: 1.5rem;}
  .hero-text h2,
  .hero-text .display-name,
  .hero-text .accent{font-size: 1.9rem;}
}
