:root {
  --text-color: #1e293b;
  --link-color: #3b82f6;
  --background-color: #ffffff;
  --header-color: #f1f5f9;
  --hover-accent: #2563eb;
}

:root[data-theme="dark"] {
  --background-color: #0f1115;
  --text-color: #eaeaea;
  --link-color: #7aa2ff;
  --header-color: #1b1f2a;
  --hover-accent: #7aa2ff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color); 
}

html, body, header, nav, .project-card, .skills-section .cells .cell {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

header {
  background-color: var(--header-color);
}
/* NAVBAR */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;

  padding: 0 50px;
  height: 80px;
  min-width: 0;
}

nav .left {
  flex-shrink: 1;
  min-width: 0;
}

nav .left a {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav .right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 1;
  min-width: 0;
}

nav .right a {
  color: var(--text-color);
  margin: 0 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

nav .right a.theme-toggle {
  color: var(--text-color);
  background-color: var(--header-color);
  padding: 5px 15px;
  border-radius: 1px;
  flex-shrink: 0;
  min-width: fit-content;
}

nav .right a span {
  margin-left: 5px;
}

nav .right a:hover {
  color: var(--hover-accent);
  border-bottom: 2px solid var(--hover-accent);
  padding-bottom: 2px;
}

/* section 1 hero */
.hero-section{
  display: flex;
  justify-self: space-between;
  align-items: center;
  padding: 10px 50px;
  margin: 50px 0;
  margin-bottom: 200px;
  margin-top: 200px;
  gap: 40px;
  background-color: var(--background-color);
}

.hero-section .text{
  flex: 5;
}

.hero-section .text h2{
  font-size: 45px;
  
}

.hero-section .text h3{
  margin-top: 15px;
  font-size: 20px;
  
}

.hero-section .text p{
  margin-top: 20px;
  font-size: 15px;
  
}

.hero-section .text .links{
  margin-top: 25px;
  
}

.hero-section .text .links a{
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--link-color);
  border-radius: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: .1s;
}

.hero-section .text .links a:hover{
  color: var(--text-color);
  border: 2px solid var(--text-color);
}

.hero-section .headshot{
  flex: 2;
  display: flex;
  justify-content: right;
  
}

.hero-section .headshot img{
  border-radius: 50%;
  width: 350px;
  box-shadow:
    0 0 15px #838181,
    0 0 35px rgba(255,255,255,0.8),
    0 0 60px rgba(255,255,255,0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
}

/* section 2 skills */
.skills-section {
  padding: 0px 50px;
  margin-bottom: 100px;

}

.skills-card {
  background-color: var(--background-color);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0;              
  padding: 100px 100px;            
  width: 100vw;                  
  margin-left: calc(-50vw + 50%);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.skills-section h2{
  text-align: center;
  font-size: 35px;

}

.skills-section .text{
  text-align: center;
  font-size: 20px;

}

.text strong {
  color: var(--header-color); 
}

.skills-section .cells-wrapper {
  overflow: hidden;
  width: 100%;
  margin: 20px 0;
}

.skills-section .cells{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

}

.skills-section .cells-scroll {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  animation: scroll-left 30s linear infinite;
  width: max-content;
  will-change: transform;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 3));
  }
}

.skills-section .cells .cell{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  width: 200px;
  padding: 10px 20px;
  margin: 10px;
  border: 1.5px solid #d3d3d3;
  border-radius: 5px;
  transition: all 0.3s ease;
  flex-shrink: 0;

}

.skills-section .cells .cell img{
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 5px;
}

.skills-section .cells .cell span{
  font-size: 18px;

}

.skills-section .cells .cell:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--header-accent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

:root[data-theme="dark"] .skills-card {
  background-color: rgba(20,20,25,0.85);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

:root[data-theme="dark"] .skills-section .cells .cell:hover {
  box-shadow: 0 0 14px rgba(122,162,255,0.35);
}

:root[data-theme="dark"] .skills-section .cells .cell {
  border-color: rgba(255,255,255,0.08);
}

/* ========== SECTION DIVIDER ========== */
.section-divider {
  width: 80%;
  height: 2px;
  margin: 80px auto;
  border: none;
  background: linear-gradient(20deg, transparent, var(--header-color), transparent);
  opacity: 0.6;
  border-radius: 10px;
}

:root[data-theme="dark"] .section-divider {
  background: linear-gradient(20deg, transparent, var(--hover-accent), transparent);
  opacity: 0.8;
}

/* ========== PROJECTS SECTION ========== */
.projects-section {
  padding: 80px 10%;
  margin-bottom: 100px;
  background-color: var(--background-color);
}

.projects-section h2 {
  font-size: 45px;
  margin-bottom: 50px;
  text-align: center;
  color: var(--text-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--background-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 
    -8px 8px 0 rgba(203, 213, 225, 1),
    -4px 4px 0 rgba(203, 213, 225, 0.9),
    0 8px 0 rgba(203, 213, 225, 1),
    0 4px 0 rgba(203, 213, 225, 0.9);
}

:root[data-theme="dark"] .project-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

:root[data-theme="dark"] .project-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 
    -8px 8px 0 rgba(27, 31, 42, 1),
    0 8px 0 rgba(27, 31, 42, 1);
}

.project-image-wrapper {
  width: 100%;
  height: 250px;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

:root[data-theme="dark"] .project-image-wrapper {
  background: rgba(255, 255, 255, 0.03);
}

.project-image,
.project-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-video {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

.project-card:hover .project-image {
  display: none;
}

.project-card:hover .project-video {
  display: block;
}

.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  font-size: 24px;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--text-color);
}

.project-content p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 20px;
  color: var(--text-color);
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  transition: all 0.2s ease;
  width: fit-content;
}

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

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

/* ========== SCROLL ANIMATIONS ========== */
.projects-section, .skills-card { 
  opacity: 0;
  transform: translateY(100px) scale(0.9); 
  filter: blur(4px);                       
  transition: 
    opacity 0.7s ease-out, 
    transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), 
    filter 0.7s ease-out;
}

.show {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ========== PARTICLE BACKGROUND ========== */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#bg-light-network {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

header, main, section, footer {
  position: relative;
  z-index: 1;
}

@media(max-width: 740px) {
  /* section 1 hero */

  .hero-section{
    flex-direction: column-reverse;
  }

  .hero-section .headshot img{
    width: 300px;
  }

  /* section 3 projects */
  .projects-section {
    padding: 60px 5%;
  }

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




@media(max-width: 850px) {
  /* section 1 hero */

  .hero-section .text h2{
    font-size: 35px;
  }

  /* NAVBAR */
  nav {
    padding: 0 30px;
    gap: 8px;
  }

  nav .right {
    gap: 4px;
  }

  nav .right a {
    margin: 0 4px;
    font-size: 20px;
  }

  nav .right a.theme-toggle {
    padding: 5px 12px;
  }
}

@media(max-width: 600px) {
  /* NAVBAR */
  nav {
    padding: 0 20px;
    gap: 5px;
  }

  nav .left a {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  nav .right {
    gap: 3px;
    flex-shrink: 1;
  }

  nav .right a {
    font-size: 18px;
    margin: 0 3px;
  }

  nav .right a.theme-toggle {
    color: var(--text-color);
    background-color: transparent;
    padding: 5px 8px;
    margin: 0;
    flex-shrink: 0;
  }

  nav .right a span {
    display: none;
  }

  /* section 1 hero */

  .hero-section{
    padding: 0 20px;

  }

  .hero-section .text h2{
    font-size: 30px;
  }

  /* section 2 skills */

  .skills-section {
    padding: 0 20px;
  }

  .skills-section .cells .cell {
    margin: 10px 15px;
  }

  .skills-section .cells .cell span{
    font-size: 16px;
  }
  
}



